[antlr-interest] [stringtemplate-interest] StringTemplate editing in Visual Studio

Johannes Luber jaluber at gmx.de
Tue Oct 21 09:18:17 PDT 2008


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:parrt at cs.usfca.edu] 
> 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
>> stringtemplate-interest at antlr.org
>> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> 
> _______________________________________________
> stringtemplate-interest mailing list
> stringtemplate-interest at antlr.org
> http://www.antlr.org/mailman/listinfo/stringtemplate-interest
> 



More information about the antlr-interest mailing list