phrase(NonTerminal, Input, Rest) phrase(::NonTerminal, Input, Rest) phrase(Object::NonTerminal, Input, Rest)
True if the list Input
of tokens can be parsed using the specified non-terminal NonTerminal
. The list Rest
is what remains of the list Input
after parsing succeeded. This method also accepts grammar rule bodies in the first argument. This built-in method is declared private and thus cannot be used as a message to an object. When using a back-end Prolog compiler supporting a module system, calls in the format phrase(Module:NonTerminal, Input, Rest)
may also be used.
This method is opaque to cuts in the first argument.
phrase(+callable, ?list, ?list)
instantiation_error
type_error(callable, NonTerminal)
type_error(list, Input)
type_error(list, Rest)
permission_error(access, private_non_terminal, NonTerminal)
permission_error(access, protected_non_terminal, NonTerminal)
existence_error(non_terminal_declaration, NonTerminal)
phrase(NonTerminal, Input, Rest)
phrase(::NonTerminal, Input, Rest)
phrase(Object::NonTerminal, Input, Rest)