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
- Host: GitHub
- URL: https://github.com/jasanign/Parser
- Owner: jasanign
- Created: 2017-07-16T11:28:37.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-16T17:50:42.000Z (about 8 years ago)
- Last Synced: 2024-04-24T16:15:37.997Z (over 1 year ago)
- Language: C
- Size: 5.86 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- AwesomeInterpreter - Parser
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 }+