2014-10-21 10:27:33 -04:00
|
|
|
USING: formatting io kernel accessors math.parser sequences prettyprint
|
2008-12-08 21:04:13 -05:00
|
|
|
debugger peg ;
|
|
|
|
IN: peg.debugger
|
|
|
|
|
2014-10-21 10:27:33 -04:00
|
|
|
|
2008-12-08 21:04:13 -05:00
|
|
|
M: parse-error error.
|
2014-10-21 10:27:33 -04:00
|
|
|
[ position>> ] [ messages>> " or " join ] [ got>> ] tri
|
|
|
|
"Peg parsing error at character position %d.\nExpected %s\nGot '%s'\n"
|
|
|
|
printf ;
|
2008-12-08 21:04:13 -05:00
|
|
|
|
|
|
|
M: parse-failed error.
|
2014-10-21 10:27:33 -04:00
|
|
|
"The " write dup word>> pprint " word could not parse the following input:" print nl
|
|
|
|
input>> . ;
|