Skip to content

xin-w8023/simple_c_compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to build the toy

mkdir build
cd build
cmake ../
make -j 4
cd ..
./build/scc example/main.scc

the output will be an abstract syntax tree like following.

BinaryExpression
*  [x]: Variable
*  [=]: Assignment
*  BinaryExpression
*  *  UnaryExpression
*  *  *  [-]: Negative
*  *  *  [y]: Variable
*  *  [+]: Plus
*  *  BinaryExpression
*  *  *  BinaryExpression
*  *  *  *  BinaryExpression
*  *  *  *  *  [2]: Constant
*  *  *  *  *  [*]: Star
*  *  *  *  *  [3]: Constant
*  *  *  *  [/]: Slash
*  *  *  *  BinaryExpression
*  *  *  *  *  [2]: Constant
*  *  *  *  *  [+]: Plus
*  *  *  *  *  [4]: Constant
*  *  *  [*]: Star
*  *  *  [1]: Constant

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published