Skip to content

Compiler / Interpreter for Mini-PL programming language

Notifications You must be signed in to change notification settings

epicharri/compiler_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Compilers project

Mini-PL interpreter.

The program should be runnable using the development tools available at the Computer Science department of University of Helsinki, because it is written and tested using the computer managed by CS department. In the computer, the newest version of Python is Python 3.6.9, and it is used for running the program.

To interpret a program, give the file path of the source code file as the first parameter.

For example:

python3 minipl.py sample_programs/sample6.mpl

Notice you may have Python 3 as a default. Then, instead of python3 you may use python.

In addition, you can use the following parameters:

Parameter Description
--print-tokens To print tokens during parsing.
--print-ast To print AST.
--print-debug-info To print information during debugging.
--print-symbol-table To print symbol table after parsing, semantic analysis, and execution.

For example, to pretty print AST of the mini-PL program reachable in sample_programs/sample6.mpl, write the following.

python3 minipl.py sample_programs/sample6.mpl --print-ast

About

Compiler / Interpreter for Mini-PL programming language

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published