[antlr-interest] Tree walking Q

Gerald B. Rosenberg gbr at newtechlaw.com
Sat Jun 4 15:37:33 PDT 2005


The basic question: Is there a way to set a default token rule for use 
during tree parsing?  The objective is to skip tokens that are not within a 
select subset that are to be processed by a particular tree-parser run.

My AST is rather large and complex, to the point where I cannot, as a 
practical matter, define tree-parser rules for all potential tokens.  The 
ANTLR generated tree-walker quits if it encounters an unknown token.

Is there a default rule identifier?  Or, is there another mechanism to 
enable the tree-parser to simply walk past those tokens not otherwise 
identified to the parser?

Thanks,
Gerald
----
Gerald B. Rosenberg, Esq.
NewTechLaw
285 Hamilton Avenue, Suite 520
Palo Alto, CA  94301-2576

650.325.2100  (office)  /  650.703.1724  (cell)
650.325.2107  (fax)

www.newtechlaw.com




More information about the antlr-interest mailing list