@@ -378,7 +378,7 @@ syntax error
378378
379379
380380
381−### Parsing atoms
381+## Parsing atoms
382382
383383[Recall](@/docs/tutorials/hoon/lists.md) that `cord`s are atoms with the aura
384384`@t` and are typically used to represent strings internally as data, as atoms
@@ -388,10 +388,50 @@ analogous to `+scan` and `+rush` being analogous to `rust`. Under the hood, `+ra
388388calls `+scan` after converting the input atom to a `tape`, and `+rush` does
389389similary for `+rust`.
390390
391+## Parsing numbers
392+
393+Functions for parsing numbers are documented in [4j: Parsing (Bases and Base
394+Digits)](@/docs/reference/library/4j.md). In particualr, `dem` is a `rule`
395+for parsing decimal numbers.
396+
397+```
398+> (scan "42" dem)
399+42
400+> (add 1 (scan "42" dem))
401+43
402+```
403+
404+## Other parsing tidbits
405+
406+Need to mention `cold`
391407
392408## Parsing arithmetic expressions
393409
394−Functions for parsing numbers are documented in [4j: Parsing (Bases and Base
395−Digits)](@/docs/reference/library/4j.md). `dim:ag` is for parsing decimal
396−numbers.
410+In this section we will be applying what we have learned to write a parser for
411+arithmetic expressions in Hoon. That is, we will make a `rule` that takes in
412+`tape`s of the form `"(2+3)*4*"` and returns `20` as a `@ud`.
413+
414+We call a `tape` consisting of some consistent arithmetic string of numbers,
415+`+,*`, `(`, and `)` an _expression_.
397416
417+I probably need to figure out how to break this into a tree and do all the
418+adding and multiplying at the end
419+
420+### Parsing expressions
421+
422+An expression is either a term plus an expression or a term.
423+
424+### Parsing terms
425+
426+A term is either a factor times a term or a factor.
427+
428+### Parsing factors
429+
430+A factor is either an expression surrounded by parentheses or an integer. To parse
431+a factor, we first check if it is a number and apply `dem` if so, otherwise
432+we strip the parentheses and apply the `rule` for parsing expressions.
433+
434+```
435+> (scan "(5)" ;~(pose dem (ifix [lit rit] dem)))
436+5
437+```