[pypy-dev] scheme parser.
Carl Friedrich Bolz
cfbolz at gmx.de
Thu May 10 16:20:54 CEST 2007
Armin Rigo wrote:
> Yes, that's even more true for Scheme, where the AST is very simple.
> For now you should just interpret it, and we can see later if speed-ups
> can be achieved with bytecode. Also, if you are directly using
> rlib.parsing, then you don't need any pickling: parse the source into an
> AST, and pass the AST objects directly to the interpreter. (We can
> think later if it makes sense to add an equivalent of the .pyc files,
> but that's really questions for the very long term only.)
I kind of hope that the parser is fast enough to not have to cache the
trees for "reasonably" sized programs. I haven't measured them, but the
lexing and parsing algorithms have nice bounds. In addition, it's
probably simple to have a generic pickle format for parse trees that
could be re-used across all users of rlib/parsing. But for Scheme even
that is probably too much work, since the data structures should be very
easy to serialize.
Cheers,
Carl Friedrich
More information about the pypy-dev
mailing list