https://github.com/petru-braha/yp-compiler
A custom C-like compiler developed on Linux
https://github.com/petru-braha/yp-compiler
abstract-syntax-tree assembly lexical-analysis semantics symbol-table syntactic-parser
Last synced: about 1 month ago
JSON representation
A custom C-like compiler developed on Linux
- Host: GitHub
- URL: https://github.com/petru-braha/yp-compiler
- Owner: petru-braha
- Created: 2024-12-12T13:53:20.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-02-26T10:05:51.000Z (3 months ago)
- Last Synced: 2025-03-04T18:40:45.373Z (3 months ago)
- Topics: abstract-syntax-tree, assembly, lexical-analysis, semantics, symbol-table, syntactic-parser
- Language: C++
- Homepage: https://edu.info.uaic.ro/limbaje-formale-automate-si-compilatoare/#lectures
- Size: 1.06 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YP compiler
You can find the romanian version of this document [here](/docs/README%20RO.md).
Test-driven development principles were considered in this project.## Usage
- for improved redability, we recommand VS Code and the "Better Comments" extension
- commands to be passed in project root terminal:0. "./setup.sh" - checks for bison and flex installation and builds our compiler
0. "./build.sh" - builds the custom compiler
0. "./src/discard.sh" - delete the additional files
0. "./run.out " - compiles and runs the source code## Technologies
0. C++
0. Flex
0. Yacc/Bison## Features
- All variables/parameters/objects have:
- explicit value(s)
- implicit value(s) if there is no given definiton
- e. g. 0, 0.0, '0', "", true
- no container will ever be "undefined"- x-dimensional arrays, where x could be any natural value not NULL. the same is assured for the size of each dimension.
- Each file from [examples directory](/exs/) is responsable of one grammar rule.
- See [implementation details](/docs/brainstorm.md) for more.
- Default parameters for functions
## Limitations
- No type qualifiers
- No pointers, refferences
- No struct, union
- No inheritence of classes