Skip to content

A simple compiler to make programming Minecraft CPUs easier

License

Notifications You must be signed in to change notification settings

Jan1902/MCCompiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


MC Compiler

A simple compiler to make programming Minecraft CPUs easier!

· Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Over time Minecraft CPUs have grown bigger and more powerful - to a point where you're able to play games like Pong and Tetris on them. Unfortunately inputting such big programs by hand is a pain. This project is supposed to make this process a lot easier by providing an easy-to-use programming language aswell as a program for generating customizable schematics from your code.

Built With

The project is pretty much made from scratch besides some ease-of-life libraries.

Getting Started

To get the MC Compiler up and running follow these simple steps.

Prerequisites

  • Visual Studio 2022
  • .NET 6

Installation

Installing the project only requires you to clone the repo and open it up in VS 2022

  1. Clone the repo

     git clone https://github.com/Jan1902/MCCompiler.git
    
  2. Open it up in VS 2022

Usage

Both the compiler and the Schematic Generator are operated through the command line making it easy to use.

Compiler

Syntax

CompilerTest.exe -c <CODE-FILE> -i <INSTRUCTION-SET-FILE> -o <OUTPUT-FILE>

Example

CompilerTest.exe -c code.txt -i is.txt -o result.txt

Schematic Generator

Syntax

SchematicGenerator.exe <BINARY-FILE> <CONFIG-FILE>

Example

SchematicGenerator.exe result.txt config.json

Roadmap

  • Compiler
    • Loading Instruction Sets
    • Tokenizer
    • Parser
      • Better Syntax Error Recognition
    • Support different CPU architectures
      • Intermediate Language
    • Analyzer
    • Transformer
    • Translator
      • Handling nested calculations
    • Proper CLI
    • Register Allocation
    • Automatically create temporary variables when needed
  • Schematic Generator
    • Configuration
    • Command Line Parser

See the open issues for a full list of proposed features (and known issues).

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Jan-Hendrik Heinbokel - jan.heinbokel@gmx.de

Project Link: https://github.com/Jan1902/MCCompiler

Releases

No releases published

Packages

No packages published