[antlr-interest] Expected token apparently not expected?!

Terence Parr parrt at cs.usfca.edu
Thu Sep 9 11:23:44 PDT 2004


Sounds like a mismatch between the token type (an int) between the 
parser / lexer.  Check importVocab if in separate files...

Ter
On Sep 9, 2004, at 11:13 AM, David Bullock wrote:

> Hi folks,
>
> I have a simple lexer which defines:
>
>  DASH
>   : '-'
>   ;
>
> And a simple parser which uses the DASH token.
>
> But I'm getting an exception that says:
>
> Exception in thread "main" line 1:12: expecting DASH, found '-'
>         at antlr.Parser.match(Parser.java:213)
>
> Which is way too tricky for me!  Any clue
> what might be going wrong?
>
> thanks,
> David.
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list