Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/v-shenoy/expression-parsing
Implementation of a traditional recursive descent parser, and a Pratt parser.
https://github.com/v-shenoy/expression-parsing
golang parsing pratt-parser recursive-descent
Last synced: about 2 months ago
JSON representation
Implementation of a traditional recursive descent parser, and a Pratt parser.
- Host: GitHub
- URL: https://github.com/v-shenoy/expression-parsing
- Owner: v-shenoy
- License: mit
- Created: 2019-06-02T23:08:02.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-10-28T13:55:09.000Z (almost 3 years ago)
- Last Synced: 2024-04-28T04:47:41.054Z (5 months ago)
- Topics: golang, parsing, pratt-parser, recursive-descent
- Language: Go
- Homepage:
- Size: 11.7 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- go-awesome - Expression Parsing
README
# expression-parsing
An implementation of two parsing algorithms.
1. Traditional Recursive Descent Parser.
2. Pratt's Top Down Operator Parser.Expression syntax contains the following operators, with increasing levels of precedence.
| Precedence | Operators |
| ---------- | ------------- |
| 0 | = |
| 1 | \|\| |
| 2 | && |
| 3 | \| |
| 4 | ^ |
| 5 | & |
| 6 | ==, != |
| 7 | >, >=, <, <= |
| 8 | +, - |
| 9 | >>, << |
| 10 | *, /, % |
| 11 | !, ~, -(unary)|
| 12 | ** |
| 13 | () |