Why must implementing Python be hard unlike Scheme?

Paul Boddie paul at boddie.org.uk
Thu Feb 21 12:35:58 EST 2008


On 21 Feb, 18:28, John Nagle <na... at animats.com> wrote:
>
>      Why?  It's not very difficult.  Get a parser for LALR(1) grammars,
> like YACC or Bison, write a tokenizer that understands Python indentation,
> hook up a dictionary, and parse the thing into a tree.  This is all
> covered in Compilers 101.  Get the Dragon Book if you don't know this stuff.

Or, if time is precious and you don't really care what parses your
programs (or even compiles them), just skip over this and use the
standard library compiler package:

http://docs.python.org/lib/compiler.html

Paul



More information about the Python-list mailing list