[antlr-interest] Re: woohoo! ParseTrees for free, Debugging
for me!
Ruslan Zasukhin
sunshine at public.kherson.ua
Sun Nov 30 13:14:53 PST 2003
on 11/30/03 9:16 PM, Terence Parr at parrt at cs.usfca.edu wrote:
>>>
>>> Interesting idea, though I suspect that since derivations are specific
>>> to an input stream using $FIRST and $FOLLOW are more useful.
>>
>> :-)
>>
>> It will be great to have at least ANY simply example,
>> How to use ANTLR on this task.
>
> Well, there is nothing automatic I'm afraid. What one needs is a way
> to trace precisely where in a grammar the parse is at any moment. Then
> one can ask "what can come next". This could be auto-generated pretty
> easily I'd say by having ANTLR build a Map from grammar position to
> "next symbols" for every token reference in the grammar. Then, in
> match() or whatever you'd set a variable called position. Then you can
> query the Map to figure out what is next.
>
> In the new ANTLR 3 stuff, you could keep around a copy of the grammar
> lookahead automaton so that you could just ask directly "what can come
> next". Doesn't help you now, but in the future this kind of thing
> should be easy.
Then we will wait for 3.0 :-)
Thank you, Terrence.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list