sdevlin / blang Goto Github PK
View Code? Open in Web Editor NEWcompiler in C for a toy C-like language
compiler in C for a toy C-like language
This is a simple compiler for a toy C-like language. It is built in C using Flex and Bison to generate the lexer and parser. This is the compiler I was supposed to write for my compilers class in spring 2006. I finally got around to it on a few random weekends in 2010 and 2011. Information about the language is available here: http://www.cse.nd.edu/~dthain/courses/cse40243/fall2008/ (Note that this is the course site for a more recent iteration of the class.) I've renamed my version of the language to 'blang' just in case this project is still in use. (I.e. so current students don't stumble upon it.) I've added a few modifications to the language description. My version supports type inference of variables that are initialized during declaration. This is done via the keyword 'var' a la C#. Another modification is a series of optimization passes. In particular, many constant expressions can be reduced, and some unused variables can be excised from the output assembly. The test dir contains a few test cases, but these are not close to being exhaustive. test/generate probably contains the most useful examples. (I should also note that the hash table implementation here was not written by me. It was provided as part of the assignment.)
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.