Skip to content

PetrosIbrah/Mini-Compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this project?

Mini compiler is a flex, bison project using c. THe outcome is a simplistic lexical & syntax analyzer, with lexical & syntax warnings & Errors, as well as fatal Errors. Further more...

Flex.l

This Code presents a funtional verbal analyzer using Flex. This code identifies delimiters, numbers, operators, variables and strings etc. It also, counts Verbal Errors, Warnings and Fatal Errors And acts upon them. Other than that, it counts Correct Verbal usage.

Bison.y

This Code presents a funtional Syntax analyzer using bison. This Code is an extends the flex code, but also addons, Developing various syntax and expressions while defining warnings erros and Fatal Errors.

What it does

Upon successful project compilation, the input.txt file undergoes lexical and syntactic analysis. The output of which is saved in Output.txt

How to run

  • In the same directory type:
    make
    To compile and run the project

  • You can also type:
    make clean
    To delete the built files

Requirements

  • A linux based operating system.
  • Bison installed. To install, if not intalled already write the following:
    sudo apt install bison
  • Flex installed. To install, if not intalled already write the following:
    sudo apt install flex
  • C compiler installed. To install, if not intalled already write the following:
    sudo apt install gcc
  • Makefile installed. To install, if not intalled already write the following:
    sudo apt install make

About

Simple compiler containing lexical analysis & syntax analysis

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors