Skip to content

Commit fab9e5f

Browse files
committed
fix links in book docs
1 parent 2078e17 commit fab9e5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

book/src/formality_core/parse.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ When parsing an enum there will be multiple possibilities. We will attempt to pa
3131
We support left-recursive grammars like this one from the `parse-torture-tests`:
3232

3333
```rust
34-
{{#include ../../../tests/parser-torture-tests/src/path.rs:path}}
34+
{{#include ../../../tests/parser-torture-tests/path.rs:path}}
3535
```
3636

3737
We also support ambiguous grammars. For example, you can code up arithmetic expressions like this:
3838

3939

4040
```rust
41-
{{#include ../../../tests/parser-torture-tests/src/left_associative.rs:Expr}}
41+
{{#include ../../../tests/parser-torture-tests/left_associative.rs:Expr}}
4242
```
4343

4444
When specifying the `#[precedence]` of a variant, the default is left-associativity, which can be written more explicitly as `#[precedence(L, left)]`. If you prefer, you can specify right-associativity (`#[precedence(L, right)]`) or non-associativity `#[precedence(L, none)]`. This affects how things of the same level are parsed:
@@ -71,7 +71,7 @@ A grammar consists of a series of *symbols*. Each symbol matches some text in th
7171
* `$[?field]` -- parse `[E1, E2, E3]`, where `field: Vec<E>`, but accept empty string as empty vector
7272
* `${field}` -- parse `{E1, E2, E3}`, where `field: Vec<E>`
7373
* `${?field}` -- parse `{E1, E2, E3}`, where `field: Vec<E>`, but accept empty string as empty vector
74-
* `$:guard <nonterminal>` -- parses `<nonterminal>` but only if the keyword `guard` is present. For example, `$:where $,where_clauses` would parse `where WhereClause1, WhereClause2, WhereClause3`
74+
* `$:guard <nonterminal>` -- parses `<nonterminal>` but only if the keyword `guard` is present. For example, `$:where $,where_clauses` would parse `where WhereClause1, WhereClause2, WhereClause3` but would also accept nothing (in which case, you would get an empty vector).
7575

7676
### Greediness
7777

0 commit comments

Comments
 (0)