项目作者: gurneesh

项目描述 :
Lexical analyser, Parser, AST to generate tokens for arithmatic expressions and compile using llvm and clang
高级语言: Python
项目地址: git://github.com/gurneesh/test-lang.git
创建时间: 2018-07-03T11:19:24Z
项目社区:https://github.com/gurneesh/test-lang

开源协议:

下载


Lexical analyser, Parser, AST to generate tokens for arithmatic expressions

Generates Tokens and represents in form of json
(shown in screenshot)

Arithmatic operations only on 8bit integers.

How to:

put your Arithmatic expression in input.toy

python3 main.py

llc -filetype=obj output.ll

clang output.o -o output
(gcc works on ubuntu 16.04 but not in ubuntu 18.04)

Note: the idea of this project is to build a really simple parser and lexical analyser, so make sure all your code is easy to read (avoid too much code in 1 line).