Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/damaru2/yaacc
Yet another almost C compiler
https://github.com/damaru2/yaacc
Last synced: about 2 months ago
JSON representation
Yet another almost C compiler
- Host: GitHub
- URL: https://github.com/damaru2/yaacc
- Owner: damaru2
- Created: 2015-09-17T13:53:10.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-11-05T15:51:06.000Z (about 9 years ago)
- Last Synced: 2023-08-06T16:38:55.891Z (over 1 year ago)
- Language: Java
- Size: 1.17 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YAACC
Yet Another Almost C CompilerCompiler of a C like language implemented in Java using JLex and JCup for the lexical and syntactic analysis resp.
It generates P-machine code in a file called output.yap
## What you will find in this repository
- An example of output.yap.
- A Haskell implementation of a P-machine, so you can test the generated code. It is in the folder P-machine.
- A file named `AnalizadorLexicoTiny.l` with the lexical code that JLex accepts as input.
- Code for JCup with the syntactic rules of the language `Tiny.cup`.
- The required JCup and JLex libraries.
- The source code of the Java compiler implementation .
- Several examples of the C like language separated in two folders. One contains correct code, so the compiler successfully generate code for those, and the other contains lexical and syntactic errors so the compiler detects them and output descriptive error messages.
- A folder `lexico` to debug the lexical implementation. It's a slightly modified version of the final lexical that displays the recognized lexical tokens.
- A script `compile.sh` which automatically compiles the lexical analizer, calls the lexical debug script, and compiles the sintactic analizer (it saves a lot of time).## About this project
This was a project for the subject Language Processors for the fourth course in the Double Degree in Mathematics and Computer Science at Complutense University of Madrid.
This project was done along with https://github.com/lezcano
It was marked with a 10/10