Merge pull request #199 from federicomenaquintero/master

Fix for the README.md, and a small documentation fix
This commit is contained in:
Niko Matsakis 2017-03-23 05:16:58 -04:00 committed by GitHub
commit dfb4040da1
2 changed files with 9 additions and 9 deletions

View File

@ -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]

View File

@ -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