The strings are:
?- use_module(library(pPEG)).
true.
?- ['pPEGpl/Examples/SWIP-grammar/pl_grammar.pl'].
true.
?- ['pPEGpl/Examples/SWIP-grammar/pl_parser.pl'].
true.
?- string_termList("- =:= :- - x0 .", [X]), write_canonical(X), nl.
:-(=:=(-),-(x0))
X = (=:=(-):- -x0).
?- string_termList("- - * :- x0 .", [X]), write_canonical(X), nl.
:-(*(-(-)),x0)
X = (*(- (-)):-x0).
But maybe its a problem with error handling, realization of
your philosophical objection, that the above should fail
?
I was using verbose(silent)
?
Edit 08.05.2022:
If you take SWI-Prolog as the reference implementation, the two
should indeed fail in pPEG SWIPL example, since in SWI-Prolog
they throw an error:
?- X = (- =:= :- - x0), write_canonical(X), nl.
ERROR: Syntax error: Operator priority clash
?- X = (- - * :- x0), write_canonical(X), nl.
ERROR: Syntax error: Operator priority clash