Skip to content

Takes a program in C-like language and creates an AST out of it.

Notifications You must be signed in to change notification settings

Amithabh-A/Abstract-Syntax-Tree-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

112101004 Amithabh A

Disclaimer

  • The assignment-4 tagged commit will only work on assignment 3 testcases
  • Code generation happens for declaration statements and main program(including return 0), but not happens for other statements.

How to Execute?

  • Go to compiler directory

    cd compiler
    
  • To generate compiler, run

    make
    
  • Now, the compiler is generated in bin/compiler.

  • To run compiler on an input .sil file, run ./bin/compiler <relative-path-to-input-sil-file>

    Example:

    ./bin/compiler test/input.sil
    
  • The assembly code will be generated in <relative-path-to-input-sil-file>.s file.

    Example:

    test/input.s
    

About

Takes a program in C-like language and creates an AST out of it.

Resources

Stars

Watchers

Forks

Packages

No packages published