Skip to content

streetartist/minor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minor Language

The project we watch

  • pylite pylite是一个用于编译原理教学的python解释器,通过学习它的源代码可以了解python编译器和虚拟机是如何工作的。

pycom是编译器,由5000行代码构成。pyvm是虚拟机,由6000行代码构成。

Demo

Demo

Grammar

Grammar

Subject

Code Parser

Version

version 0.1.1

Rely

rply

Usage

build-in function:

  • print:
    >>> print, 'hello\npeter'
    ... hello
      . peter
    
  • quit:
    >>> $quit
    

How to test

Run the command to test at the root of this project (the sign $ means the prompt of Linux):

$ make test

if your computer do not have the command make, please click here for more infomations.

TODO

  • command print:

    >>> print, "this", "that", " ", 1 + 5 * 10
    ... thisthat 51
    
  • add a test for AST/string

  • command if-elif-else

    if n > 1:
      do something
    elif n < 1:
      do something
    else:
      do something
    
  • command type

    type:
      text
      number
      bool
      var
      int\float\...
    
  • on C++

About

一个用python3写的编程语言

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published