ISO/IEC JTC1 SC22 WG17
Draft for 8.18.1.3 Errors of phrase/2 and phrase/3
This is the draft of the complete subclause 8.18.1.3 refering to
phrase(GRBody, S)
and phrase(GRBody, S0,S)
.
8.18.1.3 Errors
- a)
GRBody
is a variable
— instantiation_error.
- b)
GRBody
cannot be expanded because Culprit
is neither a variable nor a callable term
— type_error(callable, Culprit).
- c) the logical expansion of
GRBody
encounters a grammar control
construct '.'//2
whose second argument is a partial list
— instantiation_error.
- d) the logical expansion of
GRBody
encounters a grammar control
construct '.'//2
whose second argument Ts
is neither a
partial list nor a list and whose first argument is T
— type_error(list, [T|Ts]).
- e) the logical expansion
G
of GRBody
cannot be converted to a goal
— type_error(callable, G).
- f)
GRBody
cannot be expanded because a grammar
control construct is not present
— representation_error(dcg_body).
The following two errors are implementation defined. In case they
are defined they shall be the following.
- g) there is no instance of
S0
that is a terminal sequence
— type_error(list, S0).
- h) there is no instance of
S
that is a terminal sequence
— type_error(list, S).
Validated HTML