[antlr-interest] Antlr v3.0ea8 : @headernottakenintoaccountinautomatically generated lexer java code...

Jim Idle jimi at temporal-wave.com
Tue May 9 10:43:17 PDT 2006


 

________________________________

From: antlr-interest-bounces at antlr.org on behalf of Don Caton
Sent: Fri 5/5/2006 6:54 PM
To: 'ANTLR Interest'
Subject: RE: [antlr-interest] Antlr v3.0ea8 : @headernottakenintoaccountinautomatically generated lexer java code...



Jim:           

> Understood in an ANTLR2 context - however, at least for C
> actions, I intend to produce the Visual Studio 2005 plug-in
> that is able to deal with this. ANTLR3 makes it pretty easy
> to switch between embedded languages.

You're not going to be able to do this with a simple plug-in, you're going
to need to write a language service package, and implement among other
things, the IVsContainedLanuage interface.  I've written a language service
for VS, but not one that implements "contained" languages, and it's not a
trivial undertaking.  I'm up to my eyeballs in work and will be for the
forseeable future, or else I'd offer to help.

Yes - I understand this. Plug-in was just the obvious word choice, but it means something specific of course. 

> natural fashion, and compile and link the individual source files.

Not following you here.  The C++ code generator already generates .hpp files
that can be used to reference parser/lexer elements.  I'm talking about
action code.  In general, I really dislike the way you have to have C++ (or
whatever) language embedded in the .g file.  I'd love to see some sort of
code-behind model that associates .g files with .cpp (or whatever) files,
like the model used for ASP.NET.


For that, you can use the string template output model. Then you can switch templates, but you still don't necessarilly have the intellisense stuff available of course :-(

Jim



More information about the antlr-interest mailing list