Skip to content

marklin2234/ppython

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PPython

How to use

  1. clone git repository to your local directory
  2. Run
python3 ppython.py

to use it in the terminal.

How it works

The Lexer tokenizes user input, and stores it in an array. The tokens are passed into the parser, which converts the token array into an abstract syntax tree. This lets the interpreter know the order to execute the current line.

Variables can be declared using:

my_variable = 10

and are simply stored in a variable table locally. Typing is handled under the hood.

Currently, only basic arithmetic is supported. For example,

> a = 10
> (13 + a) * (2 - a)
-184

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages