[antlr-interest] Repeated explicit evaluation of the tree in ANTLR3.
pganelin
ganelin at mail.com
Tue Aug 7 18:00:55 PDT 2007
After I switched from ANTLR V2 to ANTL v3 I found that I can not
> walk repeatedly over the same tree multiple times within tree
> walker. To illustrate the problem I choose (Visual) Basic as a well
> known interpreted language.
>>see my tutorial. seek on the stream.
>>Ter
>
>
Terence,
Do you mean this reference?
http://www.antlr.org/wiki/display/ANTLR3/Simple+tree-based+interpeter
with the example how to process CALL?
It does answers the original question, but I still have a more general question:
What was the reason for dropping first argument from all tree calls. Using push/pop method to essentially pass a parameter has some disadvantages.
The most evident: the call to pop should be within the "finally" clause to guard against mismatched pop in case of exception.
PS. I thought all the answers should be in the paid-for book not in some free materials on Internet :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070807/6ab90c86/attachment-0001.html
More information about the antlr-interest
mailing list