Hi Jim,

I'm sorry for being that helpless, but the move from antlr2 to antlr3 is 
(especially in case of a C++ project) really not that easy.

I've tried the 3.1.4 snapshot of antlr C runtime (didn't find any 
snapshot of the tool itself), it solves the problem for the polydiff 
examples ('*' are back there:), but not the one with my grammar.

The parsing still finishes without any errors, but the there are no 
trees. This shouldn't be possible normally, should it (I guess that from 
the examples code? What might cause that? Is it a problem with the 
grammar or with my code interacting with the C runtime?

Thank you again for any help. I can promise that for your wasted time 
with me I'll waste time with antlr maven dependencies to get antlr (and 
antlrworks and all their maven dependencies) building offline from 
source with maven to be able to update (and in case of antlrworks and 
some maven deps submit as new) the packages in Fedora repositories to 
3.1.3 and forwards on;)

Milos

P.S.: If you'd look into my grammar, the REGEXP token needs a tiny fix 
to prevent the "multiple alternatives warning":

REGEXP: '"' ('\\' . |~('"'|'\\'))* '"'


Dne 4.9.2009 16:38, Jim Idle wrote:
> I am sorry you feel you have wasted your time and spent disgusting
> amounts of it - a conversion should not take much more than a day or so
> if you know what you are doing. :)
>
> Please download the 3.1.4 snapshot and let me know if that wastes a
> little less of your precious time. If your time is still wasted then I
> will look to fix it and obvously I will be sending you a check to cover
> all the time I have wasted for you :)
>
> Seriously though, please try 3.1.4 and report back.
>
> Jim
>
> On Sep 3, 2009, at 5:45 PM, Milos Jakubicek <[email protected]> wrote:
>
>> Hi,
>>
>> I believe I've found a regression in the ANTLR C target. If I try to
>> compile the polydiff example on 3.1.1, I get the following tree as first:
>>
>> (* 2 (^ x 3)) + (^ x 5) + (* 4 x) + (* 10 x) + (* 8 x) + x + 2
>>
>> However, with antlr 3.1.2+, I get:
>>
>> ( 2 (^ x 3)) + (^ x 5) + ( 4 x) + ( 10 x) + ( 8 x) + x + 2
>>
>> (the '*'s are missing!) Seems that one cannot use imaginary tokens?
>>
>> Also, I'm trying to convert my own antlr2 grammar into antlr3 grammar,
>> which turned out into a nightmare. I've currently a semi-working
>> grammar (see attached, input text could be e.g. [word="a"]), which,
>> however, produces no trees (cqpAST.tree = NULL, "No tree produced" in
>> my code which is attached too), although it finishes without any
>> errors. Any idea what might cause that? Don't know if this is somehow
>> related to the above mentioned problem (I'm unable to try my grammar
>> with 3.1.1 because of another error which I can't explain, but which
>> vanishes in 3.1.2+).
>>
>> I spent with the move from antlr2 to antlr3 a disgusting amount of
>> time and now it seems to be totally wasted:(
>>
>> Thank you very much in advance for any advice!
>> Milos Jakubicek
>> <cqp.g>
>> <tstcqpgr.cc>
>> _______________________________________________
>> antlr-dev mailing list
>> [email protected]
>> http://www.antlr.org/mailman/listinfo/antlr-dev

_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev

Reply via email to