[antlr-interest] Nested Tree Construction vs. Recognition
Terence Parr
parrt at cs.usfca.edu
Thu Jul 5 08:46:05 PDT 2007
On Jul 5, 2007, at 7:06 AM, Randall R Schulz wrote:
> Hi,
>
> I'm curious about whether it's possible to write tree grammar rules
> whose right-hand-sides (or alternatives thereof) can have nested tree
> node structure.
>
> I can use such nested structures when generating tree content (an AST,
> i.e.). E.g.:
>
> module
> : Open CLModule interpretableName
> ( Open CLExcludes name* Close )?
> phrase*
> Close
> -> ^( CLModule interpretableName ^( CLExcludes name* )? phrase* )
> ;
Someone had same problem last week:
http://www.antlr.org:8888/browse/ANTLR-129
Ter
More information about the antlr-interest
mailing list