[antlr-interest] Additional patches to C runtime

Stephen Gaito stephen at perceptisys.co.uk
Wed Sep 26 10:49:37 PDT 2012


Mike,
> I'm also curious how the v4 target differs from the v3 target as this directly determines if we can use v4 when it comes out. The new features sound really cool so I'm eager to use them.

The way ANTLR v4 integrates our own target specific code with the code 
generated from the grammar has completely changed.

This change in how the code is integrated has allowed Terence to remove 
AST grammars.... it is now replaced with the better structured object 
oriented code itself.  This is the correct direction for the future, but 
it means that our existing grammars (especially any AST grammars) will 
need to be heavily re-factored/re-written.

So, alas, the ANTLR v3 C target will not work (with out a lot of work) 
with the ANTLR v4 system ;-(

The v3 C target is too specific to the v3 system, and, I would argue, we 
really do need to move to C++ rather than straight C.

While Sam Harwell has suggested he will produce a C++ target for v4, he 
has not said how long this might take.  I suspect that Sam has a few 
other tasks in his pipeline which take priority over a C++ target.

I am looking at how hard it might be to do a quick (and very dirty) 
"hack" of a C++ target for v4.  Alas, I should start using my ANTLR 
based tool rather than build tools to build tools.... so I am not sure I 
can take on a v4 C++ target (even a "quick" and dirty hack) ;-(

Regards,

Stephen Gaito


On 26/09/12 17:03, Mike Lischke wrote:
> Hey Stefen,
>
>> Wonderful!
>>
>> I had a look at it yesterday and it looks good, I will certainly make use of your patches (if nothing else).
>
> Hopefully Ter merges the changes soon. I'm also curious how the v4 target differs from the v3 target as this directly determines if we can use v4 when it comes out. The new features sound really cool so I'm eager to use them.
>
> Mike



More information about the antlr-interest mailing list