minc

module
v0.0.0-...-95add9b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2016 License: MIT

README

minc

Minimal C

Minimal C is a toy language intended to help facilitate learning how to write a compiler. In fact, while based primarily on C it is not a subset of C and will differ in some respects.

Sources written for Minimal C will likely not compile with a C compiler and will not be API/ABI compatible.

MinC is also intended to be implemented incrementally with each stage adding additional functionality to the language.

Language Overview: Phase 1

MinC contains a single type: void.

Identifiers must start with a letter and may contain one or more letters or numbers. They may also contain an underscore.

Braces {} are used to encapsulate statement blocks. Parenthases are used to encapsulate function arguments.

The only valid program is: void main() {}

Directories

Path Synopsis
Package ast provides an Abstract Syntax Tree for the MinC language
Package ast provides an Abstract Syntax Tree for the MinC language
Package cgen produces x86 instructions using Intel syntax.
Package cgen produces x86 instructions using Intel syntax.
Mcc, or Minimal C Compiler, is the beast that runs the show.
Mcc, or Minimal C Compiler, is the beast that runs the show.
Package parse implements the MinC parser.
Package parse implements the MinC parser.
Package scan wraps itself around text/scanner to provide a more compiler friendly interface.
Package scan wraps itself around text/scanner to provide a more compiler friendly interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL