From ca4c0a36c0aba93a64bebe66917b63b5290c8951 Mon Sep 17 00:00:00 2001 From: Colin Okay Date: Sat, 25 Apr 2020 20:26:14 -0500 Subject: second draft --- examples/Tutorial.org | 69 +++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 33 deletions(-) diff --git a/examples/Tutorial.org b/examples/Tutorial.org index 951ecee..4a94567 100644 --- a/examples/Tutorial.org +++ b/examples/Tutorial.org @@ -188,7 +188,7 @@ effectively, accept the same input zero or more times, resulting in a list of the results from the inner parser. If the above definition is perhaps more verbose than you would like, -you could have instead =< ** Recursive Parsers -You're in the home stretch. You've defined parsers for all of the +You're in the home stretch! You've defined parsers for all of the primitive value types, and now only the complex types remain. And -here's where you encounter a new and interesting challenge. +here is where you encounter a new and interesting challenge. -Looking at the JSON document, you notice two things. +Looking at the JSON definition, you notice two things. -1) There is a definition for a =value=, and value can be, among other - things, an =object= and an =array=. -2) The definitions for =object= and =array= are both in terms of =value=. +1) =value=, representing any valid JSON value, is define din terms of + =object= and =array=. +2) But =object= and =array= are both defined in terms of =value=. That's right! It's time for recursive parser definitions. -So, without having defined =