Skip to content

catarinacps/cpp-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-compiler

Hi! In this repository we’ll develop the final assignment for the INF01147 course: a bison and flex based compiler for a C-like language.

Table of Contents

Planned Stages of Development

The project will span the following steps:

StageDescription
E1Lexical Analysis
E2Syntax Analysis
E3Abstract Syntax Tree
E4Semantic Analysis
E5Code Generation
E6Execution Support
E7Optimization

Project Structure

The project is structured in the following fashion:

.
|-- include
|-- script
|-- src
|   |-- driver
|   |-- parser
|   `-- utils
`-- subprojects

7 directories

Dependencies

As previously noted, there are several dependencies in order to build this project:

  • meson
  • bison
  • flex

If not found, the project will pull the dependencies using the spack tool, pulled using git from its repository.

Build

There is a helper Makefile in order to facilitate the build, but it is recommended you instead use meson in order to build the executables.

Start by setting up the build

meson setup build

where build is the chosen build directory (meson only does out-of-source builds, much like cmake). Then, you can build the project using the following command:

meson compile -C build

Tests

There aren’t any, but eventually there will be!

Contact

You can contact me through my e-mail:

hcpsilva@inf.ufrgs.br (Henrique’s e-mail)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors