[antlr-interest] Python Target

Benjamin Niemann pink at odahoda.de
Sat Jul 14 13:10:54 PDT 2007


Hello,

Edward Hartley wrote:

> I'm looking at the example grammar Expr.g from the book and when testing
> it with valid expressions like (3+4)*9 I get the output like the following
>>>> (3+4)*9
> line 0:-1 mismatched input '<EOF>' expecting NEWLINE
> 
> Is this behaviour correct or is it due to my having missed something:
> I retained the skip() call in the  NEWLINE rule.
> I don not get this behavior with the Java target and see the same as is
> described in the book.

I can't reproduce this. Are you sure that the input actually has a '\n' at
the end? How does your main script look like?

-- 
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/



More information about the antlr-interest mailing list