https://github.com/ebyrds/int64-compiler
Compiler written in C# to translate file from the experimental language `int64` into CIL, presented as the final exam of the Compiler Course, ITESM CEM, Mexico 2015.
https://github.com/ebyrds/int64-compiler
Last synced: 11 months ago
JSON representation
Compiler written in C# to translate file from the experimental language `int64` into CIL, presented as the final exam of the Compiler Course, ITESM CEM, Mexico 2015.
- Host: GitHub
- URL: https://github.com/ebyrds/int64-compiler
- Owner: EByrdS
- Created: 2022-09-11T11:49:15.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-11T12:00:07.000Z (almost 4 years ago)
- Last Synced: 2025-02-03T14:32:31.680Z (over 1 year ago)
- Language: C#
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# int64 compiler, version 0.1
This program is free software. You may redistribute it under the terms of
the GNU General Public License version 3 or later. See license.txt for
details.
Included in this release:
- Lexical analysis
- Syntactic analysis
- Semantic analysis
## Requirements
You will need a C# compiler, mainly `mono`. The makefile uses `mcs` to transform `.cs`
files to `.exe` binaries.
## Running the compiler
First, run:
`make int64lib.dll`
Then, to build the compiler, run:
`make int641.exe` or just `make`.
To compile an `int64` file to `CIL`, run:
`./int64.exe `
Where is the name of a int64 source file. You can try with
these files under `int64_programs`:
- hello.int64
- palindrome.int64
- binary.int64
This will generate a `.il` file with CIL code (Common Intermediate Language).
You will need to turn that file into an executable before you can run it.
### Update: 11-Sept-2022
ILasm seems to be the tool needed to convert `.il` files to `.exe`.
However, those programs are currently
not running, maybe because the `.exe` files are built for Linux or Windows, but I
am running on a Mac.