mirror of
https://github.com/SymboScript/Book.git
synced 2024-11-24 14:16:24 +03:00
doc: add parser operator priority
This commit is contained in:
parent
2f04b070df
commit
bb6c67333d
2 changed files with 21 additions and 0 deletions
|
@ -12,4 +12,6 @@
|
|||
- [Literals](specification/tokens/kinds/literals.md)
|
||||
- [Brackets](specification/tokens/kinds/brackets.md)
|
||||
|
||||
- [Parser](specification/parser/readme.md)
|
||||
|
||||
- [Examples](examples/readme.md)
|
||||
|
|
19
src/specification/parser/readme.md
Normal file
19
src/specification/parser/readme.md
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Parser
|
||||
|
||||
## Expressionss
|
||||
|
||||
### Operator priority
|
||||
|
||||
| Operator/Expression | Associativity | Parser fn name | Evaluation priority | Implementation |
|
||||
| --------------------------------------- | ------------- | -------------- | ------------------- | -------------- |
|
||||
| `!` `++` `--` `()` Literals Identifiers | Left to Right | factor | 1 | ✅ |
|
||||
| `^` | Left to Left | power | 2 | ✅ |
|
||||
| `*` `/` `%` | Left to Right | term | 3 | ✅ |
|
||||
| `+` `-` | Left to Right | add_sub | 4 | ✅ |
|
||||
| `>>` `<<` | Left to Right | shift | 5 | ❌ |
|
||||
| `<` `<=` `>` `>=` `==` `!=` | Left to Right | cmp | 6 | ❌ |
|
||||
| `&` | Left to Right | bit_and | 7 | ❌ |
|
||||
| <code>\|</code> | Left to Right | bit_or | 8 | ❌ |
|
||||
| `==` `!=` `<` `<=` `>` `>=` | Left to Right | cmp | 9 | ❌ |
|
||||
| `&&` | Left to Right | logical_and | 10 | ❌ |
|
||||
| <code>\|\|</code> | Left to Right | logical_or | 11 | ❌ |
|
Loading…
Add table
Reference in a new issue