eyeprolog 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/conformance-report.md +2 -2
  2. package/package.json +1 -1
  3. package/src/dcg.js +4 -0
  4. package/test/conformance/ISO-MATRIX.md +1 -1
  5. package/test/conformance/README.md +3 -3
  6. package/test/conformance/THIRD_PARTY.md +7 -0
  7. package/test/conformance/cases/iso/dcg_ambiguous_alternatives.pl +8 -0
  8. package/test/conformance/cases/iso/dcg_declaration_nonterminal_indicators.pl +7 -0
  9. package/test/conformance/cases/iso/dcg_double_quotes_atom.pl +7 -0
  10. package/test/conformance/cases/iso/dcg_double_quotes_codes.pl +6 -0
  11. package/test/conformance/cases/iso/dcg_dynamic_body_control.pl +15 -0
  12. package/test/conformance/cases/iso/dcg_dynamic_nonterminal_indicator.pl +7 -0
  13. package/test/conformance/cases/iso/dcg_explicit_qualified_head.pl +6 -0
  14. package/test/conformance/cases/iso/dcg_nested_phrase_call.pl +6 -0
  15. package/test/conformance/cases/iso/dcg_operator_table.pl +5 -0
  16. package/test/conformance/cases/iso/dcg_partial_sequences.pl +12 -0
  17. package/test/conformance/cases/iso/dcg_phrase_steadfastness.pl +14 -0
  18. package/test/conformance/cases/iso/dcg_qualified_chain.pl +10 -0
  19. package/test/conformance/cases/iso/dcg_recursive_sequences.pl +8 -0
  20. package/test/conformance/cases/iso/dcg_variable_hygiene.pl +9 -0
  21. package/test/conformance/cases/iso/logtalk_dcg_conjunction_disjunction.pl +14 -0
  22. package/test/conformance/cases/iso/logtalk_dcg_cut.pl +12 -0
  23. package/test/conformance/cases/iso/logtalk_dcg_cut_positions.pl +13 -0
  24. package/test/conformance/cases/iso/logtalk_dcg_embedded_goals.pl +12 -0
  25. package/test/conformance/cases/iso/logtalk_dcg_embedded_sequences.pl +10 -0
  26. package/test/conformance/cases/iso/logtalk_dcg_graphic_nonterminal.pl +7 -0
  27. package/test/conformance/cases/iso/logtalk_dcg_if_then_else.pl +15 -0
  28. package/test/conformance/cases/iso/logtalk_dcg_negation_positions.pl +11 -0
  29. package/test/conformance/cases/iso/logtalk_dcg_nonterminals.pl +11 -0
  30. package/test/conformance/cases/iso/logtalk_dcg_phrase_identity.pl +12 -0
  31. package/test/conformance/cases/iso/logtalk_dcg_semicontext_variants.pl +12 -0
  32. package/test/conformance/cases/iso/logtalk_dcg_semicontexts.pl +12 -0
  33. package/test/conformance/cases/iso/logtalk_dcg_terminal_variables.pl +9 -0
  34. package/test/conformance/cases/iso/logtalk_dcg_terminals.pl +15 -0
  35. package/test/conformance/cases/iso/logtalk_dcg_variable_bodies.pl +10 -0
  36. package/test/conformance/errors/iso/dcg_call_noncallable.pl +3 -0
  37. package/test/conformance/errors/iso/dcg_call_variable.pl +3 -0
  38. package/test/conformance/errors/iso/dcg_nonatom_qualified_module.pl +3 -0
  39. package/test/conformance/errors/iso/dcg_partial_semicontext.pl +3 -0
  40. package/test/conformance/errors/iso/dcg_phrase_nonterminal_variable.pl +3 -0
  41. package/test/conformance/errors/iso/dcg_qualified_unknown_nonterminal.pl +4 -0
  42. package/test/conformance/errors/iso/dcg_variable_qualified_module.pl +3 -0
  43. package/test/conformance/errors/iso/dcg_variable_rule_body.pl +3 -0
  44. package/test/conformance/errors/iso/dcg_variable_rule_head.pl +3 -0
  45. package/test/conformance/errors/iso/logtalk_dcg_bad_input_precedence.pl +2 -0
  46. package/test/conformance/errors/iso/logtalk_dcg_bad_output_precedence.pl +2 -0
  47. package/test/conformance/errors/iso/logtalk_dcg_curly_head.pl +3 -0
  48. package/test/conformance/errors/iso/logtalk_dcg_cut_head.pl +3 -0
  49. package/test/conformance/errors/iso/logtalk_dcg_embedded_noncallable.pl +2 -0
  50. package/test/conformance/errors/iso/logtalk_dcg_improper_semicontext.pl +3 -0
  51. package/test/conformance/errors/iso/logtalk_dcg_improper_terminal_rule.pl +3 -0
  52. package/test/conformance/errors/iso/logtalk_dcg_invalid_semicontext.pl +3 -0
  53. package/test/conformance/errors/iso/logtalk_dcg_multiple_semicontexts.pl +3 -0
  54. package/test/conformance/errors/iso/logtalk_dcg_nested_noncallable.pl +2 -0
  55. package/test/conformance/errors/iso/logtalk_dcg_noncallable_after_failure.pl +2 -0
  56. package/test/conformance/errors/iso/logtalk_dcg_noncallable_after_success.pl +2 -0
  57. package/test/conformance/errors/iso/logtalk_dcg_noncallable_precedence.pl +2 -0
  58. package/test/conformance/errors/iso/logtalk_dcg_numeric_head.pl +3 -0
  59. package/test/conformance/errors/iso/logtalk_dcg_numeric_nonterminal.pl +3 -0
  60. package/test/conformance/errors/iso/logtalk_dcg_partial_terminal_rule.pl +4 -0
  61. package/test/conformance/errors/iso/logtalk_dcg_phrase_curly_variable.pl +2 -0
  62. package/test/conformance/errors/iso/logtalk_dcg_phrase_improper_input.pl +2 -0
  63. package/test/conformance/errors/iso/logtalk_dcg_phrase_improper_output.pl +2 -0
  64. package/test/conformance/errors/iso/logtalk_dcg_reversed_semicontext.pl +3 -0
  65. package/test/conformance/errors/iso/logtalk_dcg_terminal_head.pl +3 -0
  66. package/test/conformance/errors/iso/logtalk_dcg_unknown_nonterminal.pl +2 -0
  67. package/test/conformance/expected/iso/dcg_ambiguous_alternatives.pl +1 -0
  68. package/test/conformance/expected/iso/dcg_declaration_nonterminal_indicators.pl +1 -0
  69. package/test/conformance/expected/iso/dcg_double_quotes_atom.pl +1 -0
  70. package/test/conformance/expected/iso/dcg_double_quotes_codes.pl +1 -0
  71. package/test/conformance/expected/iso/dcg_dynamic_body_control.pl +5 -0
  72. package/test/conformance/expected/iso/dcg_dynamic_nonterminal_indicator.pl +1 -0
  73. package/test/conformance/expected/iso/dcg_explicit_qualified_head.pl +1 -0
  74. package/test/conformance/expected/iso/dcg_nested_phrase_call.pl +1 -0
  75. package/test/conformance/expected/iso/dcg_operator_table.pl +2 -0
  76. package/test/conformance/expected/iso/dcg_partial_sequences.pl +3 -0
  77. package/test/conformance/expected/iso/dcg_phrase_steadfastness.pl +4 -0
  78. package/test/conformance/expected/iso/dcg_qualified_chain.pl +2 -0
  79. package/test/conformance/expected/iso/dcg_recursive_sequences.pl +3 -0
  80. package/test/conformance/expected/iso/dcg_variable_hygiene.pl +2 -0
  81. package/test/conformance/expected/iso/logtalk_dcg_conjunction_disjunction.pl +8 -0
  82. package/test/conformance/expected/iso/logtalk_dcg_cut.pl +4 -0
  83. package/test/conformance/expected/iso/logtalk_dcg_cut_positions.pl +4 -0
  84. package/test/conformance/expected/iso/logtalk_dcg_embedded_goals.pl +4 -0
  85. package/test/conformance/expected/iso/logtalk_dcg_embedded_sequences.pl +3 -0
  86. package/test/conformance/expected/iso/logtalk_dcg_graphic_nonterminal.pl +1 -0
  87. package/test/conformance/expected/iso/logtalk_dcg_if_then_else.pl +7 -0
  88. package/test/conformance/expected/iso/logtalk_dcg_negation_positions.pl +4 -0
  89. package/test/conformance/expected/iso/logtalk_dcg_nonterminals.pl +3 -0
  90. package/test/conformance/expected/iso/logtalk_dcg_phrase_identity.pl +6 -0
  91. package/test/conformance/expected/iso/logtalk_dcg_semicontext_variants.pl +4 -0
  92. package/test/conformance/expected/iso/logtalk_dcg_semicontexts.pl +4 -0
  93. package/test/conformance/expected/iso/logtalk_dcg_terminal_variables.pl +3 -0
  94. package/test/conformance/expected/iso/logtalk_dcg_terminals.pl +6 -0
  95. package/test/conformance/expected/iso/logtalk_dcg_variable_bodies.pl +4 -0
  96. package/test/conformance/expected-errors/iso/dcg_call_noncallable.txt +1 -0
  97. package/test/conformance/expected-errors/iso/dcg_call_variable.txt +1 -0
  98. package/test/conformance/expected-errors/iso/dcg_nonatom_qualified_module.txt +1 -0
  99. package/test/conformance/expected-errors/iso/dcg_partial_semicontext.txt +1 -0
  100. package/test/conformance/expected-errors/iso/dcg_phrase_nonterminal_variable.txt +1 -0
  101. package/test/conformance/expected-errors/iso/dcg_qualified_unknown_nonterminal.txt +1 -0
  102. package/test/conformance/expected-errors/iso/dcg_variable_qualified_module.txt +1 -0
  103. package/test/conformance/expected-errors/iso/dcg_variable_rule_body.txt +1 -0
  104. package/test/conformance/expected-errors/iso/dcg_variable_rule_head.txt +1 -0
  105. package/test/conformance/expected-errors/iso/logtalk_dcg_bad_input_precedence.txt +1 -0
  106. package/test/conformance/expected-errors/iso/logtalk_dcg_bad_output_precedence.txt +1 -0
  107. package/test/conformance/expected-errors/iso/logtalk_dcg_curly_head.txt +1 -0
  108. package/test/conformance/expected-errors/iso/logtalk_dcg_cut_head.txt +1 -0
  109. package/test/conformance/expected-errors/iso/logtalk_dcg_embedded_noncallable.txt +1 -0
  110. package/test/conformance/expected-errors/iso/logtalk_dcg_improper_semicontext.txt +1 -0
  111. package/test/conformance/expected-errors/iso/logtalk_dcg_improper_terminal_rule.txt +1 -0
  112. package/test/conformance/expected-errors/iso/logtalk_dcg_invalid_semicontext.txt +1 -0
  113. package/test/conformance/expected-errors/iso/logtalk_dcg_multiple_semicontexts.txt +1 -0
  114. package/test/conformance/expected-errors/iso/logtalk_dcg_nested_noncallable.txt +1 -0
  115. package/test/conformance/expected-errors/iso/logtalk_dcg_noncallable_after_failure.txt +1 -0
  116. package/test/conformance/expected-errors/iso/logtalk_dcg_noncallable_after_success.txt +1 -0
  117. package/test/conformance/expected-errors/iso/logtalk_dcg_noncallable_precedence.txt +1 -0
  118. package/test/conformance/expected-errors/iso/logtalk_dcg_numeric_head.txt +1 -0
  119. package/test/conformance/expected-errors/iso/logtalk_dcg_numeric_nonterminal.txt +1 -0
  120. package/test/conformance/expected-errors/iso/logtalk_dcg_partial_terminal_rule.txt +1 -0
  121. package/test/conformance/expected-errors/iso/logtalk_dcg_phrase_curly_variable.txt +1 -0
  122. package/test/conformance/expected-errors/iso/logtalk_dcg_phrase_improper_input.txt +1 -0
  123. package/test/conformance/expected-errors/iso/logtalk_dcg_phrase_improper_output.txt +1 -0
  124. package/test/conformance/expected-errors/iso/logtalk_dcg_reversed_semicontext.txt +1 -0
  125. package/test/conformance/expected-errors/iso/logtalk_dcg_terminal_head.txt +1 -0
  126. package/test/conformance/expected-errors/iso/logtalk_dcg_unknown_nonterminal.txt +1 -0
  127. package/the-art-of-eyeprolog.md +1 -1
@@ -11,7 +11,7 @@ This report summarizes the file-based conformance corpus under `test/conformance
11
11
  | builtins | 11 | 0 | 0 | 0 | 11 |
12
12
  | context | 11 | 0 | 0 | 0 | 11 |
13
13
  | control | 15 | 0 | 0 | 0 | 15 |
14
- | iso | 135 | 178 | 0 | 0 | 313 |
14
+ | iso | 164 | 209 | 0 | 0 | 373 |
15
15
  | lists | 52 | 3 | 0 | 0 | 55 |
16
16
  | modules | 2 | 0 | 0 | 0 | 2 |
17
17
  | negation | 8 | 0 | 19 | 0 | 27 |
@@ -23,4 +23,4 @@ This report summarizes the file-based conformance corpus under `test/conformance
23
23
  | terms | 26 | 3 | 0 | 0 | 29 |
24
24
  | unification | 18 | 0 | 0 | 0 | 18 |
25
25
  | variables | 16 | 9 | 0 | 0 | 25 |
26
- | **Total** | **450** | **229** | **19** | **21** | **719** |
26
+ | **Total** | **479** | **260** | **19** | **21** | **779** |
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.1.1",
6
+ "version": "1.1.2",
7
7
  "description": "EyeProlog turns facts and rules into answers and proofs.",
8
8
  "type": "module",
9
9
  "main": "./index.js",
package/src/dcg.js CHANGED
@@ -96,6 +96,10 @@ export function expandDcgBody(body, input, output, options = {}) {
96
96
  return goal;
97
97
  }
98
98
 
99
+ // Empty braces are the empty embedded-goal sequence. Like {true}, they
100
+ // consume no terminals and leave the grammar state unchanged.
101
+ if (body.type === ATOM && body.name === '{}') return equality(input, output);
102
+
99
103
  if (isTerminalSequence(body)) return terminalsGoal(body, input, output, env);
100
104
 
101
105
  if (body.type === COMPOUND && body.name === ',' && body.arity === 2) {
@@ -19,7 +19,7 @@ case totals.
19
19
  | 8.17 flags and hooks | required flags, mutation permissions, halt and character conversion | `exceptions_and_flags`, `remaining_builtins_and_directives`, flag error cases |
20
20
  | Clause 9 evaluable functors | integer, float, rounding, transcendental and bitwise operations | `arithmetic`, `corrigenda_arithmetic`, `corrigenda_atan2_zero`, `corrigenda_integer_negative_power` |
21
21
  | ISO/IEC 13211-2 modules | module declarations, exports, imports, qualification, meta-predicate context | `modules/qualified_call`, `modules/selective_library_import`, `dcg_module_nonterminal_indicator` |
22
- | ISO/IEC TS 13211-3 grammar rules | `-->`, terminal sequences, grammar control constructs, semicontexts, nonterminal indicators, `phrase/2-3` | `dcg_terminals_and_remainder`, `dcg_control_constructs`, `dcg_call_phrase_semicontext`, DCG error cases |
22
+ | ISO/IEC TS 13211-3 grammar rules | `-->`, terminal and partial sequences, grammar control constructs, semicontexts, nonterminal indicators, modules, `phrase/2-3`, steadfastness and errors | `dcg_terminals_and_remainder`, `dcg_control_constructs`, `dcg_partial_sequences`, `dcg_phrase_steadfastness`, `dcg_dynamic_nonterminal_indicator`, `logtalk_dcg_phrase_identity`, `logtalk_dcg_semicontexts`, DCG error and precedence cases |
23
23
 
24
24
  Corrigendum-specific coverage includes double-quoted atom operator priority
25
25
  (Cor.1); the added predicates and evaluable functors, bar-operator rules,
@@ -90,11 +90,11 @@ ISO/IEC 13211-1 clauses 7 and 8. In particular, isolated negative cases keep
90
90
  instantiation, type, domain, permission, representation, and evaluation errors
91
91
  independently observable.
92
92
 
93
- Selected cases are adapted from the ISO and standard-core suites of Scryer
94
- Prolog, Trealla Prolog, and SWI-Prolog. Their upstream identifiers and licenses
93
+ Selected cases are adapted from the ISO and standard-core suites of Logtalk,
94
+ Scryer Prolog, Trealla Prolog, and SWI-Prolog. Their upstream identifiers and licenses
95
95
  are recorded in [THIRD_PARTY.md](THIRD_PARTY.md).
96
96
 
97
- The corpus has 313 cases in `iso/` and 719 file-based conformance cases in
97
+ The corpus has 373 cases in `iso/` and 779 file-based conformance cases in
98
98
  total. The generated `conformance-report.md` is the authoritative source for
99
99
  current category totals. Together with regression, documentation-sync, API,
100
100
  example, and book-example checks, `npm test` is the release gate.
@@ -9,6 +9,13 @@ identifies its upstream test names. The cases were rewritten for EyeProlog's
9
9
  file-based query and exact-output harness and are therefore modified from the
10
10
  upstream files.
11
11
 
12
+ Part 3 grammar cases are additionally adapted from Logtalk's
13
+ `tests/logtalk/methods/phrase_2_3/tests.lgt` and
14
+ `tests/logtalk/dcgs/tests.lgt` suites. Object and unit-test scaffolding was
15
+ removed, translator-only assertions were converted to executable grammar
16
+ behavior where possible, and expected list errors follow the Part 3
17
+ `terminal_sequence` terminology used by EyeProlog.
18
+
12
19
  Copyright 1998-2026 Paulo Moura <pmoura@logtalk.org>
13
20
 
14
21
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -0,0 +1,8 @@
1
+ % Ambiguous grammars retain every distinct semantic result.
2
+ %% goal: ambiguity(X0)
3
+
4
+ reading(first) --> [token].
5
+ reading(second) --> [token].
6
+
7
+ ambiguity(Readings) :-
8
+ findall(Reading, phrase(reading(Reading), [token]), Readings).
@@ -0,0 +1,7 @@
1
+ % Source organization directives accept Part 3 nonterminal indicators.
2
+ :- multifile(shared//0).
3
+ :- discontiguous(shared//0).
4
+
5
+ shared --> [x].
6
+
7
+ %% goal: phrase(shared, [x])
@@ -0,0 +1,7 @@
1
+ % In atom mode, a double-quoted grammar body names a nonterminal.
2
+ :- set_prolog_flag(double_quotes, atom).
3
+
4
+ ab --> [recognized].
5
+ uses_atom_body --> "ab".
6
+
7
+ %% goal: phrase(uses_atom_body, Tokens)
@@ -0,0 +1,6 @@
1
+ % Double-quoted terminal sequences honor the active Part 1 flag.
2
+ :- set_prolog_flag(double_quotes, codes).
3
+
4
+ codes --> "ab".
5
+
6
+ %% goal: phrase(codes, Tokens)
@@ -0,0 +1,15 @@
1
+ % phrase/2 expands dynamically constructed grammar bodies using static semantics.
2
+ %% goal: dynamic_body(X0, X1)
3
+
4
+ dynamic_body(sequence, Tokens) :-
5
+ Body = ([a], [b]),
6
+ phrase(Body, Tokens).
7
+ dynamic_body(choice, Tokens) :-
8
+ Body = ([a]; [b]),
9
+ phrase(Body, Tokens).
10
+ dynamic_body(embedded, Tokens) :-
11
+ Body = ({true}, [ok]),
12
+ phrase(Body, Tokens).
13
+ dynamic_body(conditional, Tokens) :-
14
+ Body = ([x] -> [yes]; [no]),
15
+ phrase(Body, Tokens).
@@ -0,0 +1,7 @@
1
+ % dynamic/1 accepts Part 3 nonterminal indicators and maps them to arity + 2.
2
+ :- dynamic(token//1).
3
+
4
+ %% goal: dynamic_nonterminal(X0)
5
+ dynamic_nonterminal(asserted) :-
6
+ assertz(token(x, [x], [])),
7
+ phrase(token(x), [x]).
@@ -0,0 +1,6 @@
1
+ % An explicitly qualified grammar-rule head defines the expanded predicate
2
+ % in the named module even without a surrounding module declaration.
3
+
4
+ dcg_explicit:word --> [x].
5
+
6
+ %% goal: phrase(dcg_explicit:word, [x])
@@ -0,0 +1,6 @@
1
+ % phrase//1 and call//1 compose nested grammar invocations.
2
+
3
+ inner --> [i].
4
+ outer --> phrase(inner), call(inner), [o].
5
+
6
+ %% goal: phrase(outer, Tokens)
@@ -0,0 +1,5 @@
1
+ % Part 3 installs the grammar-rule and alternative operators.
2
+ %% goal: dcg_operator(X0, X1, X2)
3
+
4
+ dcg_operator('-->', 1200, xfx) :- current_op(1200, xfx, '-->').
5
+ dcg_operator('|', 1105, xfy) :- current_op(1105, xfy, '|').
@@ -0,0 +1,12 @@
1
+ % Part 3 phrase/3 accepts partial terminal sequences and preserves their tail.
2
+ %% goal: partial_sequence(X0)
3
+
4
+ partial_sequence(one) :-
5
+ phrase([a], [a|Tail], Tail),
6
+ Tail = [rest].
7
+ partial_sequence(two) :-
8
+ phrase([a, b], [a, b|Tail], Tail),
9
+ Tail = [rest].
10
+ partial_sequence(empty) :-
11
+ phrase([], Tail, Tail),
12
+ Tail = [rest].
@@ -0,0 +1,14 @@
1
+ % phrase/3 is steadfast in its third argument.
2
+ %% goal: steadfast(X0)
3
+
4
+ steadfast(bound_before) :-
5
+ Rest = [b],
6
+ phrase([a], [a, b], Rest).
7
+ steadfast(bound_after) :-
8
+ phrase([a], [a, b], Rest),
9
+ Rest = [b].
10
+ steadfast(selects_matching_alternative) :-
11
+ phrase(([a]; [a, b]), [a, b], [b]).
12
+ steadfast(shared_sequence) :-
13
+ phrase([], Sequence, Sequence),
14
+ Sequence = [same].
@@ -0,0 +1,10 @@
1
+ % Qualified nonterminals retain module context through nested phrase//1 calls.
2
+ :- module(dcg_chain, [leaf//0, branch//0, wrapper//0, answer/1]).
3
+
4
+ leaf --> [x].
5
+ branch --> dcg_chain:leaf.
6
+ wrapper --> phrase(dcg_chain:branch).
7
+ answer(Tokens) :- phrase(wrapper, Tokens).
8
+
9
+ %% goal: dcg_chain:answer(Tokens)
10
+ %% goal: phrase(dcg_chain:wrapper, Tokens)
@@ -0,0 +1,8 @@
1
+ % Recursive grammar rules support both recognition and generation.
2
+
3
+ tokens([]) --> [].
4
+ tokens([X|Xs]) --> [X], tokens(Xs).
5
+
6
+ %% goal: phrase(tokens([a, b, c]), Generated)
7
+ %% goal: phrase(tokens(Parsed), [x, y])
8
+ %% goal: phrase(tokens([a, b]), [a, b, rest], Rest)
@@ -0,0 +1,9 @@
1
+ % Generated state variables must not capture similarly named source variables.
2
+
3
+ capture_states(S0, S, Input, Output) -->
4
+ [S0, S],
5
+ {Input = source_input, Output = source_output}.
6
+ anonymous_pair --> [_, _].
7
+
8
+ %% goal: phrase(capture_states(A, B, Input, Output), [left, right])
9
+ %% goal: phrase(anonymous_pair, [one, two])
@@ -0,0 +1,14 @@
1
+ % Adapted from Logtalk dcgs_conjunction_01-04 and dcgs_disjunction_01-03.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ a --> [a].
5
+ b --> [b].
6
+ sequence --> a, b.
7
+ optional_b --> a, (b; []).
8
+ bar_choice --> [x] | [y] | [z].
9
+ nested_choice --> ([a], [b]; [a], [c]).
10
+
11
+ %% goal: phrase(sequence, X)
12
+ %% goal: phrase(optional_b, X)
13
+ %% goal: phrase(bar_choice, X)
14
+ %% goal: phrase(nested_choice, X)
@@ -0,0 +1,12 @@
1
+ % Adapted from Logtalk dcgs_cut_01-06. Modified for EyeProlog's harness.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: cut_result(X0, X1)
4
+
5
+ committed --> ([a], ! ; [b]).
6
+ cut_then_fail --> ([a], !, {fail} ; [b]).
7
+ cut_after_prefix --> [start], ([a], ! ; [b]).
8
+
9
+ cut_result(committed, Tokens) :- phrase(committed, Tokens).
10
+ cut_result(fallback_before_cut, [b]) :- phrase(cut_then_fail, [b]).
11
+ cut_result(failure_after_cut, preserved) :- \+ phrase(cut_then_fail, [a]).
12
+ cut_result(nested, Tokens) :- phrase(cut_after_prefix, Tokens).
@@ -0,0 +1,13 @@
1
+ % Adapted from Logtalk dcgs_cut_01-04 and 06.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+ %% goal: cut_position(X0, X1)
4
+
5
+ cut_first --> !, [a].
6
+ cut_middle --> [a], !, [b].
7
+ cut_choice --> ([a], !, [b] ; [a], [c]).
8
+ cut_embedded_failure --> [a], !, {fail}.
9
+
10
+ cut_position(first, Tokens) :- phrase(cut_first, Tokens).
11
+ cut_position(middle, Tokens) :- phrase(cut_middle, Tokens).
12
+ cut_position(choice, Tokens) :- phrase(cut_choice, Tokens).
13
+ cut_position(failure, preserved) :- \+ phrase(cut_embedded_failure, [a]).
@@ -0,0 +1,12 @@
1
+ % Adapted from Logtalk dcgs_bypass_01 and 03-10.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ checked(X) --> [X], {atom(X)}.
5
+ bind(X) --> {X = bound}.
6
+ embedded_sequence(X) --> {X = a, atom(X)}, [X].
7
+ embedded_if --> ({true} -> [yes] ; [no]).
8
+
9
+ %% goal: phrase(checked(token), [token])
10
+ %% goal: phrase(bind(X), [])
11
+ %% goal: phrase(embedded_sequence(X), Tokens)
12
+ %% goal: phrase(embedded_if, Tokens)
@@ -0,0 +1,10 @@
1
+ % Adapted from Logtalk dcgs_bypass_03-05 and 10.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ three_checks(X) --> {X = a}, {atom(X)}, {X == a}, [X].
5
+ grouped_checks(X) --> {X = b, atom(X)}, [X].
6
+ embedded_choice --> ({fail}; {true}), [ok].
7
+
8
+ %% goal: phrase(three_checks(X), Tokens)
9
+ %% goal: phrase(grouped_checks(X), Tokens)
10
+ %% goal: phrase(embedded_choice, Tokens)
@@ -0,0 +1,7 @@
1
+ % Adapted from Logtalk dcgs_graphic_01. The (=)//0 translator-only case
2
+ % collides with the ISO =/2 built-in when executed and is intentionally omitted.
3
+
4
+ '[' --> [open].
5
+
6
+ %% goal: graphic_nonterminal(X0)
7
+ graphic_nonterminal(open) :- phrase('[', [open]).
@@ -0,0 +1,15 @@
1
+ % Adapted from Logtalk dcgs_if_the_else_01-06 and dcgs_bypass_06-07.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ select --> ([x] -> [then] ; [else]).
5
+ after_prefix --> [start], ([x] -> [yes] ; [no]).
6
+ condition_sequence --> ([a], [b] -> [c] ; [d]).
7
+ embedded_condition --> ({true} -> [yes] ; [no]).
8
+
9
+ %% goal: phrase(select, [x, then])
10
+ %% goal: phrase(select, [else])
11
+ %% goal: phrase(after_prefix, [start, x, yes])
12
+ %% goal: phrase(after_prefix, [start, no])
13
+ %% goal: phrase(condition_sequence, [a, b, c])
14
+ %% goal: phrase(condition_sequence, [d])
15
+ %% goal: phrase(embedded_condition, X)
@@ -0,0 +1,11 @@
1
+ % Adapted from Logtalk dcgs_negation_01-02.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+ %% goal: negation_result(X0, X1)
4
+
5
+ not_b --> \+ [b], [_].
6
+ middle_not_x --> [a], \+ [x], [_].
7
+
8
+ negation_result(prefix_success, a) :- phrase(not_b, [a]).
9
+ negation_result(prefix_failure, preserved) :- \+ phrase(not_b, [b]).
10
+ negation_result(middle_success, [a, b]) :- phrase(middle_not_x, [a, b]).
11
+ negation_result(middle_failure, preserved) :- \+ phrase(middle_not_x, [a, x]).
@@ -0,0 +1,11 @@
1
+ % Adapted from Logtalk dcgs_non_terminal_01-03 and dcgs_metacall_01-02.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ token(X) --> [X].
5
+ pair(X, Y) --> token(X), token(Y).
6
+ delegate(Body) --> Body.
7
+ via_call(X) --> call(token(X)).
8
+
9
+ %% goal: phrase(pair(a, b), X)
10
+ %% goal: phrase(delegate([x, y]), X)
11
+ %% goal: phrase(via_call(z), X)
@@ -0,0 +1,12 @@
1
+ % Adapted from Logtalk phrase_3_15 through 21. Modified for EyeProlog's harness.
2
+ % See test/conformance/THIRD_PARTY.md.
3
+ %% goal: phrase_identity(X0, X1)
4
+
5
+ phrase_identity(empty_braces, Rest) :- phrase({}, [tail], Rest).
6
+ phrase_identity(true_goal, Rest) :- phrase({true}, [tail], Rest).
7
+ phrase_identity(cut, Rest) :- phrase(!, [tail], Rest).
8
+ phrase_identity(terminals, Input) :- phrase([a, b], Input, []).
9
+ phrase_identity(suffix, Input) :- phrase([a, b], Input, [b]).
10
+ phrase_identity(committed_failures, preserved) :-
11
+ \+ phrase({!, fail}, [], []),
12
+ \+ phrase(({!, fail}; {true}), [], []).
@@ -0,0 +1,12 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_02-06.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ push_two, [a, b] --> [].
5
+ consume_then_push, [tail] --> [head], [middle].
6
+ echo(X), [X] --> [X].
7
+ echo_pair(X, Y), [X, Y] --> [X, Y].
8
+
9
+ %% goal: phrase(push_two, [rest], Rest)
10
+ %% goal: phrase(consume_then_push, [head, middle, rest], Rest)
11
+ %% goal: phrase(echo(x), [x, rest], Rest)
12
+ %% goal: phrase(echo_pair(a, b), [a, b, rest], Rest)
@@ -0,0 +1,12 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_01-08.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ look_ahead(X), [X] --> [X].
5
+ replace, [a, b] --> [foo].
6
+ push_one(X), [X] --> [X].
7
+ push_pair(X, Y), [X, Y] --> [X, Y].
8
+
9
+ %% goal: phrase(look_ahead(a), [a], Rest)
10
+ %% goal: phrase(replace, [foo, tail], Rest)
11
+ %% goal: phrase(push_one(x), [x], Rest)
12
+ %% goal: phrase(push_pair(a, b), [a, b], Rest)
@@ -0,0 +1,9 @@
1
+ % Adapted from Logtalk dcgs_terminal_list_05-06.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ capture(X) --> [X].
5
+ duplicate(X) --> [X, X].
6
+
7
+ %% goal: phrase(capture(X), [term(a)])
8
+ %% goal: phrase(capture(value), Tokens)
9
+ %% goal: phrase(duplicate(same), Tokens)
@@ -0,0 +1,15 @@
1
+ % Adapted from Logtalk dcgs_terminal_list_01-06 and
2
+ % dcgs_terminal_string_01-03. Modified for EyeProlog's harness.
3
+ % See test/conformance/THIRD_PARTY.md.
4
+
5
+ empty --> [].
6
+ one(X) --> [X].
7
+ mixed --> [[], {}, 3, 3.2, a(b)].
8
+ letters --> "abc".
9
+ letters_or_q --> "abc" | "q".
10
+
11
+ %% goal: phrase(empty, [])
12
+ %% goal: phrase(one(value), [value])
13
+ %% goal: phrase(mixed, [[], {}, 3, 3.2, a(b)])
14
+ %% goal: phrase(letters, X)
15
+ %% goal: phrase(letters_or_q, X)
@@ -0,0 +1,10 @@
1
+ % Adapted from Logtalk dcgs_metacall_01-02.
2
+ % Modified for EyeProlog's harness. See test/conformance/THIRD_PARTY.md.
3
+
4
+ delegate(Body) --> Body.
5
+ surrounded(Body) --> [left], Body, [right].
6
+ body_or_fallback(Body) --> Body | [fallback].
7
+
8
+ %% goal: phrase(delegate([a, b]), Tokens)
9
+ %% goal: phrase(surrounded([center]), Tokens)
10
+ %% goal: phrase(body_or_fallback([chosen]), Tokens)
@@ -0,0 +1,3 @@
1
+ % call//1 rejects a non-callable closure.
2
+ invoke --> call(1).
3
+ %% goal: phrase(invoke, [])
@@ -0,0 +1,3 @@
1
+ % call//1 requires an instantiated callable closure at execution time.
2
+ invoke(Goal) --> call(Goal).
3
+ %% goal: phrase(invoke(Goal), [])
@@ -0,0 +1,3 @@
1
+ % A grammar-rule module qualifier must be an atom.
2
+ 1:p --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % A semicontext with an uninstantiated tail cannot be translated.
2
+ p, [a|Tail] --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % phrase//1 propagates its grammar-body instantiation requirement.
2
+ invoke(Body) --> phrase(Body).
3
+ %% goal: phrase(invoke(Body), [])
@@ -0,0 +1,4 @@
1
+ % Qualified unknown nonterminals report their expanded predicate indicator.
2
+ :- module(dcg_missing, [invoke//0]).
3
+ invoke --> dcg_missing:absent.
4
+ %% goal: phrase(dcg_missing:invoke, [])
@@ -0,0 +1,3 @@
1
+ % A grammar rule cannot use a variable module qualifier.
2
+ Module:p --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % A variable grammar body reports instantiation when invoked.
2
+ p --> Body.
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % A grammar rule cannot have a variable nonterminal head.
2
+ Head --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_2_05 and 07. Modified for EyeProlog's harness.
2
+ %% goal: phrase(unknown_nonterminal, not_a_terminal_sequence)
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_11 and 14. Modified for EyeProlog's harness.
2
+ %% goal: phrase(unknown_nonterminal, Input, not_a_terminal_sequence)
@@ -0,0 +1,3 @@
1
+ % Inspired by Logtalk's invalid grammar head translation cases.
2
+ {goal} --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Inspired by Logtalk's invalid grammar head translation cases.
2
+ ! --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_06. Modified for EyeProlog's harness.
2
+ %% goal: phrase({1}, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_09-12.
2
+ p, [a|b] --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_terminal_list_04. Modified for EyeProlog's harness.
2
+ p --> [a|b].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_10. Modified for EyeProlog's harness.
2
+ p, b --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_09.
2
+ p, [t1], [t2] --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_07. Modified for EyeProlog's harness.
2
+ %% goal: phrase(([_], {1}), [_])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_08-09. Modified for EyeProlog's harness.
2
+ %% goal: phrase(([x]; {1}), [y], [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_07-09. Modified for EyeProlog's harness.
2
+ %% goal: phrase(([_]; {1}), [_], [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_2_03 and 05. Modified for EyeProlog's harness.
2
+ %% goal: phrase(1, not_a_terminal_sequence)
@@ -0,0 +1,3 @@
1
+ % Inspired by Logtalk's invalid nonterminal translation cases.
2
+ 3 --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_non_terminal_02. Modified for EyeProlog's harness.
2
+ p --> 3.
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,4 @@
1
+ % Inspired by Logtalk dcgs_terminal_list_04 and phrase_3_03.
2
+ % Modified for EyeProlog's harness.
3
+ p --> [a|Tail].
4
+ %% goal: phrase(p, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_04. Modified for EyeProlog's harness.
2
+ %% goal: phrase({Goal}, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_2_06 and phrase_3_12. Modified for EyeProlog.
2
+ %% goal: phrase(foo, [a|b])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_3_13. Modified for EyeProlog's harness.
2
+ %% goal: phrase(foo, Input, [a|b])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_11.
2
+ [t], p --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,3 @@
1
+ % Adapted from Logtalk dcgs_push_back_list_11. Modified for EyeProlog's harness.
2
+ [t] --> [].
3
+ %% goal: phrase(p, [])
@@ -0,0 +1,2 @@
1
+ % Adapted from Logtalk phrase_2_07 and phrase_3_14. Modified for EyeProlog.
2
+ %% goal: phrase(foo, [])
@@ -0,0 +1 @@
1
+ ambiguity([first, second]).
@@ -0,0 +1 @@
1
+ phrase(uses_atom_body, [recognized]).
@@ -0,0 +1 @@
1
+ phrase(codes, "ab").
@@ -0,0 +1,5 @@
1
+ dynamic_body(sequence, "ab").
2
+ dynamic_body(choice, "a").
3
+ dynamic_body(choice, "b").
4
+ dynamic_body(embedded, [ok]).
5
+ dynamic_body(conditional, [x, yes]).
@@ -0,0 +1 @@
1
+ dynamic_nonterminal(asserted).
@@ -0,0 +1 @@
1
+ phrase(dcg_explicit:word, "x").
@@ -0,0 +1 @@
1
+ phrase(outer, "iio").
@@ -0,0 +1,2 @@
1
+ dcg_operator(-->, 1200, xfx).
2
+ dcg_operator('|', 1105, xfy).
@@ -0,0 +1,3 @@
1
+ partial_sequence(one).
2
+ partial_sequence(two).
3
+ partial_sequence(empty).
@@ -0,0 +1,4 @@
1
+ steadfast(bound_before).
2
+ steadfast(bound_after).
3
+ steadfast(selects_matching_alternative).
4
+ steadfast(shared_sequence).
@@ -0,0 +1,2 @@
1
+ dcg_chain:answer("x").
2
+ phrase(dcg_chain:wrapper, "x").
@@ -0,0 +1,3 @@
1
+ phrase(tokens("abc"), "abc").
2
+ phrase(tokens("xy"), "xy").
3
+ phrase(tokens("ab"), [a, b, rest], [rest]).
@@ -0,0 +1,2 @@
1
+ phrase(capture_states(left, right, source_input, source_output), [left, right]).
2
+ phrase(anonymous_pair, [one, two]).
@@ -0,0 +1,8 @@
1
+ phrase(sequence, "ab").
2
+ phrase(optional_b, "ab").
3
+ phrase(optional_b, "a").
4
+ phrase(bar_choice, "x").
5
+ phrase(bar_choice, "y").
6
+ phrase(bar_choice, "z").
7
+ phrase(nested_choice, "ab").
8
+ phrase(nested_choice, "ac").
@@ -0,0 +1,4 @@
1
+ cut_result(committed, "a").
2
+ cut_result(fallback_before_cut, "b").
3
+ cut_result(failure_after_cut, preserved).
4
+ cut_result(nested, [start, a]).
@@ -0,0 +1,4 @@
1
+ cut_position(first, "a").
2
+ cut_position(middle, "ab").
3
+ cut_position(choice, "ab").
4
+ cut_position(failure, preserved).
@@ -0,0 +1,4 @@
1
+ phrase(checked(token), [token]).
2
+ phrase(bind(bound), []).
3
+ phrase(embedded_sequence(a), "a").
4
+ phrase(embedded_if, [yes]).
@@ -0,0 +1,3 @@
1
+ phrase(three_checks(a), "a").
2
+ phrase(grouped_checks(b), "b").
3
+ phrase(embedded_choice, [ok]).
@@ -0,0 +1 @@
1
+ graphic_nonterminal(open).
@@ -0,0 +1,7 @@
1
+ phrase(select, [x, then]).
2
+ phrase(select, [else]).
3
+ phrase(after_prefix, [start, x, yes]).
4
+ phrase(after_prefix, [start, no]).
5
+ phrase(condition_sequence, "abc").
6
+ phrase(condition_sequence, "d").
7
+ phrase(embedded_condition, [yes]).
@@ -0,0 +1,4 @@
1
+ negation_result(prefix_success, a).
2
+ negation_result(prefix_failure, preserved).
3
+ negation_result(middle_success, "ab").
4
+ negation_result(middle_failure, preserved).
@@ -0,0 +1,3 @@
1
+ phrase(pair(a, b), "ab").
2
+ phrase(delegate("xy"), "xy").
3
+ phrase(via_call(z), "z").
@@ -0,0 +1,6 @@
1
+ phrase_identity(empty_braces, [tail]).
2
+ phrase_identity(true_goal, [tail]).
3
+ phrase_identity(cut, [tail]).
4
+ phrase_identity(terminals, "ab").
5
+ phrase_identity(suffix, "abb").
6
+ phrase_identity(committed_failures, preserved).
@@ -0,0 +1,4 @@
1
+ phrase(push_two, [rest], [a, b, rest]).
2
+ phrase(consume_then_push, [head, middle, rest], [tail, rest]).
3
+ phrase(echo(x), [x, rest], [x, rest]).
4
+ phrase(echo_pair(a, b), [a, b, rest], [a, b, rest]).
@@ -0,0 +1,4 @@
1
+ phrase(look_ahead(a), "a", "a").
2
+ phrase(replace, [foo, tail], [a, b, tail]).
3
+ phrase(push_one(x), "x", "x").
4
+ phrase(push_pair(a, b), "ab", "ab").
@@ -0,0 +1,3 @@
1
+ phrase(capture(term(a)), [term(a)]).
2
+ phrase(capture(value), [value]).
3
+ phrase(duplicate(same), [same, same]).
@@ -0,0 +1,6 @@
1
+ phrase(empty, []).
2
+ phrase(one(value), [value]).
3
+ phrase(mixed, [[], {}, 3, 3.2, a(b)]).
4
+ phrase(letters, "abc").
5
+ phrase(letters_or_q, "abc").
6
+ phrase(letters_or_q, "q").
@@ -0,0 +1,4 @@
1
+ phrase(delegate("ab"), "ab").
2
+ phrase(surrounded([center]), [left, center, right]).
3
+ phrase(body_or_fallback([chosen]), [chosen]).
4
+ phrase(body_or_fallback([chosen]), [fallback]).
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(type_error(atom), 1)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(existence_error(procedure), /(absent, 2))
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), not_a_terminal_sequence)
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), not_a_terminal_sequence)
@@ -0,0 +1 @@
1
+ error(permission_error(define, grammar_rule), {goal})
@@ -0,0 +1 @@
1
+ error(permission_error(define, grammar_rule), !)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), [a | b])
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), [a | b])
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), b)
@@ -0,0 +1 @@
1
+ parse line 2: expected ., got ,
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 1)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 3)
@@ -0,0 +1 @@
1
+ error(type_error(callable), 3)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(instantiation_error)
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), [a | b])
@@ -0,0 +1 @@
1
+ error(type_error(terminal_sequence), [a | b])
@@ -0,0 +1 @@
1
+ error(permission_error(define, grammar_rule), "t")
@@ -0,0 +1 @@
1
+ error(permission_error(define, grammar_rule), "t")
@@ -0,0 +1 @@
1
+ error(existence_error(procedure), /(foo, 2))
@@ -6606,7 +6606,7 @@ node test/run-conformance-report.mjs
6606
6606
  ```
6607
6607
 
6608
6608
  The complete suite must pass before release. The file-based conformance corpus
6609
- contains 719 cases, including 313 focused ISO
6609
+ contains 779 cases, including 373 focused ISO
6610
6610
  cases derived from the success, failure, mode, and error behavior in
6611
6611
  ISO/IEC 13211-1 clauses 7 and 8, Part 2 modules, and Part 3 grammar rules.
6612
6612
  Separate exact-output suites check 189 normal