[antlr-interest] bug: token names stored with enclosing quotation marks

Maurizio de Pascale mdepascale at dii.unisi.it
Wed Jan 3 06:34:07 PST 2007


Hi,
I've noticed that token names specified in the tokens section of the 
lexer get (wrongly?) stored with the enclosing quotation marks:

tokens
{
    IDENTIFIER = "identifier";
}

const char* TestParser::tokenNames[] = {
    ...
    "\"identifier\""
    ...
}


while those specified in the paraphrase option for the token get stored 
without, just like implicit names assigned to unnamed tokens.


IDENTIFIER
    options{paraphrase = "identifier";}
   
const char* TestParser::tokenNames[] = {
    ...
    "identifier"
    "LPAREN"
    ...
}



using ANTLR2.7.7/C++


More information about the antlr-interest mailing list