[antlr-interest] new blog entry for tree parser
Terence Parr
parrt at cs.usfca.edu
Tue Jun 28 14:32:04 PDT 2005
Hi,
http://www.antlr.org/blog/antlr3/treegrammar.tml
has an example simpleC AST construction and tree parser. I love the -
> syntax! For example, this is cool:
functionHeader
: type ID '(' ( formalParameter ( ',' formalParameter )* )? ')'
-> ^(FUNC_HDR type ID formalParameter+)
;
Note the + in the rewrite section and the imaginary token. :)
Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
More information about the antlr-interest
mailing list