Skip to content

Lexical and Syntax Analyzer for a simple programming language called B--

Notifications You must be signed in to change notification settings

Karanraj06/bmm-lexer-parser

Repository files navigation

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

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

About

Lexical and Syntax Analyzer for a simple programming language called B--

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published