Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mewmew/uc
A compiler for the µC language.
https://github.com/mewmew/uc
c compiler golang llvm-ir
Last synced: about 1 month ago
JSON representation
A compiler for the µC language.
- Host: GitHub
- URL: https://github.com/mewmew/uc
- Owner: mewmew
- Created: 2016-02-03T13:35:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2021-03-25T00:45:33.000Z (over 3 years ago)
- Last Synced: 2024-11-01T12:52:17.080Z (about 2 months ago)
- Topics: c, compiler, golang, llvm-ir
- Language: Go
- Homepage:
- Size: 814 KB
- Stars: 58
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# µC Compiler
[![Build Status](https://travis-ci.org/mewmew/uc.svg?branch=dev)](https://travis-ci.org/mewmew/uc)
[![Coverage Status](https://coveralls.io/repos/github/mewmew/uc/badge.svg?branch=dev)](https://coveralls.io/github/mewmew/uc?branch=dev)
[![GoDoc](https://godoc.org/github.com/mewmew/uc?status.svg)](https://godoc.org/github.com/mewmew/uc)A compiler for the [µC programming language](https://www.it.uu.se/katalog/aleji304/CompilersProject/uc.html).
## Installation
1. [Install Go](https://golang.org/doc/install).
2. Install Gocc `go get github.com/goccmack/gocc`.```
$ go get -u github.com/mewmew/uc
$ cd ${GOPATH}/src/github.com/mewmew/uc/gocc
$ make gen
$ go get github.com/mewmew/uc/...
$ go install github.com/mewmew/uc/cmd/ulex
$ go install github.com/mewmew/uc/cmd/uparse
$ go install github.com/mewmew/uc/cmd/uclang
$ go install github.com/mewmew/uc/cmd/3rdpartycompile
```## Usage
* [ulex](https://godoc.org/github.com/mewmew/uc/cmd/ulex): a lexer for the µC language which pretty-prints tokens to standard output.
* [uparse](https://godoc.org/github.com/mewmew/uc/cmd/uparse): a parser for the µC language which pretty-prints abstract syntax trees to standard output.
* [usem](https://godoc.org/github.com/mewmew/uc/cmd/usem): a static semantic checker for the µC language which validates the input and reports errors to standard error.
* [uclang](https://godoc.org/github.com/mewmew/uc/cmd/uclang): a compiler for the µC language which validates the input, and prints corresponding LLVM IR assembly to standard output.
* [3rdpartycompile](https://godoc.org/github.com/mewmew/uc/cmd/3rdpartycompile): a compiler for the µC language which through the uclang tool chain validates the input, compiles to LLVM and through the third party compiler clang links with the supplied lib uc.c and outputs the corresponding binary.## Public domain
The source code and any original content of this repository is hereby released into the [public domain].
[public domain]: https://creativecommons.org/publicdomain/zero/1.0/