[antlr-interest] treewalker as interpreter

Terence Parr parrt at jguru.com
Sun Feb 24 22:13:47 PST 2002


On Sunday, February 24, 2002, at 10:01  PM, marc_schellens wrote:

> I would like to use a tree-walker as
> an interpreter.
> One necessary thing then is, to be able to
> 'jump' meaning to explicitely set the next
> AST node to be parsed and jump out of a rule
> immediately.
> What would be the best way to do so?

I would have a instruction "cracker" routine that basically figured out 
what tree fits with the instruction.  Then I'd have just a list of these 
suckers in the tree grammar (i.e., lots and lots of start rules).  Then 
I'd call them individually to parse/handle that kind of element.

Ter
--
Chief Scientist & Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list