Permalink
Browse files

Dividing grammar into external/internal: t+

  • Loading branch information...
1 parent d947749 commit ab2b822dd3cd3b6d6a22c8a64936385dedb4d7af Jeffrey Kegler committed May 6, 2012
Showing with 63 additions and 63 deletions.
  1. +7 −7 r2/t/ah2.t
  2. +7 −7 r2/t/bocage.t
  3. +4 −4 r2/t/chaf.t
  4. +3 −3 r2/t/duplicate_parse.t
  5. +1 −1 r2/t/equation.t
  6. +3 −3 r2/t/final_nonnullable.t
  7. +1 −1 r2/t/implementation.t
  8. +9 −9 r2/t/jirotka.t
  9. +1 −1 r2/t/leo.t
  10. +1 −1 r2/t/leo2.t
  11. +1 −1 r2/t/leo3.t
  12. +1 −1 r2/t/leo_cycle.t
  13. +1 −1 r2/t/leo_example.t
  14. +1 −1 r2/t/minus.t
  15. +11 −11 r2/t/rewrite.t
  16. +11 −11 r2/t/trace_rules.t
View
@@ -64,13 +64,13 @@ Marpa::R2::Test::is( $grammar->show_rules, <<'EOS', 'Aycock/Horspool Rules' );
4: S -> A S[R0:1] /* vrhs real=1 */
5: S -> A A[] A[] A[]
6: S -> A[] S[R0:1] /* vrhs real=1 */
-7: S[R0:1] -> A S[R0:2] /* vlhs vrhs real=1 */
-8: S[R0:1] -> A A[] A[] /* vlhs real=3 */
-9: S[R0:1] -> A[] S[R0:2] /* vlhs vrhs real=1 */
-10: S[R0:2] -> A A /* vlhs real=2 */
-11: S[R0:2] -> A A[] /* vlhs real=2 */
-12: S[R0:2] -> A[] A /* vlhs real=2 */
-13: S['] -> S /* vlhs real=1 */
+7: S[R0:1] -> A S[R0:2] /* vrhs real=1 */
+8: S[R0:1] -> A A[] A[]
+9: S[R0:1] -> A[] S[R0:2] /* vrhs real=1 */
+10: S[R0:2] -> A A
+11: S[R0:2] -> A A[]
+12: S[R0:2] -> A[] A
+13: S['] -> S
EOS
Marpa::R2::Test::is( $grammar->show_symbols,
View
@@ -66,13 +66,13 @@ Marpa::R2::Test::is( $grammar->show_rules, <<'EOS', 'Aycock/Horspool Rules' );
4: S -> A S[R0:1] /* vrhs real=1 */
5: S -> A A[] A[] A[]
6: S -> A[] S[R0:1] /* vrhs real=1 */
-7: S[R0:1] -> A S[R0:2] /* vlhs vrhs real=1 */
-8: S[R0:1] -> A A[] A[] /* vlhs real=3 */
-9: S[R0:1] -> A[] S[R0:2] /* vlhs vrhs real=1 */
-10: S[R0:2] -> A A /* vlhs real=2 */
-11: S[R0:2] -> A A[] /* vlhs real=2 */
-12: S[R0:2] -> A[] A /* vlhs real=2 */
-13: S['] -> S /* vlhs real=1 */
+7: S[R0:1] -> A S[R0:2] /* vrhs real=1 */
+8: S[R0:1] -> A A[] A[]
+9: S[R0:1] -> A[] S[R0:2] /* vrhs real=1 */
+10: S[R0:2] -> A A
+11: S[R0:2] -> A A[]
+12: S[R0:2] -> A[] A
+13: S['] -> S
EOS
Marpa::R2::Test::is( $grammar->show_symbols,
View
@@ -65,10 +65,10 @@ Marpa::R2::Test::is( $grammar->show_rules, <<'EOS', 'Aycock/Horspool Rules' );
6: S -> A B B[] B[] C C
7: S -> A B[] S[R0:2] /* vrhs real=2 */
8: S -> A B[] B[] B[] C C
-9: S[R0:2] -> B B C C /* vlhs real=4 */
-10: S[R0:2] -> B B[] C C /* vlhs real=4 */
-11: S[R0:2] -> B[] B C C /* vlhs real=4 */
-12: S['] -> S /* vlhs real=1 */
+9: S[R0:2] -> B B C C
+10: S[R0:2] -> B B[] C C
+11: S[R0:2] -> B[] B C C
+12: S['] -> S
EOS
my $recce = Marpa::R2::Recognizer->new( { grammar => $grammar } );
View
@@ -66,9 +66,9 @@ Marpa::R2::Test::is( $grammar->show_rules,
5: S -> p p[] S[R0:2] /* vrhs real=2 */
6: S -> p[] p S[R0:2] /* vrhs real=2 */
7: S -> p[] p[] S[R0:2] /* vrhs real=2 */
-8: S[R0:2] -> p n /* vlhs real=2 */
-9: S[R0:2] -> p[] n /* vlhs real=2 */
-10: S['] -> S /* vlhs real=1 */
+8: S[R0:2] -> p n
+9: S[R0:2] -> p[] n
+10: S['] -> S
END_OF_STRING
Marpa::R2::Test::is( $grammar->show_AHFA,
View
@@ -130,7 +130,7 @@ Marpa::R2::Test::is( ${$actual_ref},
<<'END_RULES', 'Ambiguous Equation Rules' );
0: E -> E Op E
1: E -> Number
-2: E['] -> E /* vlhs real=1 */
+2: E['] -> E
END_RULES
# Alternative tests: AHFA items if XS, NFA items if PP
View
@@ -66,9 +66,9 @@ Marpa::R2::Test::is( $grammar->show_rules,
5: S -> p p[] S[R0:2] /* vrhs real=2 */
6: S -> p[] p S[R0:2] /* vrhs real=2 */
7: S -> p[] p[] S[R0:2] /* vrhs real=2 */
-8: S[R0:2] -> p n /* vlhs real=2 */
-9: S[R0:2] -> p[] n /* vlhs real=2 */
-10: S['] -> S /* vlhs real=1 */
+8: S[R0:2] -> p n
+9: S[R0:2] -> p[] n
+10: S['] -> S
END_OF_STRING
Marpa::R2::Test::is( $grammar->show_AHFA,
View
@@ -99,7 +99,7 @@ Marpa::R2::Test::is( $show_rules_output,
2: Factor -> Number
3: Term -> Term Add Term
4: Factor -> Factor Multiply Factor
-5: Expression['] -> Expression /* vlhs real=1 */
+5: Expression['] -> Expression
END_RULES
my $show_AHFA_output = $grammar->show_AHFA();
View
@@ -167,19 +167,19 @@ Marpa::R2::Test::is( $grammar->show_rules(),
14: WithPf -> WITH PF
15: Input -> Input[Seq] /* vrhs real=0 */
16: Input -> Input[Seq] SEPARATOR /* vrhs real=1 */
-17: Input[Seq] -> Statement /* vlhs real=1 */
-18: Input[Seq] -> Input[Seq] SEPARATOR Statement /* vlhs vrhs real=2 */
+17: Input[Seq] -> Statement
+18: Input[Seq] -> Input[Seq] SEPARATOR Statement /* vrhs real=2 */
19: MetricSelect -> SELECT MetricExpr ByClause MetricSelect[R3:3] /* vrhs real=3 */
20: MetricSelect -> SELECT MetricExpr ByClause Match[] Filter[] WithPf[]
21: MetricSelect -> SELECT MetricExpr ByClause[] MetricSelect[R3:3] /* vrhs real=3 */
22: MetricSelect -> SELECT MetricExpr ByClause[] Match[] Filter[] WithPf[]
-23: MetricSelect[R3:3] -> Match MetricSelect[R3:4] /* vlhs vrhs real=1 */
-24: MetricSelect[R3:3] -> Match Filter[] WithPf[] /* vlhs real=3 */
-25: MetricSelect[R3:3] -> Match[] MetricSelect[R3:4] /* vlhs vrhs real=1 */
-26: MetricSelect[R3:4] -> Filter WithPf /* vlhs real=2 */
-27: MetricSelect[R3:4] -> Filter WithPf[] /* vlhs real=2 */
-28: MetricSelect[R3:4] -> Filter[] WithPf /* vlhs real=2 */
-29: Input['] -> Input /* vlhs real=1 */
+23: MetricSelect[R3:3] -> Match MetricSelect[R3:4] /* vrhs real=1 */
+24: MetricSelect[R3:3] -> Match Filter[] WithPf[]
+25: MetricSelect[R3:3] -> Match[] MetricSelect[R3:4] /* vrhs real=1 */
+26: MetricSelect[R3:4] -> Filter WithPf
+27: MetricSelect[R3:4] -> Filter WithPf[]
+28: MetricSelect[R3:4] -> Filter[] WithPf
+29: Input['] -> Input
END_OF_RULES
Marpa::R2::Test::is( $grammar->show_AHFA(),
View
@@ -84,7 +84,7 @@ Marpa::R2::Test::is( $grammar->show_rules,
6: S -> C
7: C -> a C b
8: C -> a C[] b
-9: S['] -> S /* vlhs real=1 */
+9: S['] -> S
END_OF_STRING
Marpa::R2::Test::is( $grammar->show_AHFA, <<'END_OF_STRING', 'Leo168 AHFA' );
View
@@ -58,7 +58,7 @@ Marpa::R2::Test::is( $grammar->show_rules,
1: S -> /* empty !used */
2: S -> a S
3: S -> a S[]
-4: S['] -> S /* vlhs real=1 */
+4: S['] -> S
END_OF_STRING
Marpa::R2::Test::is( $grammar->show_AHFA, <<'END_OF_STRING', 'Leo166 AHFA' );
View
@@ -78,7 +78,7 @@ Marpa::R2::Test::is( $grammar->show_rules,
7: A -> B
8: B -> C
9: C -> S
-10: S['] -> S /* vlhs real=1 */
+10: S['] -> S
END_OF_STRING
Marpa::R2::Test::is( $grammar->show_AHFA, <<'END_OF_STRING', 'Leo166 AHFA' );
View
@@ -102,7 +102,7 @@ Marpa::R2::Test::is( $grammar->show_rules,
17: C -> D
18: G -> H
19: A -> B
-20: S['] -> S /* vlhs real=1 */
+20: S['] -> S
END_OF_STRING
my $expected_ahfa_output = <<'END_OF_STRING';
View
@@ -130,7 +130,7 @@ Marpa::R2::Test::is( $show_rules_output, <<'END_RULES', 'Leo Example Rules' );
4: Expression -> Lvalue MultiplyAssignOp Expression
5: Expression -> Variable
6: Lvalue -> Variable
-7: Statement['] -> Statement /* vlhs real=1 */
+7: Statement['] -> Statement
END_RULES
my $show_AHFA_output = $grammar->show_AHFA();
View
@@ -117,7 +117,7 @@ Marpa::R2::Test::is( $grammar->show_rules,
2: E -> MinusMinus E
3: E -> Minus E
4: E -> Number
-5: E['] -> E /* vlhs real=1 */
+5: E['] -> E
END_RULES
Marpa::R2::Test::is( $grammar->show_AHFA,
View
@@ -125,20 +125,20 @@ Marpa::R2::Test::is( $show_rules_output, <<'END_RULES', 'Rewritten Rules' );
8: statement -> optional_whitespace expression optional_whitespace[] optional_modifier[] optional_whitespace[]
9: statement -> optional_whitespace[] expression statement[R0:2] /* vrhs real=2 */
10: statement -> optional_whitespace[] expression optional_whitespace[] optional_modifier[] optional_whitespace[]
-11: statement[R0:2] -> optional_whitespace statement[R0:3] /* vlhs vrhs real=1 */
-12: statement[R0:2] -> optional_whitespace optional_modifier[] optional_whitespace[] /* vlhs real=3 */
-13: statement[R0:2] -> optional_whitespace[] statement[R0:3] /* vlhs vrhs real=1 */
-14: statement[R0:3] -> optional_modifier optional_whitespace /* vlhs real=2 */
-15: statement[R0:3] -> optional_modifier optional_whitespace[] /* vlhs real=2 */
-16: statement[R0:3] -> optional_modifier[] optional_whitespace /* vlhs real=2 */
+11: statement[R0:2] -> optional_whitespace statement[R0:3] /* vrhs real=1 */
+12: statement[R0:2] -> optional_whitespace optional_modifier[] optional_whitespace[]
+13: statement[R0:2] -> optional_whitespace[] statement[R0:3] /* vrhs real=1 */
+14: statement[R0:3] -> optional_modifier optional_whitespace
+15: statement[R0:3] -> optional_modifier optional_whitespace[]
+16: statement[R0:3] -> optional_modifier[] optional_whitespace
17: statements -> statements[Seq] /* vrhs real=0 */
18: statements -> statements[Seq] comma /* vrhs real=1 */
-19: statements[Seq] -> statement /* vlhs real=1 */
-20: statements[Seq] -> statements[Seq] comma statement /* vlhs vrhs real=2 */
+19: statements[Seq] -> statement
+20: statements[Seq] -> statements[Seq] comma statement /* vrhs real=2 */
21: block -> block[Seq] /* vrhs real=0 */
-22: block[Seq] -> statements /* vlhs real=1 */
-23: block[Seq] -> block[Seq] statements /* vlhs vrhs real=1 */
-24: block['] -> block /* vlhs real=1 */
+22: block[Seq] -> statements
+23: block[Seq] -> block[Seq] statements /* vrhs real=1 */
+24: block['] -> block
END_RULES
# Marpa::R2::Display::End
View
@@ -129,19 +129,19 @@ Marpa::R2::Test::is( $grammar->show_rules, <<'EOS', 'Rules' );
13: S -> Proper S[R1:1] /* vrhs real=1 */
14: S -> Proper Proper[] Proper[] Proper[]
15: S -> Proper[] S[R1:1] /* vrhs real=1 */
-16: S[R1:1] -> Proper S[R1:2] /* vlhs vrhs real=1 */
-17: S[R1:1] -> Proper Proper[] Proper[] /* vlhs real=3 */
-18: S[R1:1] -> Proper[] S[R1:2] /* vlhs vrhs real=1 */
-19: S[R1:2] -> Proper Proper /* vlhs real=2 */
-20: S[R1:2] -> Proper Proper[] /* vlhs real=2 */
-21: S[R1:2] -> Proper[] Proper /* vlhs real=2 */
+16: S[R1:1] -> Proper S[R1:2] /* vrhs real=1 */
+17: S[R1:1] -> Proper Proper[] Proper[]
+18: S[R1:1] -> Proper[] S[R1:2] /* vrhs real=1 */
+19: S[R1:2] -> Proper Proper
+20: S[R1:2] -> Proper Proper[]
+21: S[R1:2] -> Proper[] Proper
22: Seq0 -> Seq0[Seq] /* vrhs real=0 */
-23: Seq0[Seq] -> a /* vlhs real=1 */
-24: Seq0[Seq] -> Seq0[Seq] a /* vlhs vrhs real=1 */
+23: Seq0[Seq] -> a
+24: Seq0[Seq] -> Seq0[Seq] a /* vrhs real=1 */
25: Seq1 -> Seq1[Seq] /* vrhs real=0 */
-26: Seq1[Seq] -> A /* vlhs real=1 */
-27: Seq1[Seq] -> Seq1[Seq] A /* vlhs vrhs real=1 */
-28: S['] -> S /* vlhs real=1 */
+26: Seq1[Seq] -> A
+27: Seq1[Seq] -> Seq1[Seq] A /* vrhs real=1 */
+28: S['] -> S
EOS
# Local Variables:

0 comments on commit ab2b822

Please sign in to comment.