Skip to content

Minimal interpreter for a small university language implemented with PLY (lex/yacc).

Notifications You must be signed in to change notification settings

zaibugemi/Yet-Another-Programming-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet-Another-Programming-Language

Minimal interpreter for a small university language implemented with PLY (lex/yacc).

Prerequisites

  • pip install ply

Quick start

  1. Install dependency: pip install ply

  2. Run the interpreter on a source file: python interpreter.py test_cases\variables.txt

Included test cases (examples)

  • test_cases\variables.txt
  • test_cases\structs.txt
  • test_cases\expressions.txt
  • test_cases\standard_output.txt

Notes

  • The interpreter script constructs the lexer and parser from the lexer.py and parser.py modules.
  • If you edit grammar or parser code and want PLY to regenerate tables, remove parsetab.py (it will be recreated) or set write_tables=True in yacc call.
  • Usage: python interpreter.py

About

Minimal interpreter for a small university language implemented with PLY (lex/yacc).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages