[antlr-interest] Re: Keeping lookahead low

Ciaran Treanor ciaran.treanor at gmail.com
Wed Aug 24 09:08:55 PDT 2005


> Can anyone tell me why the parser fails with the following error when
> it endounters 'Th' or 'Thing'?

Oops - I forgot to include the error. Here it is:

Exception in thread "main" line 2:11: expecting 'i', found ' '
	at com.ct.test.TestLexer.nextToken(TestLexer.java:120)
	at antlr.TokenStreamHiddenTokenFilter.consume(TokenStreamHiddenTokenFilter.java:38)
	at antlr.TokenStreamHiddenTokenFilter.nextToken(TokenStreamHiddenTokenFilter.java:134)
	at antlr.TokenBuffer.fill(TokenBuffer.java:69)
	at antlr.TokenBuffer.LA(TokenBuffer.java:80)
	at antlr.LLkParser.LA(LLkParser.java:52)
	at antlr.Parser.match(Parser.java:210)
	at com.ct.test.TestParser.systemBlock(TestParser.java:82)
	at com.ct.test.TestParser.testFile(TestParser.java:61)
	at com.ct.test.TestParser.main(TestParser.java:31)

Cheers,
ct


More information about the antlr-interest mailing list