[antlr-interest] ANTLR 3.1 gives RewriteEmptyStreamException, ANTLR3.0.1 does not ?
David Pearce
David.Pearce at mcs.vuw.ac.nz
Mon Sep 29 14:00:47 PDT 2008
Hi Terence,
Thanks for the quick response!!!
> Notice the ? is in the tree construction not the matching.
Ok, I hadn't noticed the difference. Yes, that might be exactly the
solution to my problem --- thanks!!
Dave
>>> classDeclaration
>>> : 'class' Identifier (typeParameters)?
>>> ('extends' type)? ('implements' typeList)?
>>> classBody
>>> ;
>>> ...
>>> classBody
>>> : '{' classBodyDeclaration* '}'
>>> ;
>>> ...
>>> classBodyDeclaration
>>> : ';'
>>> | ... [other productions]
>>> ;
>
> I don't understand the issue. Don't alter the matching, just add ? to
> the ast constr.
> Ter
--
Lecturer in Computer Science,
School of Mathematics, Statistics and Computer Science,
Victoria University of Wellington,
PO Box 600,
Wellington,
New Zealand.
Office: Cotton 231
Telephone: +64 (0)4 463 5833
URL: http://www.mcs.vuw.ac.nz/~djp
More information about the antlr-interest
mailing list