[antlr-interest] Strange problem with syntactic predicates

Ali Salehi salehiam at gmail.com
Sun Jul 29 05:09:49 PDT 2007


Hi all,
 I have a very simple grammar [only two lines] below (ErrGenerator.g) :

grammar ErrGenerator;
start : ('namely')=>'namely' | ('name')=>'name' | 'name';

Whenever i want to test this grammar using the antlr in the interpreter
[GUI],
I get the FailedPredicateException(start,{synpred1}?) error for a simple
input of 'namely' [without quotes].

As this grammar is tremendously simple, I appreciate if someone could help
me on this.

Best regards,
AliS

PS
- I know I can write this grammar in much simpler form. Actually my
main .g file is much
bigger [~200 lines] and the above sample
grammar generates the error I'm facing in my main .g file.


**************************************************************
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/20070729/eff9a2f8/attachment.html 


More information about the antlr-interest mailing list