[antlr-interest] "No viable alternative" error
Todd Nine
tnine at apigee.com
Sat Mar 24 20:03:51 PDT 2012
Hi guys,
I've attached my grammer file. I'm getting the "no viable alternative"
error when parsing.
This statement works.
"select * where a < 5"
This one fails
"select * where a lt 5"
I'm a bit lost as to why, my rule for expression is defined in this way.
//mathmatical equality operations
equalityop :
property LT<LessThan>^ value
|property LTE<LessThanEqual>^ value
|property EQ<Equal>^ value
|property GT<GreaterThan>^ value
|property GTE<GreaterThanEqual>^ value
;
Then LT is this in my tokens
LT : '<' | 'lt';
Any help would be greatly appreciated! All my operations for equality ops
do it, so I know I've defined something incorrectly in my grammer.
Thanks,
Todd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QueryFilter.g
Type: application/octet-stream
Size: 4852 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20120324/554daa08/attachment.obj
More information about the antlr-interest
mailing list