[antlr-interest] C generator is not generating @after actions

Jim Idle jimi at temporal-wave.com
Thu Feb 5 15:43:47 PST 2009


Gavin Lambert wrote:
> At 05:31 6/02/2009, Jim Idle wrote:
>
>
> (A grammar compiled with -debug should probably also use robust mode 
> regardless of the option, but there should still be the separate 
> option for non -debug compiles, since not everyone uses -debug at all.)
>
Yes, I think that that is a sensible option, however with the C target 
that implies that you need to link with the socket library and it isn't 
available everywhere. Maybe a good thing would be to have a -mode=xxxxx 
option and the xxx options would be just passed into the string 
templates for the target. Then the target code generation templates 
could all support target specific things, even if there were some things 
that made sense to all targets. or perhaps expand -debug to optionally 
allow -debug=xxxx, yyyy

That said, perhaps the fact that @sections are passed on might mean this 
could be done already, but that means modifying the grammar and using 
#define or similar, which means expanding the number of source code lines.

Anyway, food for thought.

Jim


More information about the antlr-interest mailing list