on master help sign in
typo
commitccd0c2a3d4f7f013ec628a296c52704dc2525feb authorJONATHAN PAPROCKI <jon@tlon.io> dateMon 17 Aug 2020, 15:49 (6 years ago) parent3b0c205
1 file changed+7−2
tutorials/arvo/parsing.md+7−2
tutorials/arvo/parsing.md+7−2
@@ -397,7 +397,7 @@ Understanding the rune `;~` is essential to building parsers with Hoon. Let's
397397take this opportunity to think about it carefully.
398398
399399The `rule` created by `;~(combinator [list rule])` may be understood
400−inductively. To this, let's consider the base case where our `[list rule]` has only a
400+inductively. To do this, let's consider the base case where our `[list rule]` has only a
401401single entry.
402402```
403403> (scan "star" ;~(plug (jest 'star')))
@@ -428,7 +428,7 @@ the gluing operation. And so, swapping `+plug` for `+pose` results in a crash,
428428which clues us into the fact that the combinator now has an effect since there
429429is more than one `rule`.
430430```
431−`> (scan "star" ;~(pose (jest 'st') (jest 'ar')))
431+> (scan "star" ;~(pose (jest 'st') (jest 'ar')))
432432{1 3}
433433syntax error
434434```
@@ -536,6 +536,11 @@ your `gen/` folder.
536536--
537537```
538538
539+Informally, the grammar here is:
540+ - A factor is either an integer or an expression surrounded by parentheses.
541+ - A term is either a factor or a factor times a term.
542+ - An expression is either a term or a term plus an expression.
543+
539544### Factors, terms, and expressions
540545
541546Our grammar consists of three `rule`s: one for factors, one for terms, and one