This repository contains code examples for a Compilers II class, demonstrating the usage of tools such as Flex, Bison, and Treecc. It also provides implementations of Abstract Syntax Trees (ASTs) and Control Flow Graphs (CFGs).
- Flex: A lexical analyzer generator.
- Bison: A parser generator.
- Treecc: An abstract syntax tree generator for C++.
- Lexical Analysis: Examples demonstrating how to use Flex and Re2C for lexical analysis.
- Syntax Analysis: Examples showing the usage of Bison and Lemon for syntax analysis.
- Tree Generation: Implementation of Abstract Syntax Trees (ASTs) using Treecc.
- Control Flow Analysis: Examples demonstrating the construction of Control Flow Graphs (CFGs).
Each directory contains standalone examples showcasing specific concepts. Follow the instructions in each directory's README.md file to build and run the examples.
This project is licensed under the BSD 3-Clause License.
Contributions are welcome! If you have suggestions for improvements or new examples, feel free to open an issue or submit a pull request.
- These examples were created as part of the Compilers II class, which I teach at UNITEC.
- Thanks to the creators of Flex, Bison, and Treecc for providing powerful tools for language processing.
For questions or feedback, please contact Ivan de Jesus Deras Tabora.