Giter Club home page Giter Club logo

soo's Introduction

#Soo Soo是简易的自制类C编程语言,支持基本的数据类型int,string,支持if,while语句类型,前端经过词法分析,语法分析,语义分析,后端生成自制虚拟机 Lvm 的目标代码.

##File:

  • Lsy_Lvm: lvm虚拟机源码
  • Lsy_Soo: soo编译器源码
  • test: 测试代码
  • pzi:截屏图片

##Building and Running:

###*nix: $ git clone https://github.com/Leviathan1995/Soo.git $ cd Lsy_Soo $ make $ ./Lsy $ cd ../Lsy_Lvm $ make $ ./Lvmachine

##Example:

  • 利用Soo画一个"心"

image

##Syntax:

  • 支持的int,string数据类型

  • 支持if,while语句类型

  • 支持函数,目前暂不支持参数传递

  • 注释使用"#"

  • 每行代码结束无须使用";",直接换行即可

  • 定义变量使用"var"关键字:

      var int i,j,k
      or
      vat string heart
    
  • 定义函数使用"def"关键字:

      def heart()
      {
      
      	...
      	代码语句
      	...
      }
    
  • if条件语句:

      if(表达式)
      {
      	...
      	代码语句
      	...
      }
    
  • while条件语句:

      while(表达式)
      {
      	...
      	代码语句
      	...
      }
    
  • 终端输出使用print():

      print("hello world")
      or
      print(variable)
    

###Lincense:

	MIT

soo's People

Contributors

choleraehyq avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.