Writing a Language Interpreter with Python Lex-Yacc (PLY)
Experience Level: all
Learn how you can write a programming language interpreter over a weekend!
- timeslot: Monday 7th April 2025, 14:00-15:00, Room B
- tags: other
Python Lex-Yacc (PLY) [1] is a parser-generator that can be used to quickly write an interpreter for a programming language. I’ve recently written a Basic interpreter over a weekend. The talk will cover how the usual statements are implemented and give particular attention to expression parsing. The takeaway is that it might be easy to quickly implement a domain specific language or a “real” programming language.
The obvious question: “WTF: Why Basic?” will also be answered during the talk.
The Basic interpreter Yabasi (Yet Another Basic Interpreter) is available on github and pypi [2][3].
[1] Python Lex-Yacc by David M. Beazley
https://www.dabeaz.com/ply/ply.html
[2] Yet Another Basic Interpreter: Yabasi on github
https://github.com/schlatterbeck/yabasi
[3] Yet Another Basic Interpreter: Yabasi on pypi
https://pypi.org/project/yabasi/
Dr. Ralf Schlatterbeck
see https://runtux.com/
