[antlr-interest] Additional patches to C runtime

Stephen Gaito stephen at perceptisys.co.uk
Wed Sep 26 12:13:40 PDT 2012


Mike, and the list,

I see that I have to slightly correct my previous statements.

ANTLR v4 does have embedded actions so v3 grammars might not have to be 
as heavily re-factored as I suggested... however in my own heavily 
mulit-lingual project (Java, C, Ruby, JavaScript, PHP, ...) embedded 
actions have been a real pain, and I for one, want to avoid any embedded 
actions.

However, AST grammars no longer exist, so we will have to heavily 
re-code any AST grammars from v3 for any v4 port....

Regards,

Stephen Gaito

On 26/09/12 18:49, Stephen Gaito wrote:
> 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
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list