Index: modules/pt/ChangeLog ================================================================== --- modules/pt/ChangeLog.orig +++ modules/pt/ChangeLog @@ -1,5 +1,20 @@ +2013-03-04 Andreas Kupries + + * tests/data/ok/peg_json-indalign/0_basic_arithmetic: Updated to match + * tests/data/ok/peg_json-indalign/2_fun_arithmetic: json::write 1.0.2 + * tests/data/ok/peg_json-indalign/3_peg_itself: ("/" not quoted as "\/") + * tests/data/ok/peg_json-indalign/4_choice: + * tests/data/ok/peg_json-indented/0_basic_arithmetic: + * tests/data/ok/peg_json-indented/2_fun_arithmetic: + * tests/data/ok/peg_json-indented/3_peg_itself: + * tests/data/ok/peg_json-indented/4_choice: + * tests/data/ok/peg_json-ultracompact/0_basic_arithmetic: + * tests/data/ok/peg_json-ultracompact/2_fun_arithmetic: + * tests/data/ok/peg_json-ultracompact/3_peg_itself: + * tests/data/ok/peg_json-ultracompact/4_choice: + 2013-02-01 Andreas Kupries * * Released and tagged Tcllib 1.15 ======================== * Index: modules/pt/tests/data/ok/peg_json-indalign/0_basic_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-indalign/0_basic_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-indalign/0_basic_arithmetic @@ -1,34 +1,34 @@ { "pt::grammar::peg" : { "rules" : { "AddOp" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Digit" : { - "is" : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", + "is" : "/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", "mode" : "value" }, "Expression" : { - "is" : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}", + "is" : "/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}", "mode" : "value" }, "Factor" : { "is" : "x {n Term} {* {x {n AddOp} {n Term}}}", "mode" : "value" }, "MulOp" : { - "is" : "\/ {t *} {t \/}", + "is" : "/ {t *} {t /}", "mode" : "value" }, "Number" : { "is" : "x {? {n Sign}} {+ {n Digit}}", "mode" : "value" }, "Sign" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Term" : { "is" : "n Number", "mode" : "value" Index: modules/pt/tests/data/ok/peg_json-indalign/2_fun_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-indalign/2_fun_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-indalign/2_fun_arithmetic @@ -1,18 +1,18 @@ { "pt::grammar::peg" : { "rules" : { "AddOp" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Digit" : { - "is" : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", + "is" : "/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", "mode" : "value" }, "Expression" : { - "is" : "\/ {n Function} {\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}", + "is" : "/ {n Function} {/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}", "mode" : "value" }, "Factor" : { "is" : "x {n Term} {* {x {n AddOp} {n Term}}}", "mode" : "value" @@ -20,19 +20,19 @@ "Function" : { "is" : "n Sinus", "mode" : "value" }, "MulOp" : { - "is" : "\/ {t *} {t \/}", + "is" : "/ {t *} {t /}", "mode" : "value" }, "Number" : { "is" : "x {? {n Sign}} {+ {n Digit}}", "mode" : "value" }, "Sign" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Sinus" : { "is" : "x {t s} {t i} {t n} {t (} {n Expression} {t )}", "mode" : "value" Index: modules/pt/tests/data/ok/peg_json-indalign/3_peg_itself ================================================================== --- modules/pt/tests/data/ok/peg_json-indalign/3_peg_itself.orig +++ modules/pt/tests/data/ok/peg_json-indalign/3_peg_itself @@ -20,15 +20,15 @@ "ASCII" : { "is" : "x {t <} {t a} {t s} {t c} {t i} {t i} {t >} {n WHITESPACE}", "mode" : "leaf" }, "Attribute" : { - "is" : "x {\/ {n VOID} {n LEAF}} {n COLON}", + "is" : "x {/ {n VOID} {n LEAF}} {n COLON}", "mode" : "value" }, "Char" : { - "is" : "\/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}", + "is" : "/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}", "mode" : "value" }, "CharOctalFull" : { "is" : "x {t \\\\} {.. 0 2} {.. 0 7} {.. 0 7}", "mode" : "leaf" @@ -36,11 +36,11 @@ "CharOctalPart" : { "is" : "x {t \\\\} {.. 0 7} {? {.. 0 7}}", "mode" : "leaf" }, "CharSpecial" : { - "is" : "x {t \\\\} {\/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}", + "is" : "x {t \\\\} {/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}", "mode" : "leaf" }, "CharUnescaped" : { "is" : "x {! {t \\\\}} dot", "mode" : "leaf" @@ -100,11 +100,11 @@ "EOF" : { "is" : "! dot", "mode" : "void" }, "EOL" : { - "is" : "\/ {t {\n}} {t {\r}}", + "is" : "/ {t {\n}} {t {\r}}", "mode" : "void" }, "Expression" : { "is" : "x {n Sequence} {* {x {n SLASH} {n Sequence}}}", "mode" : "value" @@ -124,11 +124,11 @@ "Header" : { "is" : "x {n PEG} {n Identifier} {n StartExpr}", "mode" : "value" }, "Ident" : { - "is" : "x {\/ {t _} {t :} alpha} {* {\/ {t _} {t :} alnum}}", + "is" : "x {/ {t _} {t :} alpha} {* {/ {t _} {t :} alnum}}", "mode" : "leaf" }, "Identifier" : { "is" : "x {n Ident} {n WHITESPACE}", "mode" : "value" @@ -140,11 +140,11 @@ "LEAF" : { "is" : "x {t l} {t e} {t a} {t f} {n WHITESPACE}", "mode" : "leaf" }, "Literal" : { - "is" : "\/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}", + "is" : "/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}", "mode" : "value" }, "LOWER" : { "is" : "x {t <} {t l} {t o} {t w} {t e} {t r} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -168,15 +168,15 @@ "PLUS" : { "is" : "x {t +} {n WHITESPACE}", "mode" : "leaf" }, "Prefix" : { - "is" : "x {? {\/ {n AND} {n NOT}}} {n Suffix}", + "is" : "x {? {/ {n AND} {n NOT}}} {n Suffix}", "mode" : "value" }, "Primary" : { - "is" : "\/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}", + "is" : "/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}", "mode" : "value" }, "PRINTABLE" : { "is" : "x {t <} {t p} {t r} {t i} {t n} {t t} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -188,11 +188,11 @@ "QUESTION" : { "is" : "x {t ?} {n WHITESPACE}", "mode" : "leaf" }, "Range" : { - "is" : "\/ {x {n Char} {n TO} {n Char}} {n Char}", + "is" : "/ {x {n Char} {n TO} {n Char}} {n Char}", "mode" : "value" }, "SEMICOLON" : { "is" : "x {t {;}} {n WHITESPACE}", "mode" : "void" @@ -200,11 +200,11 @@ "Sequence" : { "is" : "+ {n Prefix}", "mode" : "value" }, "SLASH" : { - "is" : "x {t \/} {n WHITESPACE}", + "is" : "x {t /} {n WHITESPACE}", "mode" : "void" }, "SPACE" : { "is" : "x {t <} {t s} {t p} {t a} {t c} {t e} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -216,11 +216,11 @@ "StartExpr" : { "is" : "x {n OPEN} {n Expression} {n CLOSE}", "mode" : "value" }, "Suffix" : { - "is" : "x {n Primary} {? {\/ {n QUESTION} {n STAR} {n PLUS}}}", + "is" : "x {n Primary} {? {/ {n QUESTION} {n STAR} {n PLUS}}}", "mode" : "value" }, "TO" : { "is" : "t -", "mode" : "void" @@ -232,11 +232,11 @@ "VOID" : { "is" : "x {t v} {t o} {t i} {t d} {n WHITESPACE}", "mode" : "leaf" }, "WHITESPACE" : { - "is" : "* {\/ space {n COMMENT}}", + "is" : "* {/ space {n COMMENT}}", "mode" : "void" }, "WORDCHAR" : { "is" : "x {t <} {t w} {t o} {t r} {t d} {t c} {t h} {t a} {t r} {t >} {n WHITESPACE}", "mode" : "leaf" Index: modules/pt/tests/data/ok/peg_json-indalign/4_choice ================================================================== --- modules/pt/tests/data/ok/peg_json-indalign/4_choice.orig +++ modules/pt/tests/data/ok/peg_json-indalign/4_choice @@ -1,6 +1,6 @@ { "pt::grammar::peg" : { "rules" : {}, - "start" : "\/ {t a} {t b} {t c}" + "start" : "/ {t a} {t b} {t c}" } } Index: modules/pt/tests/data/ok/peg_json-indented/0_basic_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-indented/0_basic_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-indented/0_basic_arithmetic @@ -1,34 +1,34 @@ { "pt::grammar::peg" : { "rules" : { "AddOp" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Digit" : { - "is" : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", + "is" : "/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", "mode" : "value" }, "Expression" : { - "is" : "\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}", + "is" : "/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}", "mode" : "value" }, "Factor" : { "is" : "x {n Term} {* {x {n AddOp} {n Term}}}", "mode" : "value" }, "MulOp" : { - "is" : "\/ {t *} {t \/}", + "is" : "/ {t *} {t /}", "mode" : "value" }, "Number" : { "is" : "x {? {n Sign}} {+ {n Digit}}", "mode" : "value" }, "Sign" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Term" : { "is" : "n Number", "mode" : "value" Index: modules/pt/tests/data/ok/peg_json-indented/2_fun_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-indented/2_fun_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-indented/2_fun_arithmetic @@ -1,18 +1,18 @@ { "pt::grammar::peg" : { "rules" : { "AddOp" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Digit" : { - "is" : "\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", + "is" : "/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}", "mode" : "value" }, "Expression" : { - "is" : "\/ {n Function} {\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}", + "is" : "/ {n Function} {/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}", "mode" : "value" }, "Factor" : { "is" : "x {n Term} {* {x {n AddOp} {n Term}}}", "mode" : "value" @@ -20,19 +20,19 @@ "Function" : { "is" : "n Sinus", "mode" : "value" }, "MulOp" : { - "is" : "\/ {t *} {t \/}", + "is" : "/ {t *} {t /}", "mode" : "value" }, "Number" : { "is" : "x {? {n Sign}} {+ {n Digit}}", "mode" : "value" }, "Sign" : { - "is" : "\/ {t -} {t +}", + "is" : "/ {t -} {t +}", "mode" : "value" }, "Sinus" : { "is" : "x {t s} {t i} {t n} {t (} {n Expression} {t )}", "mode" : "value" Index: modules/pt/tests/data/ok/peg_json-indented/3_peg_itself ================================================================== --- modules/pt/tests/data/ok/peg_json-indented/3_peg_itself.orig +++ modules/pt/tests/data/ok/peg_json-indented/3_peg_itself @@ -20,15 +20,15 @@ "ASCII" : { "is" : "x {t <} {t a} {t s} {t c} {t i} {t i} {t >} {n WHITESPACE}", "mode" : "leaf" }, "Attribute" : { - "is" : "x {\/ {n VOID} {n LEAF}} {n COLON}", + "is" : "x {/ {n VOID} {n LEAF}} {n COLON}", "mode" : "value" }, "Char" : { - "is" : "\/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}", + "is" : "/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}", "mode" : "value" }, "CharOctalFull" : { "is" : "x {t \\\\} {.. 0 2} {.. 0 7} {.. 0 7}", "mode" : "leaf" @@ -36,11 +36,11 @@ "CharOctalPart" : { "is" : "x {t \\\\} {.. 0 7} {? {.. 0 7}}", "mode" : "leaf" }, "CharSpecial" : { - "is" : "x {t \\\\} {\/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}", + "is" : "x {t \\\\} {/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}", "mode" : "leaf" }, "CharUnescaped" : { "is" : "x {! {t \\\\}} dot", "mode" : "leaf" @@ -100,11 +100,11 @@ "EOF" : { "is" : "! dot", "mode" : "void" }, "EOL" : { - "is" : "\/ {t {\n}} {t {\r}}", + "is" : "/ {t {\n}} {t {\r}}", "mode" : "void" }, "Expression" : { "is" : "x {n Sequence} {* {x {n SLASH} {n Sequence}}}", "mode" : "value" @@ -124,11 +124,11 @@ "Header" : { "is" : "x {n PEG} {n Identifier} {n StartExpr}", "mode" : "value" }, "Ident" : { - "is" : "x {\/ {t _} {t :} alpha} {* {\/ {t _} {t :} alnum}}", + "is" : "x {/ {t _} {t :} alpha} {* {/ {t _} {t :} alnum}}", "mode" : "leaf" }, "Identifier" : { "is" : "x {n Ident} {n WHITESPACE}", "mode" : "value" @@ -140,11 +140,11 @@ "LEAF" : { "is" : "x {t l} {t e} {t a} {t f} {n WHITESPACE}", "mode" : "leaf" }, "Literal" : { - "is" : "\/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}", + "is" : "/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}", "mode" : "value" }, "LOWER" : { "is" : "x {t <} {t l} {t o} {t w} {t e} {t r} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -168,15 +168,15 @@ "PLUS" : { "is" : "x {t +} {n WHITESPACE}", "mode" : "leaf" }, "Prefix" : { - "is" : "x {? {\/ {n AND} {n NOT}}} {n Suffix}", + "is" : "x {? {/ {n AND} {n NOT}}} {n Suffix}", "mode" : "value" }, "Primary" : { - "is" : "\/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}", + "is" : "/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}", "mode" : "value" }, "PRINTABLE" : { "is" : "x {t <} {t p} {t r} {t i} {t n} {t t} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -188,11 +188,11 @@ "QUESTION" : { "is" : "x {t ?} {n WHITESPACE}", "mode" : "leaf" }, "Range" : { - "is" : "\/ {x {n Char} {n TO} {n Char}} {n Char}", + "is" : "/ {x {n Char} {n TO} {n Char}} {n Char}", "mode" : "value" }, "SEMICOLON" : { "is" : "x {t {;}} {n WHITESPACE}", "mode" : "void" @@ -200,11 +200,11 @@ "Sequence" : { "is" : "+ {n Prefix}", "mode" : "value" }, "SLASH" : { - "is" : "x {t \/} {n WHITESPACE}", + "is" : "x {t /} {n WHITESPACE}", "mode" : "void" }, "SPACE" : { "is" : "x {t <} {t s} {t p} {t a} {t c} {t e} {t >} {n WHITESPACE}", "mode" : "leaf" @@ -216,11 +216,11 @@ "StartExpr" : { "is" : "x {n OPEN} {n Expression} {n CLOSE}", "mode" : "value" }, "Suffix" : { - "is" : "x {n Primary} {? {\/ {n QUESTION} {n STAR} {n PLUS}}}", + "is" : "x {n Primary} {? {/ {n QUESTION} {n STAR} {n PLUS}}}", "mode" : "value" }, "TO" : { "is" : "t -", "mode" : "void" @@ -232,11 +232,11 @@ "VOID" : { "is" : "x {t v} {t o} {t i} {t d} {n WHITESPACE}", "mode" : "leaf" }, "WHITESPACE" : { - "is" : "* {\/ space {n COMMENT}}", + "is" : "* {/ space {n COMMENT}}", "mode" : "void" }, "WORDCHAR" : { "is" : "x {t <} {t w} {t o} {t r} {t d} {t c} {t h} {t a} {t r} {t >} {n WHITESPACE}", "mode" : "leaf" Index: modules/pt/tests/data/ok/peg_json-indented/4_choice ================================================================== --- modules/pt/tests/data/ok/peg_json-indented/4_choice.orig +++ modules/pt/tests/data/ok/peg_json-indented/4_choice @@ -1,6 +1,6 @@ { "pt::grammar::peg" : { "rules" : {}, - "start" : "\/ {t a} {t b} {t c}" + "start" : "/ {t a} {t b} {t c}" } } Index: modules/pt/tests/data/ok/peg_json-ultracompact/0_basic_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-ultracompact/0_basic_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-ultracompact/0_basic_arithmetic @@ -1,1 +1,1 @@ -{"pt::grammar::peg":{"rules":{"AddOp":{"is":"\/ {t -} {t +}","mode":"value"},"Digit":{"is":"\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}","mode":"value"},"Expression":{"is":"\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}","mode":"value"},"Factor":{"is":"x {n Term} {* {x {n AddOp} {n Term}}}","mode":"value"},"MulOp":{"is":"\/ {t *} {t \/}","mode":"value"},"Number":{"is":"x {? {n Sign}} {+ {n Digit}}","mode":"value"},"Sign":{"is":"\/ {t -} {t +}","mode":"value"},"Term":{"is":"n Number","mode":"value"}},"start":"n Expression"}} +{"pt::grammar::peg":{"rules":{"AddOp":{"is":"/ {t -} {t +}","mode":"value"},"Digit":{"is":"/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}","mode":"value"},"Expression":{"is":"/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}","mode":"value"},"Factor":{"is":"x {n Term} {* {x {n AddOp} {n Term}}}","mode":"value"},"MulOp":{"is":"/ {t *} {t /}","mode":"value"},"Number":{"is":"x {? {n Sign}} {+ {n Digit}}","mode":"value"},"Sign":{"is":"/ {t -} {t +}","mode":"value"},"Term":{"is":"n Number","mode":"value"}},"start":"n Expression"}} Index: modules/pt/tests/data/ok/peg_json-ultracompact/2_fun_arithmetic ================================================================== --- modules/pt/tests/data/ok/peg_json-ultracompact/2_fun_arithmetic.orig +++ modules/pt/tests/data/ok/peg_json-ultracompact/2_fun_arithmetic @@ -1,1 +1,1 @@ -{"pt::grammar::peg":{"rules":{"AddOp":{"is":"\/ {t -} {t +}","mode":"value"},"Digit":{"is":"\/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}","mode":"value"},"Expression":{"is":"\/ {n Function} {\/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}","mode":"value"},"Factor":{"is":"x {n Term} {* {x {n AddOp} {n Term}}}","mode":"value"},"Function":{"is":"n Sinus","mode":"value"},"MulOp":{"is":"\/ {t *} {t \/}","mode":"value"},"Number":{"is":"x {? {n Sign}} {+ {n Digit}}","mode":"value"},"Sign":{"is":"\/ {t -} {t +}","mode":"value"},"Sinus":{"is":"x {t s} {t i} {t n} {t (} {n Expression} {t )}","mode":"value"},"Term":{"is":"n Number","mode":"value"}},"start":"n Expression"}} +{"pt::grammar::peg":{"rules":{"AddOp":{"is":"/ {t -} {t +}","mode":"value"},"Digit":{"is":"/ {t 0} {t 1} {t 2} {t 3} {t 4} {t 5} {t 6} {t 7} {t 8} {t 9}","mode":"value"},"Expression":{"is":"/ {n Function} {/ {x {t (} {n Expression} {t )}} {x {n Factor} {* {x {n MulOp} {n Factor}}}}}","mode":"value"},"Factor":{"is":"x {n Term} {* {x {n AddOp} {n Term}}}","mode":"value"},"Function":{"is":"n Sinus","mode":"value"},"MulOp":{"is":"/ {t *} {t /}","mode":"value"},"Number":{"is":"x {? {n Sign}} {+ {n Digit}}","mode":"value"},"Sign":{"is":"/ {t -} {t +}","mode":"value"},"Sinus":{"is":"x {t s} {t i} {t n} {t (} {n Expression} {t )}","mode":"value"},"Term":{"is":"n Number","mode":"value"}},"start":"n Expression"}} Index: modules/pt/tests/data/ok/peg_json-ultracompact/3_peg_itself ================================================================== --- modules/pt/tests/data/ok/peg_json-ultracompact/3_peg_itself.orig +++ modules/pt/tests/data/ok/peg_json-ultracompact/3_peg_itself @@ -1,1 +1,1 @@ -{"pt::grammar::peg":{"rules":{"ALNUM":{"is":"x {t <} {t a} {t l} {t n} {t u} {t m} {t >} {n WHITESPACE}","mode":"leaf"},"ALPHA":{"is":"x {t <} {t a} {t l} {t p} {t h} {t a} {t >} {n WHITESPACE}","mode":"leaf"},"AND":{"is":"x {t &} {n WHITESPACE}","mode":"leaf"},"APOSTROPH":{"is":"t '","mode":"void"},"ASCII":{"is":"x {t <} {t a} {t s} {t c} {t i} {t i} {t >} {n WHITESPACE}","mode":"leaf"},"Attribute":{"is":"x {\/ {n VOID} {n LEAF}} {n COLON}","mode":"value"},"Char":{"is":"\/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}","mode":"value"},"CharOctalFull":{"is":"x {t \\\\} {.. 0 2} {.. 0 7} {.. 0 7}","mode":"leaf"},"CharOctalPart":{"is":"x {t \\\\} {.. 0 7} {? {.. 0 7}}","mode":"leaf"},"CharSpecial":{"is":"x {t \\\\} {\/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}","mode":"leaf"},"CharUnescaped":{"is":"x {! {t \\\\}} dot","mode":"leaf"},"CharUnicode":{"is":"x {t \\\\} {t u} xdigit {? {x xdigit {? {x xdigit {? xdigit}}}}}","mode":"leaf"},"Class":{"is":"x {n OPENB} {* {x {! {n CLOSEB}} {n Range}}} {n CLOSEB} {n WHITESPACE}","mode":"value"},"CLOSE":{"is":"x {t )} {n WHITESPACE}","mode":"void"},"CLOSEB":{"is":"t \\]","mode":"void"},"COLON":{"is":"x {t :} {n WHITESPACE}","mode":"void"},"COMMENT":{"is":"x {t #} {* {x {! {n EOL}} dot}} {n EOL}","mode":"void"},"CONTROL":{"is":"x {t <} {t c} {t o} {t n} {t t} {t r} {t o} {t l} {t >} {n WHITESPACE}","mode":"leaf"},"DAPOSTROPH":{"is":"t {\"}","mode":"void"},"DDIGIT":{"is":"x {t <} {t d} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"Definition":{"is":"x {? {n Attribute}} {n Identifier} {n IS} {n Expression} {n SEMICOLON}","mode":"value"},"DIGIT":{"is":"x {t <} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"DOT":{"is":"x {t .} {n WHITESPACE}","mode":"leaf"},"END":{"is":"x {t E} {t N} {t D} {n WHITESPACE}","mode":"void"},"EOF":{"is":"! dot","mode":"void"},"EOL":{"is":"\/ {t {\n}} {t {\r}}","mode":"void"},"Expression":{"is":"x {n Sequence} {* {x {n SLASH} {n Sequence}}}","mode":"value"},"Final":{"is":"x {n END} {n SEMICOLON} {n WHITESPACE}","mode":"void"},"Grammar":{"is":"x {n WHITESPACE} {n Header} {* {n Definition}} {n Final} {n EOF}","mode":"value"},"GRAPH":{"is":"x {t <} {t g} {t r} {t a} {t p} {t h} {t >} {n WHITESPACE}","mode":"leaf"},"Header":{"is":"x {n PEG} {n Identifier} {n StartExpr}","mode":"value"},"Ident":{"is":"x {\/ {t _} {t :} alpha} {* {\/ {t _} {t :} alnum}}","mode":"leaf"},"Identifier":{"is":"x {n Ident} {n WHITESPACE}","mode":"value"},"IS":{"is":"x {t <} {t -} {n WHITESPACE}","mode":"void"},"LEAF":{"is":"x {t l} {t e} {t a} {t f} {n WHITESPACE}","mode":"leaf"},"Literal":{"is":"\/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}","mode":"value"},"LOWER":{"is":"x {t <} {t l} {t o} {t w} {t e} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"NOT":{"is":"x {t !} {n WHITESPACE}","mode":"leaf"},"OPEN":{"is":"x {t (} {n WHITESPACE}","mode":"void"},"OPENB":{"is":"t {[}","mode":"void"},"PEG":{"is":"x {t P} {t E} {t G} {n WHITESPACE}","mode":"void"},"PLUS":{"is":"x {t +} {n WHITESPACE}","mode":"leaf"},"Prefix":{"is":"x {? {\/ {n AND} {n NOT}}} {n Suffix}","mode":"value"},"Primary":{"is":"\/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}","mode":"value"},"PRINTABLE":{"is":"x {t <} {t p} {t r} {t i} {t n} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"PUNCT":{"is":"x {t <} {t p} {t u} {t n} {t c} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"QUESTION":{"is":"x {t ?} {n WHITESPACE}","mode":"leaf"},"Range":{"is":"\/ {x {n Char} {n TO} {n Char}} {n Char}","mode":"value"},"SEMICOLON":{"is":"x {t {;}} {n WHITESPACE}","mode":"void"},"Sequence":{"is":"+ {n Prefix}","mode":"value"},"SLASH":{"is":"x {t \/} {n WHITESPACE}","mode":"void"},"SPACE":{"is":"x {t <} {t s} {t p} {t a} {t c} {t e} {t >} {n WHITESPACE}","mode":"leaf"},"STAR":{"is":"x {t *} {n WHITESPACE}","mode":"leaf"},"StartExpr":{"is":"x {n OPEN} {n Expression} {n CLOSE}","mode":"value"},"Suffix":{"is":"x {n Primary} {? {\/ {n QUESTION} {n STAR} {n PLUS}}}","mode":"value"},"TO":{"is":"t -","mode":"void"},"UPPER":{"is":"x {t <} {t u} {t p} {t p} {t e} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"VOID":{"is":"x {t v} {t o} {t i} {t d} {n WHITESPACE}","mode":"leaf"},"WHITESPACE":{"is":"* {\/ space {n COMMENT}}","mode":"void"},"WORDCHAR":{"is":"x {t <} {t w} {t o} {t r} {t d} {t c} {t h} {t a} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"XDIGIT":{"is":"x {t <} {t x} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"}},"start":"n Grammar"}} +{"pt::grammar::peg":{"rules":{"ALNUM":{"is":"x {t <} {t a} {t l} {t n} {t u} {t m} {t >} {n WHITESPACE}","mode":"leaf"},"ALPHA":{"is":"x {t <} {t a} {t l} {t p} {t h} {t a} {t >} {n WHITESPACE}","mode":"leaf"},"AND":{"is":"x {t &} {n WHITESPACE}","mode":"leaf"},"APOSTROPH":{"is":"t '","mode":"void"},"ASCII":{"is":"x {t <} {t a} {t s} {t c} {t i} {t i} {t >} {n WHITESPACE}","mode":"leaf"},"Attribute":{"is":"x {/ {n VOID} {n LEAF}} {n COLON}","mode":"value"},"Char":{"is":"/ {n CharSpecial} {n CharOctalFull} {n CharOctalPart} {n CharUnicode} {n CharUnescaped}","mode":"value"},"CharOctalFull":{"is":"x {t \\\\} {.. 0 2} {.. 0 7} {.. 0 7}","mode":"leaf"},"CharOctalPart":{"is":"x {t \\\\} {.. 0 7} {? {.. 0 7}}","mode":"leaf"},"CharSpecial":{"is":"x {t \\\\} {/ {t n} {t r} {t t} {t '} {t {\"}} {t {[}} {t \\]} {t \\\\}}","mode":"leaf"},"CharUnescaped":{"is":"x {! {t \\\\}} dot","mode":"leaf"},"CharUnicode":{"is":"x {t \\\\} {t u} xdigit {? {x xdigit {? {x xdigit {? xdigit}}}}}","mode":"leaf"},"Class":{"is":"x {n OPENB} {* {x {! {n CLOSEB}} {n Range}}} {n CLOSEB} {n WHITESPACE}","mode":"value"},"CLOSE":{"is":"x {t )} {n WHITESPACE}","mode":"void"},"CLOSEB":{"is":"t \\]","mode":"void"},"COLON":{"is":"x {t :} {n WHITESPACE}","mode":"void"},"COMMENT":{"is":"x {t #} {* {x {! {n EOL}} dot}} {n EOL}","mode":"void"},"CONTROL":{"is":"x {t <} {t c} {t o} {t n} {t t} {t r} {t o} {t l} {t >} {n WHITESPACE}","mode":"leaf"},"DAPOSTROPH":{"is":"t {\"}","mode":"void"},"DDIGIT":{"is":"x {t <} {t d} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"Definition":{"is":"x {? {n Attribute}} {n Identifier} {n IS} {n Expression} {n SEMICOLON}","mode":"value"},"DIGIT":{"is":"x {t <} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"DOT":{"is":"x {t .} {n WHITESPACE}","mode":"leaf"},"END":{"is":"x {t E} {t N} {t D} {n WHITESPACE}","mode":"void"},"EOF":{"is":"! dot","mode":"void"},"EOL":{"is":"/ {t {\n}} {t {\r}}","mode":"void"},"Expression":{"is":"x {n Sequence} {* {x {n SLASH} {n Sequence}}}","mode":"value"},"Final":{"is":"x {n END} {n SEMICOLON} {n WHITESPACE}","mode":"void"},"Grammar":{"is":"x {n WHITESPACE} {n Header} {* {n Definition}} {n Final} {n EOF}","mode":"value"},"GRAPH":{"is":"x {t <} {t g} {t r} {t a} {t p} {t h} {t >} {n WHITESPACE}","mode":"leaf"},"Header":{"is":"x {n PEG} {n Identifier} {n StartExpr}","mode":"value"},"Ident":{"is":"x {/ {t _} {t :} alpha} {* {/ {t _} {t :} alnum}}","mode":"leaf"},"Identifier":{"is":"x {n Ident} {n WHITESPACE}","mode":"value"},"IS":{"is":"x {t <} {t -} {n WHITESPACE}","mode":"void"},"LEAF":{"is":"x {t l} {t e} {t a} {t f} {n WHITESPACE}","mode":"leaf"},"Literal":{"is":"/ {x {n APOSTROPH} {* {x {! {n APOSTROPH}} {n Char}}} {n APOSTROPH} {n WHITESPACE}} {x {n DAPOSTROPH} {* {x {! {n DAPOSTROPH}} {n Char}}} {n DAPOSTROPH} {n WHITESPACE}}","mode":"value"},"LOWER":{"is":"x {t <} {t l} {t o} {t w} {t e} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"NOT":{"is":"x {t !} {n WHITESPACE}","mode":"leaf"},"OPEN":{"is":"x {t (} {n WHITESPACE}","mode":"void"},"OPENB":{"is":"t {[}","mode":"void"},"PEG":{"is":"x {t P} {t E} {t G} {n WHITESPACE}","mode":"void"},"PLUS":{"is":"x {t +} {n WHITESPACE}","mode":"leaf"},"Prefix":{"is":"x {? {/ {n AND} {n NOT}}} {n Suffix}","mode":"value"},"Primary":{"is":"/ {n ALNUM} {n ALPHA} {n ASCII} {n CONTROL} {n DDIGIT} {n DIGIT} {n GRAPH} {n LOWER} {n PRINTABLE} {n PUNCT} {n SPACE} {n UPPER} {n WORDCHAR} {n XDIGIT} {n Identifier} {x {n OPEN} {n Expression} {n CLOSE}} {n Literal} {n Class} {n DOT}","mode":"value"},"PRINTABLE":{"is":"x {t <} {t p} {t r} {t i} {t n} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"PUNCT":{"is":"x {t <} {t p} {t u} {t n} {t c} {t t} {t >} {n WHITESPACE}","mode":"leaf"},"QUESTION":{"is":"x {t ?} {n WHITESPACE}","mode":"leaf"},"Range":{"is":"/ {x {n Char} {n TO} {n Char}} {n Char}","mode":"value"},"SEMICOLON":{"is":"x {t {;}} {n WHITESPACE}","mode":"void"},"Sequence":{"is":"+ {n Prefix}","mode":"value"},"SLASH":{"is":"x {t /} {n WHITESPACE}","mode":"void"},"SPACE":{"is":"x {t <} {t s} {t p} {t a} {t c} {t e} {t >} {n WHITESPACE}","mode":"leaf"},"STAR":{"is":"x {t *} {n WHITESPACE}","mode":"leaf"},"StartExpr":{"is":"x {n OPEN} {n Expression} {n CLOSE}","mode":"value"},"Suffix":{"is":"x {n Primary} {? {/ {n QUESTION} {n STAR} {n PLUS}}}","mode":"value"},"TO":{"is":"t -","mode":"void"},"UPPER":{"is":"x {t <} {t u} {t p} {t p} {t e} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"VOID":{"is":"x {t v} {t o} {t i} {t d} {n WHITESPACE}","mode":"leaf"},"WHITESPACE":{"is":"* {/ space {n COMMENT}}","mode":"void"},"WORDCHAR":{"is":"x {t <} {t w} {t o} {t r} {t d} {t c} {t h} {t a} {t r} {t >} {n WHITESPACE}","mode":"leaf"},"XDIGIT":{"is":"x {t <} {t x} {t d} {t i} {t g} {t i} {t t} {t >} {n WHITESPACE}","mode":"leaf"}},"start":"n Grammar"}} Index: modules/pt/tests/data/ok/peg_json-ultracompact/4_choice ================================================================== --- modules/pt/tests/data/ok/peg_json-ultracompact/4_choice.orig +++ modules/pt/tests/data/ok/peg_json-ultracompact/4_choice @@ -1,1 +1,1 @@ -{"pt::grammar::peg":{"rules":{},"start":"\/ {t a} {t b} {t c}"}} +{"pt::grammar::peg":{"rules":{},"start":"/ {t a} {t b} {t c}"}}