[antlr-interest] Q: move from v2 to v3 parser grammar. Rewrite tree rule
Kevin J. Cummings
cummings at kjchome.homeip.net
Wed Mar 23 07:37:27 PDT 2011
On 03/23/2011 08:41 AM, Ruslan Zasukhin wrote:
> On 3/23/11 1:54 AM, "Jim Idle" <jimi at temporal-wave.com> wrote:
>
> Hi Jim,
>
>> You can do it the same way in v3, but when you generate the code, ANTLR
>> will make up token names and you won't be able to write a good error
>> display routine/handler because you won't know the tokens. You will just
>> have T23 or something like that, and then you can't do anything
>> interesting. So, you don't HAVE to, but it is neater when you come to do
>> certain things.
>
> Aha, I see.
> Yes we have see that T23 a lots in generated code ..
>
>
> Interesting ... In v2 names of tokens was shown correctly
> Right?
IIRC, the names of tokens literals in V2 had a "Literal_" prefix in
their names....
> In v3 probably was some changes in architecture,
> Which prevent from this nice automatic feature ..
>
>
> Hmm. Actually it is not good, when a newer version loose nice features.
> :-)
>
> Again, thank you very much Jim for points.
>
>
>
> ==========
> Before click SEND button have come strange [and OPTIONAL] question to mind.
>
> If v3 was designed to support old AST operators ^ !
> And new re-write rules (ok for new)
>
> But why was trashed feature of ## = (IMAGE_TOKEN, ##) ?
> picture is broken.
> two operators self cannot resolve all tasks ..
>
>
> If it was not touched, then porting was much easier I think.
>
> Or I do not see big idea behind of this step?
>
>
--
Kevin J. Cummings
kjchome at verizon.net
cummings at kjchome.homeip.net
cummings at kjc386.framingham.ma.us
Registered Linux User #1232 (http://counter.li.org)
More information about the antlr-interest
mailing list