Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/samolego/fri-prev-lang24compiler
Compiler for Lang24 language.
https://github.com/samolego/fri-prev-lang24compiler
Last synced: about 1 month ago
JSON representation
Compiler for Lang24 language.
- Host: GitHub
- URL: https://github.com/samolego/fri-prev-lang24compiler
- Owner: samolego
- Created: 2024-02-24T18:12:46.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-05-27T13:33:33.000Z (8 months ago)
- Last Synced: 2024-10-20T23:44:24.655Z (3 months ago)
- Language: Java
- Size: 859 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lang24 Compiler
A project for university course "Compilers"
## About Lang24 language
See [language specification](lang24_specs.md).## Building
Simply type
```bash
./gradlew build
```
in terminal. The output jar file will be in `build/libs/` directory.## Running
To run the compiler, use
```bash
./gradlew run -PsrcFileName=test_file
```
where `test_file` is the name of the file in `prg/` directory, excluding file extension.Available arguments are (all must be used with `-P` prefix):
* `srcFileName` - name of the source file in `prg/` directory
* `targetPhase` - phase of the compiler to run (default is `all`)
* `loggedPhases` - list of phases to log (default is `all`)
* `xsl` - path to xsl file for generating AST xml (default is `lib/xsl/`)### Compiling with make
1. Download [antlr](https://www.antlr.org/download/antlr-4.13.1-complete.jar) to project `lib/` folder.
2. Execute following command in project root directory:
```bash
make all
```### Running with make
1. Write a file `filename.lang24` in `prg/` directory.
2. Execute following command in `prg/` directory:
```bash
make TARGETPHASE=lexan filename
```
where `filename` is the name of the the file, excluding file extension.
Compiler will run up to phase `lexan` in this case.