Coder Social home page Coder Social logo

compile_construction_course_project_spring_2012's Introduction

** to compile optimally **

make clean
make


** to run on input files **

./parser < lexer_test.pas
./parser < test2.pas
./parser < test3.pas


** to examine output **

cat symtable.out (<-- this output is not used since each scope now has a symbol table)
cat rules.out


/*

   note:

    1. Conflicts: 1 shift/reduce, 1 reduce/reduce

    2. The current symbol table does not have any name-mangling features (perhaps to be added in the foreseeable future).

    3. The current version only checks for type mismatch in simple assignment operations (i.e. assignment in the form of "a := b") but does not check for
       type mismatch in assignment of the form "a := b + c" (since specific language-dependent rules are needed to determine the type of the right-hand side
       and the project would become too complicated if all those rules have to be included).

    4. Many other things such as division by 0 are not handled yet (not part of the project though)

    5. Assuming all for loop have step size +1, and also because the for ? = ? to ? in PASCAL already implies an increment, an instruction in the form of
       ? := ? + 1 will be automatically printed in the TAC)

    6. A test case that failed was component selections in the form of c.d[e]
    
*/

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.