python/oN3

arithExpr --- begin test --------------------------------
grammar source, ('s=s+p', 's = p', "p = p '*' i", 'p = i', "i = '(' s  \t\t ')'", "i = '0'", "i = '1'", "i = '2'")
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
dbg: gen lrK, 1
test begin  arithExpr 0 input: 2 --------------------------------
parsed s@0 from 1 tokens, 7 steps,  17 states, Rules 11
2    s@0 s@2 p@3 p@5 i@6 i@10 ==2
test begin  arithExpr 1 input: 1 + 2 * 0 --------------------------------
parsed s@0 from 5 tokens, 21 steps,  17 states, Rules 11
1    s@0 s@1 s@0 s@2 p@3 p@5 i@6 i@9 ==1
+            ==+
2            p@3 p@4 p@3 p@5 i@6 i@10 ==2
*                    ==*
0                    i@6 i@8 ==0
test begin  arithExpr 2 input: 2 * ( 1 * 2 + 0 ) --------------------------------
parsed s@0 from 9 tokens, 35 steps,  17 states, Rules 11
2    s@0 s@2 p@3 p@4 p@3 p@5 i@6 i@10 ==2
*                    ==*
(                    i@6 i@7 ==(
1                            s@0 s@1 s@0 s@2 p@3 p@4 p@3 p@5 i@6 i@9 ==1
*                                                    ==*
2                                                    i@6 i@10 ==2
+                                    ==+
0                                    p@3 p@5 i@6 i@8 ==0
)                            ==)
test begin  arithExpr 3 input: 1 + 2 ( --------------------------------
dbg: syntax after 2 tokenNr 2 expected: ! ) * +, not lah: ( !
syntax test arithExpr 3 input 1 + 2 (: syntax after 2 tokenNr 2 expected: ! ) * +, not lah: ( !
test begin  arithExpr 4 input: 1 + 2 + --------------------------------
dbg: syntax after + tokenNr 3 expected: ( 0 1 2, not lah: !
syntax test arithExpr 4 input 1 + 2 +: syntax after + tokenNr 3 expected: ( 0 1 2, not lah: !
arithExprPM --- begin test --------------------------------
grammar source, ('s=s pm p', 's=p', 'p=p*i', 'p=p/i', 'p=i', 'i=(  s )', 'i = j', 'j=epm d', 'j=j d', 'epm = pm epm', 'epm =  ', 'pm=+', 'pm=-', 'd=0', 'd=1', 'd =  2  ')
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
dbg: gen lrK, 1
test begin  arithExprPM 0 input: 2 --------------------------------
parsed s@0 from 1 tokens, 13 steps,  31 states, Rules 23
     s@0 s@2 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
2                                      d@19 d@22 ==2
test begin  arithExprPM 1 input: 1 + 2 * 0 --------------------------------
parsed s@0 from 5 tokens, 41 steps,  31 states, Rules 23
     s@0 s@1 s@0 s@2 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
1                                              d@19 d@21 ==1
+            pm@16 pm@17 ==+
             p@3 p@4 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
2                                              d@19 d@22 ==2
*                    ==*
                     i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
0                                      d@19 d@20 ==0
test begin  arithExprPM 2 input: 2 * ( 1 * 2 + 0 ) --------------------------------
parsed s@0 from 9 tokens, 61 steps,  31 states, Rules 23
     s@0 s@2 p@3 p@4 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
2                                              d@19 d@22 ==2
*                    ==*
(                    i@7 i@8 ==(
                             s@0 s@1 s@0 s@2 p@3 p@4 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
1                                                                              d@19 d@21 ==1
*                                                    ==*
                                                     i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
2                                                                      d@19 d@22 ==2
+                                    pm@16 pm@17 ==+
                                     p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
0                                                              d@19 d@20 ==0
)                            ==)
test begin  arithExprPM 3 input: 1 + 2 ( --------------------------------
dbg: syntax after 2 tokenNr 2 expected: ! ) * + - / 0 1 2, not lah: ( !
syntax test arithExprPM 3 input 1 + 2 (: syntax after 2 tokenNr 2 expected: ! ) * + - / 0 1 2, not lah: ( !
test begin  arithExprPM 4 input: 1 + 2 + --------------------------------
dbg: syntax after + tokenNr 3 expected: ( + - 0 1 2, not lah: !
syntax test arithExprPM 4 input 1 + 2 +: syntax after + tokenNr 3 expected: ( + - 0 1 2, not lah: !
test begin  arithExprPM 5 input: 1 0 / - - 1 1 + + - 1 2 / ( 1 - - 2 / + 0 ) --------------------------------
parsed s@0 from 22 tokens, 134 steps,  31 states, Rules 23
     s@0 s@1 s@0 s@2 p@3 p@5 p@3 p@6 i@7 i@9 j@10 j@12 j@10 j@11 epm@13 epm@15 ==emptyRule
1                                                                d@19 d@21 ==1
0                                                      d@19 d@20 ==0
/                            ==/
-                            i@7 i@9 j@10 j@12 j@10 j@11 epm@13 epm@14 pm@16 pm@18 ==-
-                                                                      epm@13 epm@14 pm@16 pm@18 ==-
                                                                                     epm@13 epm@15 ==emptyRule
1                                                        d@19 d@21 ==1
1                                              d@19 d@21 ==1
+            pm@16 pm@17 ==+
+            p@3 p@5 p@3 p@6 i@7 i@9 j@10 j@12 j@10 j@11 epm@13 epm@14 pm@16 pm@17 ==+
-                                                                      epm@13 epm@14 pm@16 pm@18 ==-
                                                                                     epm@13 epm@15 ==emptyRule
1                                                        d@19 d@21 ==1
2                                              d@19 d@22 ==2
/                    ==/
(                    i@7 i@8 ==(
                             s@0 s@1 s@0 s@2 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@15 ==emptyRule
1                                                                      d@19 d@21 ==1
-                                    pm@16 pm@18 ==-
-                                    p@3 p@5 p@3 p@6 i@7 i@9 j@10 j@11 epm@13 epm@14 pm@16 pm@18 ==-
                                                                                     epm@13 epm@15 ==emptyRule
2                                                                      d@19 d@22 ==2
/                                            ==/
+                                            i@7 i@9 j@10 j@11 epm@13 epm@14 pm@16 pm@17 ==+
                                                                             epm@13 epm@15 ==emptyRule
0                                                              d@19 d@20 ==0
)                            ==)
arithExprPE --- begin test --------------------------------
grammar source, ('s=s pm p', 's=p', 'p=p*e', 'p=p/e', 'p=e', 'e=i', 'e=i**e', 'i=(  s )', ' i=j', 'j=epm d', 'j=j d', 'epm = pm epm', 'epm =  ', 'pm=+', 'pm=-', 'd=0', 'd=1', 'd =  2  ')
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
dbg: gen lrK, 1
dbg: goF3 conflict, s10{pa={e@8#1, e@9#1}}, *, {e@8, s11}
dbg: gen lrK, 2
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
test begin  arithExprPE 0 input: 2 --------------------------------
parsed s@0 from 1 tokens, 15 steps,  36 states, Rules 26
     s@0 s@2 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
2                                                d@22 d@25 ==2
test begin  arithExprPE 1 input: 1 + 2 * 0 --------------------------------
parsed s@0 from 5 tokens, 47 steps,  36 states, Rules 26
     s@0 s@1 s@0 s@2 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
1                                                        d@22 d@24 ==1
+            pm@19 pm@20 ==+
             p@3 p@4 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
2                                                        d@22 d@25 ==2
*                    ==*
                     e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
0                                                d@22 d@23 ==0
test begin  arithExprPE 2 input: 2 * ( 1 * 2 + 0 ) --------------------------------
parsed s@0 from 9 tokens, 71 steps,  36 states, Rules 26
     s@0 s@2 p@3 p@4 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
2                                                        d@22 d@25 ==2
*                    ==*
(                    e@7 e@8 i@10 i@11 ==(
                                       s@0 s@1 s@0 s@2 p@3 p@4 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
1                                                                                                  d@22 d@24 ==1
*                                                              ==*
                                                               e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
2                                                                                          d@22 d@25 ==2
+                                              pm@19 pm@20 ==+
                                               p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
0                                                                                  d@22 d@23 ==0
)                                      ==)
test begin  arithExprPE 3 input: 1 + 2 ( --------------------------------
dbg: syntax after 2 tokenNr 2 expected: ! )! )) )* )+ )- )/ *( ** *+ *- *0 *1 *2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 /( /+ /- /0 /1 /2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: ( !
syntax test arithExprPE 3 input 1 + 2 (: syntax after 2 tokenNr 2 expected: ! )! )) )* )+ )- )/ *( ** *+ *- *0 *1 *2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 /( /+ /- /0 /1 /2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: ( !
test begin  arithExprPE 4 input: 1 + 2 + --------------------------------
dbg: syntax after + tokenNr 3 expected: (( (+ (- (0 (1 (2 ++ +- +0 +1 +2 -+ -- -0 -1 -2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: !
syntax test arithExprPE 4 input 1 + 2 +: syntax after + tokenNr 3 expected: (( (+ (- (0 (1 (2 ++ +- +0 +1 +2 -+ -- -0 -1 -2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: !
test begin  arithExprPE 5 input: 1 0 / - - 1 1 + + - 1 2 / ( 1 - - 2 / + 0 ) --------------------------------
parsed s@0 from 22 tokens, 148 steps,  36 states, Rules 26
     s@0 s@1 s@0 s@2 p@3 p@5 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@15 j@13 j@14 epm@16 epm@18 ==emptyRule
1                                                                          d@22 d@24 ==1
0                                                                d@22 d@23 ==0
/                            ==/
-                            e@7 e@8 i@10 i@12 j@13 j@15 j@13 j@14 epm@16 epm@17 pm@19 pm@21 ==-
-                                                                                epm@16 epm@17 pm@19 pm@21 ==-
                                                                                               epm@16 epm@18 ==emptyRule
1                                                                  d@22 d@24 ==1
1                                                        d@22 d@24 ==1
+            pm@19 pm@20 ==+
+            p@3 p@5 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@15 j@13 j@14 epm@16 epm@17 pm@19 pm@20 ==+
-                                                                                epm@16 epm@17 pm@19 pm@21 ==-
                                                                                               epm@16 epm@18 ==emptyRule
1                                                                  d@22 d@24 ==1
2                                                        d@22 d@25 ==2
/                    ==/
(                    e@7 e@8 i@10 i@11 ==(
                                       s@0 s@1 s@0 s@2 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@18 ==emptyRule
1                                                                                          d@22 d@24 ==1
-                                              pm@19 pm@21 ==-
-                                              p@3 p@5 p@3 p@6 e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@17 pm@19 pm@21 ==-
                                                                                                         epm@16 epm@18 ==emptyRule
2                                                                                          d@22 d@25 ==2
/                                                      ==/
+                                                      e@7 e@8 i@10 i@12 j@13 j@14 epm@16 epm@17 pm@19 pm@20 ==+
                                                                                                 epm@16 epm@18 ==emptyRule
0                                                                                  d@22 d@23 ==0
)                                      ==)
arithExprPE2 --- begin test --------------------------------
grammar source, ('s=s pm p', 's=p', 'p=p*e', 'p=p/e', 'p=e', 'e=i', 'e=i**e', 'e=pm e', 'pm=+', 'pm=-', 'i=(  s )', 'i = dd', 'dd=d', 'dd=d dd', 'd=0', 'd=1', 'd =  2  ')
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
dbg: gen lrK, 1
dbg: goF3 conflict, s14{pa={e@8#1, e@9#1}}, *, {e@8, s15}
dbg: gen lrK, 2
dbg: lahGen, 4, rounds
dbg: laXGen, 4, rounds
test begin  arithExprPE2 0 input: 2 --------------------------------
parsed s@0 from 1 tokens, 13 steps,  34 states, Rules 24
2    s@0 s@2 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@23 ==2
test begin  arithExprPE2 1 input: 1 + 2 * 0 --------------------------------
parsed s@0 from 5 tokens, 41 steps,  34 states, Rules 24
1    s@0 s@1 s@0 s@2 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@22 ==1
+            pm@11 pm@12 ==+
2            p@3 p@4 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@23 ==2
*                    ==*
0                    e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@21 ==0
test begin  arithExprPE2 2 input: 2 * ( 1 * 2 + 0 ) --------------------------------
parsed s@0 from 9 tokens, 63 steps,  34 states, Rules 24
2    s@0 s@2 p@3 p@4 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@23 ==2
*                    ==*
(                    e@7 e@8 i@14 i@15 ==(
1                                      s@0 s@1 s@0 s@2 p@3 p@4 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@22 ==1
*                                                              ==*
2                                                              e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@23 ==2
+                                              pm@11 pm@12 ==+
0                                              p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@21 ==0
)                                      ==)
test begin  arithExprPE2 3 input: 1 + 2 ( --------------------------------
dbg: syntax after 2 tokenNr 2 expected: ! )! )) )* )+ )- )/ *( ** *+ *- *0 *1 *2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 /( /+ /- /0 /1 /2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: ( !
syntax test arithExprPE2 3 input 1 + 2 (: syntax after 2 tokenNr 2 expected: ! )! )) )* )+ )- )/ *( ** *+ *- *0 *1 *2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 /( /+ /- /0 /1 /2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: ( !
test begin  arithExprPE2 4 input: 1 + 2 + --------------------------------
dbg: syntax after + tokenNr 3 expected: (( (+ (- (0 (1 (2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: !
syntax test arithExprPE2 4 input 1 + 2 +: syntax after + tokenNr 3 expected: (( (+ (- (0 (1 (2 +( ++ +- +0 +1 +2 -( -+ -- -0 -1 -2 0! 0) 0* 0+ 0- 0/ 00 01 02 1! 1) 1* 1+ 1- 1/ 10 11 12 2! 2) 2* 2+ 2- 2/ 20 21 22, not lah: !
test begin  arithExprPE2 5 input: 1 0 / - - 1 1 + + - 1 2 / ( 1 - - 2 / + 0 ) --------------------------------
parsed s@0 from 22 tokens, 136 steps,  34 states, Rules 24
1    s@0 s@1 s@0 s@2 p@3 p@5 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@19 d@20 d@22 ==1
0                                                                  dd@17 dd@18 d@20 d@21 ==0
/                            ==/
-                            e@7 e@10 pm@11 pm@13 ==-
-                                     e@7 e@10 pm@11 pm@13 ==-
1                                              e@7 e@8 i@14 i@16 dd@17 dd@19 d@20 d@22 ==1
1                                                                            dd@17 dd@18 d@20 d@22 ==1
+            pm@11 pm@12 ==+
+            p@3 p@5 p@3 p@6 e@7 e@10 pm@11 pm@12 ==+
-                                     e@7 e@10 pm@11 pm@13 ==-
1                                              e@7 e@8 i@14 i@16 dd@17 dd@19 d@20 d@22 ==1
2                                                                            dd@17 dd@18 d@20 d@23 ==2
/                    ==/
(                    e@7 e@8 i@14 i@15 ==(
1                                      s@0 s@1 s@0 s@2 p@3 p@6 e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@22 ==1
-                                              pm@11 pm@13 ==-
-                                              p@3 p@5 p@3 p@6 e@7 e@10 pm@11 pm@13 ==-
2                                                                       e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@23 ==2
/                                                      ==/
+                                                      e@7 e@10 pm@11 pm@12 ==+
0                                                               e@7 e@8 i@14 i@16 dd@17 dd@18 d@20 d@21 ==0
)                                      ==)
LR(2)? --- begin test --------------------------------
grammar source, ("S = AA 'a' 'a'", "S = AB 'a' 'b'", 'AA =', 'AB =')
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
dbg: gen lrK, 1
dbg: goF3 conflict, s0{pa={S@0#0}}, a, {AA@3, AB@4}
dbg: gen lrK, 2
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
test begin  LR(2)? 0 input: a a --------------------------------
parsed S@0 from 2 tokens, 4 steps,  8 states, Rules 5
     S@0 S@1 AA@3 ==emptyRule
a            ==a
a            ==a
test begin  LR(2)? 1 input: a b --------------------------------
parsed S@0 from 2 tokens, 4 steps,  8 states, Rules 5
     S@0 S@2 AB@4 ==emptyRule
a            ==a
b            ==b
test begin  LR(2)? 2 input: a c --------------------------------
dbg: syntax at begin tokenNr -1 expected: aa ab, not lah: a c !
syntax test LR(2)? 2 input a c: syntax at begin tokenNr -1 expected: aa ab, not lah: a c !
test begin  LR(2)? 3 input: b a --------------------------------
dbg: syntax at begin tokenNr -1 expected: aa ab, not lah: b a !
syntax test LR(2)? 3 input b a: syntax at begin tokenNr -1 expected: aa ab, not lah: b a !
knuth(1) --- begin test --------------------------------
grammar source, ('S = A D', "A = 'a' C", "B = 'b' 'c' 'd'", 'C = B E', 'D =', "E = 'e'")
dbg: lahGen, 3, rounds
dbg: laXGen, 3, rounds
dbg: gen lrK, 1
test begin  knuth(1) 0 input: a b c d e --------------------------------
parsed S@0 from 5 tokens, 10 steps,  11 states, Rules 6
a    S@0 A@1 ==a
b            C@3 B@2 ==b
c                    ==c
d                    ==d
e                E@5 ==e
         D@4 ==emptyRule
test begin  knuth(1) 1 input: a b x d e --------------------------------
dbg: syntax after b tokenNr 1 expected: c, not lah: x d e !
syntax test knuth(1) 1 input a b x d e: syntax after b tokenNr 1 expected: c, not lah: x d e !
test begin  knuth(1) 2 input: a b --------------------------------
dbg: syntax after b tokenNr 1 expected: c, not lah: !
syntax test knuth(1) 2 input a b: syntax after b tokenNr 1 expected: c, not lah: !
test begin  knuth(1) 3 input: a b c d e f --------------------------------
dbg: syntax after e tokenNr 4 expected: !, not lah: f !
syntax test knuth(1) 3 input a b c d e f: syntax after e tokenNr 4 expected: !, not lah: f !
knuth(6) --- begin test --------------------------------
grammar source, ("S = 'a' A 'c'", "A = 'b' A 'b'", "A = 'b'")
dbg: lahGen, 3, rounds
dbg: laXGen, 3, rounds
dbg: gen lrK, 1
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, b, {A@3, s2}
dbg: gen lrK, 2
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bb, {A@3, s2}
dbg: gen lrK, 3
dbg: lahGen, 3, rounds
dbg: laXGen, 3, rounds
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bbc, {A@3, s2}
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bbb, {A@3, s2}
dbg: gen lrK, 4
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bbc, {A@3, s2}
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bbbc, {A@3, s2}
dbg: goF3 conflict, s2{pa={A@2#1, A@3#1}}, bbbb, {A@3, s2}
error generating grammar knuth(6) makeAll: still conflicts at lrK 4
knuth(7) lr(0) --- begin test --------------------------------
grammar source, ("S = 'a' A 'c'", "A =  A 'b' 'b'", "A = 'b'")
dbg: lahGen, 3, rounds
dbg: laXGen, 3, rounds
dbg: gen lrK, 1
test begin  knuth(7) lr(0) 0 input: a b b b c --------------------------------
parsed S@0 from 5 tokens, 9 steps,  8 states, Rules 4
a    S@0 ==a
b        A@1 A@2 A@1 A@3 ==b
b                ==b
b                ==b
c        ==c
test begin  knuth(7) lr(0) 1 input: a b c --------------------------------
parsed S@0 from 3 tokens, 5 steps,  8 states, Rules 4
a    S@0 ==a
b        A@1 A@3 ==b
c        ==c
test begin  knuth(7) lr(0) 2 input: a b b c --------------------------------
dbg: syntax after b tokenNr 2 expected: b, not lah: c !
syntax test knuth(7) lr(0) 2 input a b b c: syntax after b tokenNr 2 expected: b, not lah: c !
test begin  knuth(7) lr(0) 3 input: a b b b b b b b c e --------------------------------
dbg: syntax after c tokenNr 8 expected: !, not lah: e !
syntax test knuth(7) lr(0) 3 input a b b b b b b b c e: syntax after c tokenNr 8 expected: !, not lah: e !
knuth(16x) lr(3) --- begin test --------------------------------
grammar source, ('S=B C', 'B=C e', 'B = ', 'C=D', 'C=D c', 'D=', 'D=d')
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
dbg: gen lrK, 1
dbg: goF3 conflict, s0{pa={S@0#0}}, d, {B@3, s1}
dbg: goF3 conflict, s0{pa={S@0#0}}, c, {B@3, D@8}
dbg: gen lrK, 2
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
dbg: goF3 conflict, s0{pa={S@0#0}}, dc, {B@3, s1}
dbg: gen lrK, 3
dbg: lahGen, 2, rounds
dbg: laXGen, 2, rounds
test begin  knuth(16x) lr(3) 0 input:  --------------------------------
parsed S@0 from 0 tokens, 6 steps,  11 states, Rules 10
     S@0 B@1 B@3 ==emptyRule
         C@4 C@5 D@7 D@8 ==emptyRule
test begin  knuth(16x) lr(3) 1 input: c --------------------------------
parsed S@0 from 1 tokens, 7 steps,  11 states, Rules 10
     S@0 B@1 B@3 ==emptyRule
         C@4 C@6 D@7 D@8 ==emptyRule
c                ==c
test begin  knuth(16x) lr(3) 2 input: c e --------------------------------
parsed S@0 from 2 tokens, 12 steps,  11 states, Rules 10
     S@0 B@1 B@2 C@4 C@6 D@7 D@8 ==emptyRule
c                        ==c
e                ==e
         C@4 C@5 D@7 D@8 ==emptyRule
test begin  knuth(16x) lr(3) 3 input: c e d --------------------------------
parsed S@0 from 3 tokens, 13 steps,  11 states, Rules 10
     S@0 B@1 B@2 C@4 C@6 D@7 D@8 ==emptyRule
c                        ==c
e                ==e
d        C@4 C@5 D@7 D@9 ==d
knuth(24) --- begin test --------------------------------
grammar source, ('S =', "S = 'a' A 'b' S", "S =  'b' B 'a' S", 'A =', "A = 'a' A 'b' A", 'B =', "B = 'b' B 'a' B")
dbg: lahGen, 3, rounds
dbg: laXGen, 3, rounds
dbg: gen lrK, 1
test begin  knuth(24) 0 input:  --------------------------------
parsed S@0 from 0 tokens, 1 steps,  20 states, Rules 10
     S@0 S@1 ==emptyRule
test begin  knuth(24) 1 input: a b --------------------------------
parsed S@0 from 2 tokens, 7 steps,  20 states, Rules 10
a    S@0 S@2 ==a
             A@4 A@5 ==emptyRule
b            ==b
             S@0 S@1 ==emptyRule
test begin  knuth(24) 2 input: b a --------------------------------
parsed S@0 from 2 tokens, 7 steps,  20 states, Rules 10
b    S@0 S@3 ==b
             B@7 B@8 ==emptyRule
a            ==a
             S@0 S@1 ==emptyRule
test begin  knuth(24) 3 input: a b b --------------------------------
dbg: syntax after b tokenNr 2 expected: a b, not lah: !
syntax test knuth(24) 3 input a b b: syntax after b tokenNr 2 expected: a b, not lah: !
test begin  knuth(24) 4 input: a a b b --------------------------------
parsed S@0 from 4 tokens, 13 steps,  20 states, Rules 10
a    S@0 S@2 ==a
a            A@4 A@6 ==a
                     A@4 A@5 ==emptyRule
b                    ==b
                     A@4 A@5 ==emptyRule
b            ==b
             S@0 S@1 ==emptyRule
test begin  knuth(24) 5 input: a b a b --------------------------------
parsed S@0 from 4 tokens, 13 steps,  20 states, Rules 10
a    S@0 S@2 ==a
             A@4 A@5 ==emptyRule
b            ==b
a            S@0 S@2 ==a
                     A@4 A@5 ==emptyRule
b                    ==b
                     S@0 S@1 ==emptyRule
test begin  knuth(24) 6 input: b a a b --------------------------------
parsed S@0 from 4 tokens, 13 steps,  20 states, Rules 10
b    S@0 S@3 ==b
             B@7 B@8 ==emptyRule
a            ==a
a            S@0 S@2 ==a
                     A@4 A@5 ==emptyRule
b                    ==b
                     S@0 S@1 ==emptyRule
end ./parser.py