Git Product home page Git Product logo

cs-f363's Introduction

CS-F363

Compiler Construction Group 34

INSTRUCTIONS (for Linux)

  • clone this repo: git clone https://github.com/diveshuttam/CS-F363
  • cd CS-F363
  • create a folder named build in the above directory: mkdir build
  • run make deubg for running with debug output (runs always automatically with file a.mylang to save time during debugging)
  • run make all for output without debug statements (asks for which file to compile)

Graphics output

  • run make graphics to print graphics output
  • create json file for tree using ./visualize_exe ./testcases/testcase1.txt ./testcases/testcase1.json
  • open visualize/visualize.html in a browser
  • select the json file (here testcases1.json) to visualize the tree output

One can also visualize a json file at https://diveshuttam.github.io/CS-F363/graphics/visualize

AST

Notes:

  • Remember to free whatever is malloc'ed else we get random malloc errors

cs-f363's People

Contributors

diveshuttam avatar rk224 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

ayushjain1144

cs-f363's Issues

To check before submission

  • add -O3 flag to the final build in makefile
  • add profiling (gprof) and memory leak test (valgrind) in makefile
  • Remove outside sources, (pdf's etc) from repo

Lexer TODO's

  • Implement Hash table for checking keyword. Though keyword checking is only few lines of code (5-10), implementing hash table will take time.
    • I think, since there are only a few keywords we can come up with a really good hash function with decent performance like checking just 1'st few (1-2) charachters, there will be very few clashes and won't require much memory either.

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.