Skip to content

Sinon02/MiniPython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 

Repository files navigation

python-interpreter

a simple python interpreter mainly implemeted by lex and yacc.

How to use it?

  1. cd ./2019-compiler-lab/
  2. make (or you can use ./make.sh or g++ y.tab.c)
  3. ./a.out
  4. then you can input instructions and MiniPython will operate
  5. use CTRL-C or quit() to end MiniPython

Functions to implement

  1. data structure: int,real,string,list
  2. arithmetic operation: +,-,*,/
  3. operations: append(),range(),print(),len(),list(),etc.
  4. index and slices operations for list and string.
  5. assignment operation.
  6. Others to add...

Tasks

  1. search and collect the syntax of python and list them all together.
  2. implement the arithmetic operation of INT and FLOAT
  3. design the data structure that is equivalent to list in Python.
  4. realize the string with index and slices operation.
  5. implement the list with range(),append(),print(),etc.
  6. Others to add.

About

A lex and yacc implemented python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages