plc_script - super tiny programming language

plc_script - a super tiny programming language intended for learning about parsers, compilers and virtual machines.

Author: Goran Trlin

The plc_script GitHub repository includes:

  • LL(1) parser
  • AST interpreter
  • regular expression based tokenizer

Supported language features:

  • variable declaration and assignment
  • numbers and strings as builtin types
  • binary operators (==,<,>)
  • addition, subtraction, multiplication, division operators
  • user defined function definitions and calls
  • builtin functions (only one at the moment - printIt())
  • if else statement
  • while loop statement
  • comments (//)

Feel to play with this language to modify or expand its features. I hope you find it useful while learning about compilers, languages and virtual machines.

Full source code is available on GitHub