Skip to content

This is a parser that I created using ANTLR. This parses the translation unit file generated by GCC when using the -fdump-translation-unit flag.

License

Notifications You must be signed in to change notification settings

cleversonledur/GCCTranslationUnitParser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GCCTranslationUnitParser

This is a parser that I created using ANTLR4. This parses the translation unit file generated by GCC when using the -fdump-translation-unit flag. My objective was to use semantic information of this file to improve AST construction.

##How to compile?

-Enter in the SRC directory

cd src [enter]

  • Call make file

make [enter]

##How to use?

  • Call the tuparser binary inside BIN folder and pass as argument the file generated by G++ with the -fdump-translation-unit flag.

bin/tuparser [filename].tu

-Example:

bin/tuparser bubblesort.cpp.001t.tu

##How to develop new things using Tuparser?

  • In the main.cpp code, you can implement your functions to navigate the generated AST.
  • In the thetuparser.g4 you can modify the grammar to insert new information or improve the generated AST.

##Contributors

  • Fell free to contribute for this project by forking this repository and sending pull requests.

##Contact

About

This is a parser that I created using ANTLR. This parses the translation unit file generated by GCC when using the -fdump-translation-unit flag.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published