[antlr-interest] What does this error mean in english?

Christopher Laco claco at chrislaco.com
Mon May 11 19:20:25 PDT 2009


"mismatched tree node: DOCUMENT expecting DOCUMENT"


I'm not having very good luck trying to do simple things apparently.

My ToStringTree:


    (DOCUMENT (PRINT 'variable'))


My tree grammar:


  document

: ^(DOCUMENT statement*)

;

  statement

: ^(PRINT LITERAL)

;


More information about the antlr-interest mailing list