Fresh port by hand using all ANTLR3 grammars. Hello C# 3.0 Extension Methods. :) I also have a C# 3 port of the ANTLR runtime using generics & Linq in places. I'm working on lazy evaluation of lexers in the parser, etc., but that isn't complete yet.
After the StringTemplate unit tests all passed (including fixing the '\n'/'\r\n' issues in the tests and implementation) I refactored some System.Collections.IDictionary and IList to generics. I'll be posting the StringTemplate source in the near future and keeping it updated. The StringTemplate port happened because I'm working on a full ANTLR3 port to C# 3 so I can completely integrate the build, debugging, and new modular/extensible codegen optimization passes into my Visual Studio language service. Now that even Mono supports most (all?) of the relevant C# 3 features, I felt that was the best way to go on a fresh port. C# 2 users (Visual Studio 2005, etc) won't be able to compile the source within Visual Studio (command line works), but they *will* be able to reference/use it in their projects and even benefit from the new lazy evaluation features. And now I'm rambling. :o Sam -----Original Message----- From: Johannes Luber [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 11:18 AM To: Sam Harwell Cc: Terence Parr; stringtemplate-interest; antlr-interest Interest Subject: Re: [stringtemplate-interest] StringTemplate editing in Visual Studio Sam Harwell schrieb: > I'm using a barely-modified group.g3 in my C# StringTemplate 3.2 port, Did you add the missing stuff or did you port from Java directly? If the latter, did you do it manually or with a tool? Johannes > and the colorizer uses it directly. As I was mentioning on my blog, the > key to using ANTLR lexers in a syntax highlighter making sure the lexer > can cleanly handle *any* single line of source without context other > than a single integer used for marking the state at the beginning of a > line. > > I'm working on a framework for automatic handling of island grammars in > this kind of line-by-line lexer, at which point I'll be able to > arbitrarily highlight any tokens of the StringTemplate sub-grammars. > You'll have to write your own highlighter since it won't be in Visual > Studio, but I can detail some of the method once it's up and running. > > Since many lexers use few (if any) actions, we've had remarkable success > getting new syntax highlighters up and running. Once I had the > StringTemplate C# port running, it took less than 2hrs to build the > syntax highlighter as it sits now. > > Sam > > -----Original Message----- > From: Terence Parr [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 21, 2008 10:34 AM > To: Sam Harwell > Cc: antlr-interest Interest; stringtemplate-interest > Subject: Re: [stringtemplate-interest] StringTemplate editing in Visual > Studio > > That looks great! I was going to explore for ANTLRWorks sometime this > year. Great job...now I can copy you! ;) > Ter > On Oct 21, 2008, at 1:24 AM, Sam Harwell wrote: > >> I'm in the initial stages of the StringTemplate portion of an editor >> for >> Visual Studio. At this point, it doesn't do anything crazy but I'm >> posting a screenshot to try and draw some feedback. Does anyone have >> an >> idea what the syntax highlighting for StringTemplate should look like >> optimally? I have a few ideas I'll run with for now and hopefully >> they'll prove usable. >> >> The screenshot is under the StringTemplate section on this page: >> > http://wiki.pixelminegames.com/index.php?title=Tools:nFringe:Antlr:Featu >> res >> >> On a side note, the current preview release (16251) doesn't include >> the >> StringTemplate syntax highlighter. It'll be in the next one. >> >> Sam >> _______________________________________________ >> stringtemplate-interest mailing list >> [EMAIL PROTECTED] >> http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest > > _______________________________________________ > stringtemplate-interest mailing list > [EMAIL PROTECTED] > http://www.antlr.org:8080/mailman/listinfo/stringtemplate-interest > List: http://www.antlr.org:8080/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org:8080/mailman/options/antlr-interest/your-email-address --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en -~----------~----~----~----~------~----~------~--~---
