https://github.com/karanraj06/bmm-lexer-parser
Lexical and Syntax Analyzer for a simple programming language called B--
https://github.com/karanraj06/bmm-lexer-parser
bison flex lexical-analyzer syntax-analyzer
Last synced: 7 months ago
JSON representation
Lexical and Syntax Analyzer for a simple programming language called B--
- Host: GitHub
- URL: https://github.com/karanraj06/bmm-lexer-parser
- Owner: Karanraj06
- Created: 2023-04-12T20:41:33.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-05-31T13:59:01.000Z (over 2 years ago)
- Last Synced: 2025-02-07T00:20:45.866Z (8 months ago)
- Topics: bison, flex, lexical-analyzer, syntax-analyzer
- Language: Lex
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bmm-lexer-parser
## Summary
This project aims to build a compiler for a simple programming language called B--. It utilizes Flex and Bison to create a lexical analyzer and syntax analyzer capable of recognizing B-- source code. The compiler provides helpful error messages for identifying syntax errors in B-- sample code.
## File Structure
```
.
├── .gitattributes
├── .gitignore
├── LICENSE
├── Makefile
├── README.md
├── bmm_main.c
├── bmm_parser.y
├── bmm_scanner.l
├── correct_sample.bmm
├── incorrect_sample.bmm
└── test_lexer.txt
```## Prerequisites
Download
- [Bison](https://www.gnu.org/software/bison/)
- [Flex](https://github.com/westes/flex)
- [Make](https://www.gnu.org/software/software.html)## Usage
Build the lexer and parser
```
make
```Run the lexer and parser on a sample B-- program
```
./a.out correct_sample.bmm
```Clean the directory
```
make clean
```## Authors
- Harsh Raj Srivastava ([@Harsh290803](https://github.com/Harsh290803))
- Karanraj Mehta ([@Karanraj06](https://github.com/Karanraj06))