Giter Site home page Giter Site logo

stefanomunari / fac Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 703 KB

F Academic Compiler

License: Other

Python 37.54% Makefile 6.59% C 54.69% C++ 1.17%
abstract-syntax-tree bison c compiler flex front-end lexer three-address-code toy-compiler toy-programming-language

fac's People

Contributors

herrbez avatar stefanomunari avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

herrbez

fac's Issues

review parser and merge it into master

merge parser into master after all the other enhancement and bug tickets have been closed

Note:
the person who completes parser cannot be the same one who reviews and merges it into master

Improve README - parser

Briefly explain what this thing does
how to compile it
how to run it
how to test it
how to generate the dev documentation

insert a reference to FAC-docs

Fix C printer

The printer generates a C program which does not skip the branch labels

Memory Leaks

Using valgrind our program shows some memory leaks.
They should be due to the temporary variables allocated on the stack.

You can view where these are created with this valgrind invokation (for instance!!!):
valgrind --leak-check=yes ./bin/fac examples/ex1.f C

Improve readability

Improve readability in general but particularly assignment of type x=y. I think that x = y is easier to read

complete parser

check ex and add other examples if necessary
check if everything works properly

Note:
the person who completes parser cannot be the same one who reviews and merges it into master

Decide how to treat statement with no effect

We should decide where and how to treat statement with no effect.

If we parse them and then simply ignore them during the syntactic analysis, we encounter problems in the if and while TAC generation, because we assume that the body of the statements and especially of the if is not NULL.

I have two solution' proposals:

  1. Avoid sintactically the statement --> stmt expr SEPARATOR. The advantage of this solution is that it does not affect the rest of the program.
  2. Solve them during TYPE-checking so that we can accept this kind of statement and then remove dead code. Advantage: gcc like and more powerful - Disadvantage we have to modify (massively??) the type checker to control if the bodies of if and while are not empty

write tests - cunit

once parser is done rebase it into cunit and proceed with the tests
write most significant tests for the project (use cunit branch)

Tidy-up remote history

It is the last issue to complete. Squash duplicate commits. Fix useless one. Filter deprecated files from the project tree.

Eliminare tac_test ?

Secondo me una volta che abbiamo tutti i printer, il file tac test va eliminato. Ricordiamoci prima della consegna.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.