GithubHelp home page GithubHelp logo

compiler's Introduction

== 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

compiler's People

Contributors

grnt426 avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

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.