[antlr-interest] Keyword match

Ersin Er ersin_er at yahoo.com
Wed Aug 24 03:49:48 PDT 2005


Hi all,

I have problem with keyword in my language. Here is a simple production
(some action code ommited for briefness):

ss_base :
    "base" l_name=localName
    {
        // do something with l_name
    }
    ;

What ANTLR says about this grammar is:

"unexpected char 'b'"

The 'b' here is the 'b' of the "base". I face the same problem with all
my keywords. ANTLR allways complain about the first character of any
keyword in the parser productions. I did the testLiterals trick but it
did not help and in fact I do not have an identifier type)

Can you help please?

Greetings.

-- Ersin


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail


More information about the antlr-interest mailing list