[antlr-interest] Problem with " => " operator
Gevik Babakhani
gevik at xs4all.nl
Tue Jun 19 14:43:18 PDT 2007
Hi,
the problem is solved by putting a ^ before (A) or just by removing () from
(A)
grammar t;
k : ^(A)=>A |A;
A : 'a';
Or
grammar t;
k : A=>A |A;
A : 'a';
Hope it helps.
_____
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Ali Salehi
Sent: Tuesday, June 19, 2007 11:07 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] Problem with " => " operator
Hi all,
I'm a beginner Antlr user, I bought the antlr v3 reference book and I'm
trying to get SQL-92 simplified select statement parser working.
I have some strange issues with the antlr, for instance, when I want to
test the following grammar inside AntlrWorks GUI:
grammar t;
k : (A)=>A |A;
A : 'a';
I see that antlr fails to parse my sample input which is simply the
character of "a" [without qutations ;) ].
It says: NoViableException
The grammar is so simple that I barely can see any error there, I appreciate
some comments
from more advanced users :-) .
Best regards,
AliS
**************************************************************
Ali Salehi, LSIR - Distributed Information Systems Laboratory
EPFL-IC-IIF-LSIR, Bâtiment BC, Station 14, CH-1015 Lausanne, Switzerland.
http://lsirwww.epfl.ch/
email: ali.salehi at epfl.ch
Tel: +41-21-6936656 Fax: +41-21-6938115
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070619/e099f127/attachment.html
More information about the antlr-interest
mailing list