mirror of
https://github.com/fluencelabs/lalrpop
synced 2025-03-16 17:00:53 +00:00
Merge pull request #199 from federicomenaquintero/master
Fix for the README.md, and a small documentation fix
This commit is contained in:
commit
dfb4040da1
@ -65,7 +65,7 @@ build = "build.rs" # LALRPOP preprocessing
|
||||
# needed if you are writing your own tokenizer by
|
||||
# hand (or if you are already using the regex crate)
|
||||
[dependencies.regex]
|
||||
version = "0.12.5"
|
||||
version = "0.2.1"
|
||||
|
||||
# Add a dependency on the LALRPOP runtime library:
|
||||
[dependencies.lalrpop-util]
|
||||
|
@ -158,7 +158,7 @@ lalrpop = "0.12.5"
|
||||
|
||||
[dependencies]
|
||||
lalrpop-util = "0.12.5"
|
||||
regex = "0.2"
|
||||
regex = "0.2.1"
|
||||
```
|
||||
|
||||
Adding a `build` directive to the `[package]` section tells Cargo to
|
||||
@ -463,15 +463,15 @@ next highest precedence level (`*`, `/`), and finish with the bare
|
||||
version of your top-level as an atomic expression, which lets people
|
||||
reset.
|
||||
|
||||
To see why this works, consider the two parse possible parse trees
|
||||
for something like `2+3*4`:
|
||||
To see why this works, consider the two possible parse trees for
|
||||
something like `2+3*4`:
|
||||
|
||||
```
|
||||
2 + 3 * 4 2 + 3 * 4
|
||||
| | | | | | | | | |
|
||||
| | +-Factor-+ OR +-Expr-+ | |
|
||||
| | | | | |
|
||||
+-Expr -+ +----Factor-+
|
||||
2 + 3 * 4 2 + 3 * 4
|
||||
| | | | | | | | | |
|
||||
| | +-Factor-+ OR +-Expr-+ | |
|
||||
| | | | | |
|
||||
+-Expr -+ +----Factor-+
|
||||
```
|
||||
|
||||
In the first one, we give multiplication higher precedence, and in the
|
||||
|
Loading…
x
Reference in New Issue
Block a user