Skip to content

Files

Latest commit

 

History

History

projects

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PLY Examples

  1. Simple Calculator (calc.py) - A Simple Calculator with +, -, *, /, % and Power
  • command - python calc.py
  1. Calculator with Complex Number Support(complex.py) , can perform +, -, *, / and Power on complex numbers, pass complex number (real,imag)
  • command - python complex.py
  1. Single Expression AST(ast.py) - Will generate AST for single expression link a+b,a-c,a/d,a*d. Run this file using ast.sh
  • Change Permission of ast.sh to executable first and run this command
  • commmand - ./ast.sh python_filename(ast.py) generating_dot_filename(eg. graph.dot) generating_pdf_filename(eg. graph.pdf)
  1. Full AST(complete_ast.py) - Will generate a full AST for given expression. Run using c_ast.sh(Inst. in c_ast.sh comments)
  • Change Permission of ast.sh to executable first and run this command
  • command - ./ast.sh python_filename(here it is complete_ast.py)