https://github.com/dahlitzflorian/learning-flex-bison
This repository was created to keep track of my personal learning material for Flex and Bison.
https://github.com/dahlitzflorian/learning-flex-bison
bison bison-example bison-grammar bison-yacc education educational educational-materials flex flex-bison
Last synced: 2 months ago
JSON representation
This repository was created to keep track of my personal learning material for Flex and Bison.
- Host: GitHub
- URL: https://github.com/dahlitzflorian/learning-flex-bison
- Owner: DahlitzFlorian
- License: apache-2.0
- Created: 2019-04-02T16:39:28.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-16T18:36:12.000Z (about 6 years ago)
- Last Synced: 2025-01-08T13:27:49.858Z (4 months ago)
- Topics: bison, bison-example, bison-grammar, bison-yacc, education, educational, educational-materials, flex, flex-bison
- Language: Yacc
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Learning Flex and Bison
## Description
This repository was created to keep track of my personal learning material for [Flex and Bison][flexandbison].
The source code is provided in the [src](src/) directory, the explanations and notes are stored inside the [notes](notes/) directory.## Build
You can generate the lexcial analyzer and the parser using the [build script](build.sh) in the root directory.
It expects exactly one parameter, which is the path to the lexical analyzer description.
After hitting enter the script will delete the `build` directory if existing, generate a new one and save the lexical analyzer just there as well as the generated parser and the corresponding header file.
Last but not least **gcc** will create an executable you can run afterwards.**Note:** The build script was created for a MacOS system and may not work on other systems.
Furthermore, be sure to have Flex and Bison installed!### Example
```shell
$ ./build.sh flex/binary.l
$ ./build/binary.exe
1101 + 10 * 11
= 19
```[flexandbison]: https://en.wikipedia.org/wiki/GNU_Bison