[antlr-interest] newbie question - mismatched input/token

Ashish asengine at gmail.com
Fri Jan 18 09:48:17 PST 2008


I'm seeing this when running the grammar in antlrworks 1.1.5 on vista.
The same grammar works fine when using antlr 3.0.1 via the
command line( java org.antlrTool ...; javac*.java; java ...).

Anyone else seen this behaviour ?

Thanks
Ashish



On Jan 18, 2008 12:17 AM, Gavin Lambert <antlr at mirality.co.nz> wrote:

> At 12:15 18/01/2008, Ashish wrote:
> >I'm trying to come up with a custom select statement. However,
> >for the
> >simple grammar and input I get a mismatched-token error - see
> >details below.
> [...]
> >//Input
> >SELECT a FROM b
> >
> >//Error message:
> >recoverFromMismatchedToken
> >BR.recoverFromMismatchedToken
> >line 1:0 mismatched input 'SELECT' expecting FROM
>
> The grammar all looks fine to me.  Are you sure you're choosing
> "prog" as your start rule?  (Also, generally speaking, your start
> rule should have EOF at the end to make it give an error if it
> can't match the entire input.)
>
> >SELECT : 'select'|'SELECT';
> >FROM : 'from'|'FROM';
> >WHERE : 'where'|'WHERE';
>
> Note that these are insufficient for true case insensitivity.  It
> won't match "Select" or "sELeCt", for example.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080118/348b1c63/attachment-0001.html 


More information about the antlr-interest mailing list