Abstract Syntax Trees

Andrew Wilkinson ajw126NO at SPAMyork.ac.uk
Wed Sep 11 09:48:56 EDT 2002


What an idiot I am! It was the fact that it didn't have a new line at the
end that was causing the problem.

It does seem strange that the file will run fine, but you can't access it's
syntax tree. That looks suspiciously like a bug to me...

Thanks,
Andrew

"holger krekel" <pyth at devel.trillke.net> wrote in message
news:mailman.1031743334.4015.python-list at python.org...
> Andrew Wilkinson wrote:
> > Hi,
> >
> > I'm having a lot of trouble trying to get the parser and compiler
modules to
> > properly parse some files.
> >
> > At the moment the trouble seems to be with any loop construct (i.e. for
or
> > while).
> >
> > If you create a test file like this...
> >
> > ---
> > for i in range(10):
> >     print i
> > ---
>
> make sure that this file has a newline at the end.
>
> others would say, get a better OS :-)
>
> regards,
>
>     holger
>





More information about the Python-list mailing list