@@ -39,16 +39,16 @@ that are plugged into one another in various ways to perform the desired task.
3939
4040The basic building blocks, or primitives, are parsers that read only a
4141single character. There are frequently a few types of possible input characters,
42−such as letters, numbers, and symbols. For example, `parse("1", integer)` calls
42+such as letters, numbers, and symbols. For example, `(parse "1" integer)` calls
4343the parsing routine on the string `"1"` and looks for an integer, and so it
4444returns the integer `1`. However, taking into account what was said above about
4545parsers returning the unparsed portion of the string as well, we should
4646represent this return as a tuple. So we should expect something like this:
4747```
48−> parse("1", integer)
49−(1, "")
50−> parse("123", integer)
51−(1, "23")
48+> (parse "1" integer)
49+[1 ""]
50+> (parse "123" integer)
51+[1 "23"]
5252```
5353What if we wish to parse the rest of the string? We would need to apply the
5454`parse` function again:
@@ -57,6 +57,10 @@ What if we wish to parse the rest of the string? We would need to apply the
5757(12, "3")
5858> parse(parse(parse("123", integer), integer), integer)
5959(123, "")
60+> (parse (parse "123" integer) integer)
61+[12 "3"]
62+> (parse (parse (parse "123" integer) integer) integer)
63+[123 ""]
6064```
6165So we see that we can parse strings larger than one character by stringing
6266together parsing functions for single characters. Thus in addition to parsing
@@ -179,9 +183,7 @@ parser has not advanced since parsing failed. `q.edg` is null, indicating that
179183parsing has failed.
180184
181185Later we will use [+star](#star) to string together a sequence of `+just`s in
182−order to parse multiple characters at once. However, it should be noted that
183−`+jest`, which is covered next, ought to be used in favor of `+just`, which is
184−mostly included here for pedagogical reasons.
186+order to parse multiple characters at once.
185187
186188### `+jest`
187189
@@ -531,14 +533,14 @@ your `gen/` folder.
531533 (ifix [lit rit] expr)
532534 ==
533535++ turm
534− %+ knee @ud
536+ %+ knee *@ud
535537 |. ~+
536538 ;~ pose
537539 ((slug mul) tar ;~(pose factor turm))
538540 factor
539541 ==
540542++ expr
541− %+ knee @ud
543+ %+ knee *@ud
542544 |. ~+
543545 ;~ pose
544546 ((slug add) lus ;~(pose turm expr))
@@ -556,7 +558,7 @@ for expressions.
556558
557559```hoon
558560++ factor
559− %+ knee @ud
561+ %+ knee *@ud
560562 |. ~+
561563 ;~ pose
562564 dem
@@ -623,8 +625,9 @@ for expressions, we just need to swap `lus` for `tar`, `add` for `mul`, and
623625
624626```hoon
625627++ expr
626− %+ knee *int
627− |. ~+ ;~ pose
628+ %+ knee *@ud
629+ |. ~+
630+ ;~ pose
628631 ((slug add) lus ;~(pose turm expr))
629632 turm
630633 ==