Skip to content

Lexical analyser, Parser, AST to generate tokens for arithmatic expressions and compile using llvm and clang

Notifications You must be signed in to change notification settings

gurneesh/test-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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).

About

Lexical analyser, Parser, AST to generate tokens for arithmatic expressions and compile using llvm and clang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages