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

Vivek Kumbhojkar vkumbhojkar at gmail.com
Fri Sep 10 02:47:55 PDT 2004


Hi David ,

You can try this dash is nothing but the UNICODE so simply add 
charVocabulary='\u0000'..'\uFFFE'; in your options and declare range
in lexer like
IDENTIFIER :
	( '\u0080'..'\ufffe' | 'a'..'z' | 'A'..'Z');

Hope this will work

Vivek Kumbhojkar
(Worksoft, Dallas)

On Thu, 09 Sep 2004 18:13:17 -0000, David Bullock <db at dawnbreaks.net> 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
> 
> 
> 
> 
>



 
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