/CalculatorLanguage

a toy compiler and a naive stack virtual machine

Primary LanguageC++

CalculatorLanguage

简介(introduction)

  • 计算器语言的词法分析器、语法分析器、代码生成器和虚拟机实现。
  • a naive implementation of lexer,parser,code generator and virtual machine.

已完成功能(what have been supported)

  • 支持int,bool,float,structure四种数据类型。
  • int,bool,float,structure data types.
  • 支持函数声明与递归调用。
  • function decalaration and recursive function calling.
  • 支持while语句和if语句。
  • while statement and if statement.
  • 自动内存管理。
  • gc.

待做(todo)

  • 支持void,数组
  • void,array
  • 更好的错误提醒和恢复
  • better error detection and recovery
  • try catch 语句
  • try catch statement

References

[1]wgtcc https://github.com/wgtdkp/wgtcc
[2]c11 Committee Draft