[antlr-interest] Expecting EOF?

William v Doorn williamvdoorn at gmail.com
Sun Apr 11 09:16:14 PDT 2010


Hello all,

So I've been writing my own small language build from the examples inside
the book of Terency parr. But now I'm getting the following error:

C:\antlr>java -cp
.;antlr-3.0.jar;stringtemplate-3.0.jar;antlr-runtime-3.0.jar;a
ntlr-2.7.7.jar Test < input.txt
line 0:-1 mismatched input '<EOF>' expecting NEWLINE

Isn't a NEWLINE the same as an EOF? And, what's line 0:-1? I've attached the
Eval and expression parser and the input file I used.

Thanks,

William van Doorn
-------------- next part --------------
functie f(x) is {
	a is x + 5
	2*a
}
f(10)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Expr1.g
Type: application/octet-stream
Size: 1213 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100411/336ab363/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Eval1.g
Type: application/octet-stream
Size: 5403 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20100411/336ab363/attachment-0001.obj 


More information about the antlr-interest mailing list