Sign inSign up

vincenzopalazzo/microclang

By vincenzopalazzo

•Updated over 5 years ago

MicroClang is an academics compiler of a C subset language full stack-based.

Image
0

10K+

vincenzopalazzo/microclang repository overview

⁠Micro Clang

Gitlab pipeline status Docker Pulls

If you think like a computer, write C language make senseā€ - Linus Torvalds, Nothing better than C

⁠Overview

⁠Introduction

MicroClang is an academics compiler of a C subset language full stackbased. It is a complete programming language that contains primitive types and complex types as arrays. It based on LLVM infrastructure, and it is full developed in the Ocaml language.

⁠Build

You can use Docker to import the MicroClang image like the following command.

docker pull vincenzopalazzo/microclang
docker run -t -i --rm vincenzopalazzo/microclang bash
>> microcc -help
------------ OUTPUT --------------------
Usage:	microcc [-p|-s|-d|-c] <source_file>

  -p Parse and print AST
  -s Perform semantic checks
  -d Print the generated code
  -o Place the output into file
  -O Optimize the generated code
  -c Compile (default)
  -help  Display this list of options
  --help  Display this list of options

⁠Cody Style
⁠MicroClang Code Style

The repository contains a file .clang-format and the LLVM style is used, is chosen this type of code style we want to maintain all the code the same to improve the readability of the program. For this reason, all the code was formatted with the following command on the root directory clang-format -i path/file/*.mc.

The same code style is the same as C-lightning⁠.

⁠License

MicroC Compiler developer with University of Pisa for courses Languages, Compilers and Interpreters class.

Copyright (C) 2020-2021 Vincenzo Palazzo [email protected]⁠ and all professors of the Languages, Compilers and Interpreters class https://github.com/lillo/compiler-course-unipi⁠

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Tag summary

Content type

Image

Digest

Size

1.9 GB

Last updated

over 5 years ago

docker pull vincenzopalazzo/microclang