wxfcc / clite Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tranquilmarmot/clite
A C-lite compiler written in Java
This project forked from tranquilmarmot/clite
A C-lite compiler written in Java
Nate Moore CLite Java Parser There are four folders: src - All source files bin - Compiled class files doc - Generated javadocs (open Index.html to view) programs - Test programs to run with interpreter To run, do 'java Runner ../programs/[program name]'. It should work with all the test programs. I removed all the main methods from everything except the runner, but I suppose I could add them back if you wanted to test each part individually. I managed to complete all the parts that were labeled "student exercise" in the code (and then some), which I'm pretty sure covers all the labs (I didn't follow the labs, just "played it by ear"). Overall, this whole thing was almost trivial for me; I've implemented a lot of stuff similar to this before for various projects. I kind of tore up the source code that the book gave me. I created four packages- syntax, parser, typing, and interpreter- to further distinguish the different parts of the program from each other. I also added a TON of comments and full javadocs. Inside of the 'syntax' package is the abstract syntax. I split the abstract syntax up into multiple classes inside of a few seperate subpackages, rather than having them all crammed into one file like they had it (the abstract syntax didn't make much sense to me until I did this, then it became immediately clear). Inside of the 'parser' package is the Lexer and the Parser. No drastic changes here. Inside of the 'typing' package is the StaticTypeChecker, TypeTransformer and TypeMap. Inside of the 'interpreter' package is the Semantics and State. I renamed the "Semantics" class to "Interpreter" because the name made more sense to me. I didn't get around to implementing arrays, but I could probably do so easily.
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.