@@ -28,41 +28,42 @@ It is sometimes useful to start with an example. Consider the following JSON doc
2828
2929The following is a dump of the content of the tape, with the first number of each line representing the index of a tape element.
3030
31- ``` bash
32- $ ./json2json -d jsonexamples/small/demo.json
33- 0 : r // pointing to 38 (right after last node)
34- 1 : { // pointing to next tape location 38 (first node after the scope)
35- 2 : string " Image"
36- 3 : { // pointing to next tape location 37 (first node after the scope)
37- 4 : string " Width"
38- 5 : integer 800
39- 7 : string " Height"
40- 8 : integer 600
41- 10 : string " Title"
42- 11 : string " View from 15th Floor"
43- 12 : string " Thumbnail"
44- 13 : { // pointing to next tape location 23 (first node after the scope)
45- 14 : string " Url"
46- 15 : string " http://www.example.com/image/481989943"
47- 16 : string " Height"
48- 17 : integer 125
49- 19 : string " Width"
50- 20 : integer 100
51- 22 : } // pointing to previous tape location 13 (start of the scope)
52- 23 : string " Animated"
53- 24 : false
54- 25 : string " IDs"
55- 26 : [ // pointing to next tape location 36 (first node after the scope)
56- 27 : integer 116
57- 29 : integer 943
58- 31 : integer 234
59- 33 : integer 38793
60- 35 : ] // pointing to previous tape location 26 (start of the scope)
61- 36 : } // pointing to previous tape location 3 (start of the scope)
62- 37 : } // pointing to previous tape location 1 (start of the scope)
63- 38 : r // pointing to 0 (start root)
31+ ### The Tape
32+ | index | element (64 bit word) |
33+ | ----- | ------------------------------------------------------------------- |
34+ | 0 | r // pointing to 38 (right after last node) |
35+ | 1 | { // pointing to next tape location 38 (first node after the scope) |
36+ | 2 | string "Image" |
37+ | 3 | { // pointing to next tape location 37 (first node after the scope) |
38+ | 4 | string "Width" |
39+ | 5 | integer 800 |
40+ | 7 | string "Height" |
41+ | 8 | integer 600 |
42+ | 10 | string "Title" |
43+ | 11 | string "View from 15th Floor" |
44+ | 12 | string "Thumbnail" |
45+ | 13 | { // pointing to next tape location 23 (first node after the scope) |
46+ | 14 | string "Url" |
47+ | 15 | string "http://www.example.com/image/481989943" |
48+ | 16 | string "Height" |
49+ | 17 | integer 125 |
50+ | 19 | string "Width" |
51+ | 20 | integer 100 |
52+ | 22 | } // pointing to previous tape location 13 (start of the scope) |
53+ | 23 | string "Animated" |
54+ | 24 | false |
55+ | 25 | string "IDs" |
56+ | 26 | [ // pointing to next tape location 36 (first node after the scope) |
57+ | 27 | integer 116 |
58+ | 29 | integer 943 |
59+ | 31 | integer 234 |
60+ | 33 | integer 38793 |
61+ | 35 | ] // pointing to previous tape location 26 (start of the scope) |
62+ | 36 | } // pointing to previous tape location 3 (start of the scope) |
63+ | 37 | } // pointing to previous tape location 1 (start of the scope) |
64+ | 38 | r // pointing to 0 (start root) |
65+
6466
65- ` ` `
6667
6768## General formal of the tape elements
6869
0 commit comments