Has anyone implemented BASIC in Python?

Leif K-Brooks eurleif at ecritters.biz
Mon Aug 23 09:37:38 CEST 2004


Andrea Griffini wrote:
> Writing an interpreter that executes directly a parse tree of
> a structured language program is IMO *easier* than writing an
> interpreter for an unstructured language program.
> That's why I think that starting from BASIC is not a good idea.

I see what you're saying now. I had entirely forgotten about GOSUB and 
FOR (I haven't used BASIC for a very long time, thank God), so I was 
thinking thinking about stackless code with IF and GOTO for flow control.

Thanks a lot for the detailed replies, by the way; they've been very 
helpful.

> Writing parsers, interpreters and compilers is a lot simpler than
> many do think.

Is there a (virtual) book you would recommend reading to learn about 
writing them? A course isn't really possibly for me, so I'm hoping that 
isn't the only option.



More information about the Python-list mailing list