[antlr-interest] Keyword match
Ersin Er
ersin_er at yahoo.com
Wed Aug 24 04:48:01 PDT 2005
Hi,
I have more information about the problem now:
If I do not have an identifier rule and if I have keywords in the
grammar then the problem I explained in my previous mail (below) occurs
(and this is normal I think). If I have include the indentifier rule in
the lexer and if I do the testLiterals stuff and when I try to test the
parser it just HANGS without any messages.
Now, is there any suggestions?
-- Ersin
--- Ersin Er <ersin_er at yahoo.com> wrote:
> 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
>
--
Ersin ER
Arastirma Gorevlisi
Hacettepe Universitesi
Bilgisayar Muhendisligi Bolumu
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the antlr-interest
mailing list