[antlr-interest] condition not tested in the lexer : bug in code generation ?

Anthony Brenelière abreneliere at telys.com
Mon Jun 23 11:16:40 PDT 2003


I have the following rule in the lexer :

 

DELIMITER   :

      { !bInCIAOContext }? ('\244' (WS_CC)? STAT_ID (WS_CC)? '/')=>
'\244'

            {

                  this->bInCIAOContext = false;

                  this->bInInfoContext = false;

                  $setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);

            }

      | { bInCIAOContext }? '\244'

            {

                  this->bInCIAOContext = true;

                  this->bInInfoContext = false;

                  $setType(ANTLR_USE_NAMESPACE(antlr)Token::SKIP);

            }

;

 

The first condition is { !bInCIAOContext }? and works correctly.

 

The second condition is { bInCIAOContext }? And does not seem to appear
in the generated code.

 

Is it a bug ? Or is my rule syntax incorrect ?

 

Cordially,

Anthony Breneliere

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20030623/6f9963bb/attachment.html


More information about the antlr-interest mailing list