grnt426 / compiler Goto Github PK
View Code? Open in Web Editor NEWA Compiler for a theoretical instruction set called Hartz for my Minecraft CPU.
A Compiler for a theoretical instruction set called Hartz for my Minecraft CPU.
== Description == A compiler that translates C-style code into Hartz assembly, which can then be further compiled into a "binary executable" for a theoretical Minecraft CPU that is (and probably forever will be) in development. The idea is to support basic C-Style language constructs such as "if-else" branches, arithmetic, do-while loops, and function calls. The whole purpose of all this is to gain an understanding of compilers and to specifically create a working compiler for a highly limited machine (in both resources and instructions available). == Documentation == Author: Grant Kurtz Created: Dec 2012 The following categories breakdown into relevant sections for compilation. === Hartz Instruction Set === This lays out, albeit crudely, all the definitions of planned and currently supported hardware instructions, machine contraints, and some example code. * Hartz Instruction Set.txt === Productions === A list of productions that form all the language constructs that the C-Style compiler will break down. (Not Yet Added) == Software Dependencies == gcc v4.3.4 == Compiling == make [all|hartz|ccode] == Running == === Hartz Translator === ./translator (in-file) (out-file) === C-Style Code Compiler === ./compiler == Automated Testing == This section documents how to use, read, and understand the automated testing scripts. === Compiling Test Scripts === make [all|test] === Running Tests === By defualt, this will run all tests ./test === Example Input Files === These are example programs that test the translator: test_input/test.* === Example Output Files === These files are what the translator should print as file output: test_output/test.* These files are what the translator should print to stdout/err: test_stdout/test.* test_stderr/test.* === Resulsts of Tests === All test results from the last run instance of ./test are stored here: test_results/ ==== Binary Output Results ==== test_results/test.*.b ==== Stdout/err Results ==== test_results/test.*.out test_results/test.*.err === Output From Test Program === The test program will make sure the environment is sane before trying, and then run all test input files against the executable. Lines are compared individually, with any descrepencies being reported and marking the test as a failure. If 50% or more of the tests fail, the summary will print a red asterisk, if any tests failed but less than 50% then a yellow asterisk is printed, and finally if no tests failed a green asterisk is printed at the end of all testing. == Compilation Platform == Linux Version: 2.6.32-gentoo-r7 gcc (Gentoo 4.3.4 p1.1, pie-10.1.5) 4.3.4
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.