raeez / decaf Goto Github PK
View Code? Open in Web Editor NEWThe laziest compiler ever
License: Other
The laziest compiler ever
License: Other
BUILD SYSTEM ------------ In order to build, we're using the cabal build system; you should have the latest version of the Haskell platform installed. from the root directory, run: cabal configure cabal build cabal install And cabal will prepare, build and install the project binaries into ~/.cabal/bin. We suggest adding ~/.cabal.bin to your PATH environment variable. BINARIES -------- scanner -- utilize as 'scanner x', where x is the file you'd like to scan. scanner-repl -- utilize as in interactive REPL, to view the scanning of tokens in real-time parser -- utilize as 'parser x', where x is the file you'd like to parse. grapher -- utilize as 'grapher x', where x is the file you'd like to scan, parse and graph the resulting AST. requires the graphviz binary 'dot' installed on your system, (assuming it's on your PATH, else grapher fails) and outputs a 'outputfile.out.png', as the visuazlization of the AST. checker -- utilize as 'checker x', where x is the file you'd like to scan, parse and check for semantic errors. DEBUG ----- With exception of grapher, binaries output error messages if any errors are encountered, otherwise they output nothing. If the '-debug' flag is supplied, then the binaries always output debug output to stdout. DIRECTORIES ----------- dist/ compiled binaries, documentation etc. src/ source for binaries + utilities Decaf/ compiler codebase testsuite/ tests viz/ visualizations of graphs we've been working with
semi-illegal/illegal-43.dcf
semi-illegal/illegal-44.dcf
as title
generalize accessing the symbol tables and add this code to SymbolTable.hs
Add a layer of indirection to the semantic checker monad's use of the symbol tables
Implement more efficient symbol tables (maps etc.)
Candidates
* use a container (http://hackage.haskell.org/package/hashmap or http://hackage.haskell.org/package/unordered-containers)
Confirmed: Hash Maps are the current "industry standard" solution to fast lookups (as opposed to our current [SymbolRecord].
Generate a graph of the AST, and perhaps generalize graph rendering.
We need to merge my work with Scott's work, but in order for this to go cleanly, we should probably establish:
- good coding standards (see http://www.haskell.org/haskellwiki/Programming_guidelines and http://www.haskell.org/pipermail/haskell-cafe/2010-September/084006.html)
- an understanding of how to structure complex projects / programs
additionally, the merge should theoretically take the best techniques from each of our respective works and combine them (establishing our ultimate coding style in the process)
We currently map ALL '\t' -> ' ' characters in the input string to the scanner; this results in internal program strings having no tabs, when they should.
Possible Solutions:
Move eatFirst/eatNext in Decaf.Scanner to return 'unconsumed' input (i.e. move calculation of updated source position to a per-token-basis.
Perhaps consider a more general way of rewriting the tree (by writing generalized 'walk-functions')
Also, flatten the AST a bit (it's way too verbose atm)
- collapse the many levels of hierarchy surrounding operators
- collapse expressions into a more abstract form
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.