on master help sign in
typo
ccd0c2aJONATHAN PAPROCKI
tutorials/arvo/parsing.md+7−2
@@ -397,7 +397,7 @@ Understanding the rune `;~` is essential to building parsers with Hoon. Let's
397take this opportunity to think about it carefully.
397take this opportunity to think about it carefully.
398
398
399The `rule` created by `;~(combinator [list rule])` may be understood
399The `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
401single entry.
401single entry.
402```
402```
403> (scan "star" ;~(plug (jest 'star')))
403> (scan "star" ;~(plug (jest 'star')))
@@ -428,7 +428,7 @@ the gluing operation. And so, swapping `+plug` for `+pose` results in a crash,
428which clues us into the fact that the combinator now has an effect since there
428which clues us into the fact that the combinator now has an effect since there
429is more than one `rule`.
429is more than one `rule`.
430```
430```
431−`> (scan "star" ;~(pose (jest 'st') (jest 'ar')))
431+> (scan "star" ;~(pose (jest 'st') (jest 'ar')))
432{1 3}
432{1 3}
433syntax error
433syntax error
434```
434```
@@ -536,6 +536,11 @@ your `gen/` folder.
536--
536--
537```
537```
538
538
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+
539### Factors, terms, and expressions
544### Factors, terms, and expressions
540
545
541Our grammar consists of three `rule`s: one for factors, one for terms, and one
546Our grammar consists of three `rule`s: one for factors, one for terms, and one