[antlr-interest] RE: ANTLR Optional statements

Ric Klaren klaren at cs.utwente.nl
Tue Apr 9 02:26:14 PDT 2002


Hi,

On Mon, Apr 08, 2002 at 04:42:23PM +0100, David Wigg wrote:
> However, the optional statements shown at the end of this production
> no longer produce an optional construction ("if" statement) because
> optional statements now need to know what could legitimately follow as
> well. Unfortunately, in our case, ANTLR seems to have forgotten that
> LCURLY has to follow this, and throws a NoViableAltException (because
> there is no alternative to ID (other than EOF).
> 
> Is this correct? If so, we will have to recast the g file somehow.

Could you send me the conversion of the grammar so far, that way I can
verify if this is a problem in a) antlr, b) cpp-codegen, c) the grammar.
Bughunting is not possible without a complete input demonstrating the
problem.

Thanks,

Ric
--
-----+++++*****************************************************+++++++++-------
    ---- Ric Klaren ----- klaren at cs.utwente.nl ----- +31 53 4893722  ----
-----+++++*****************************************************+++++++++-------
     Human beings, who are almost unique in having the ability to learn
   from the experience of others, are also remarkable for their apparent
         disinclination to do so. --- Douglas Adams, Last Chance to See


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list