[antlr-interest] AST build with input tokens out of order

Bart Kiers bkiers at gmail.com
Thu Aug 18 12:19:02 PDT 2011


On Thu, Aug 18, 2011 at 8:53 PM, Robert Jarzmik <robert.jarzmik at free.fr>wrote:

>
> Just for the record, I had to change
> >     -> ^(IDENTIFIER ^( DIMS constant+) {new CommonTree(type)})
> into
>      -> ^(IDENTIFIER ^( DIMS constant+) {type})
>
> That might be linked with antlrworks-1.4.3.jar maybe ...
>
>
Both should work from the command line. Using `{type}` only "recycles" the
type-token, possibly causing two or more nodes to point to the same instance
of `type` (by default a CommonTree).

Regards,

Bart.


More information about the antlr-interest mailing list