An open API service indexing awesome lists of open source software.

https://github.com/jasanign/Parser

An interpreter written in C language for arithmetic expressions that use A Recursive Descent Parser
https://github.com/jasanign/Parser

Last synced: 6 months ago
JSON representation

An interpreter written in C language for arithmetic expressions that use A Recursive Descent Parser

Awesome Lists containing this project

README

          

# Parser

This project is a basic interpreter in C language for arithmetic expressions as defined by a particular grammar that is implemented using a recursive descent parser. This parser is a language recognizer in which determines whether each expression that is input is syntactically correct (it also catches any lexical errors). This parser is also an interpreter which evaluates and returns the resulting value when the input expressions are syntactically correct.

## Grammar

This parser uses the following grammar:

::= ;
::=
::= | epsilon
::=
::= | epsilon
::=
::= | epsilon
::= ^ |
::= ( ) |
::= + | -
::= * | /
::= < | > | <= | >= | != | ==
::= {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 }+