REBOL 3.0

PARSE: error messages improved

Carl Sassenrath, CTO
REBOL Technologies
22-Sep-2009 19:31 GMT

Article #0248
Main page || Index || Prior Article [0247] || Next Article [0249] || 4 Comments || Send feedback

Parse errors made more informative:

>> parse "abc" [1]
** Script error: PARSE - unexpected end of rule after: 1

>> parse "abc" [if]
** Script error: PARSE - unexpected end of rule after: if

>> parse "abc" [copy "x" "abc"]
** Script error: PARSE - expected a variable, not: "x"

>> parse "abc" [copy: "abc"]
** Script error: PARSE - command cannot be used as variable: copy:

>> bc: "bc"
>> parse "abc" ["a" :bc "bc"]
** Script error: PARSE - attempt to change input series: :bc

>> parse "abc" [if 1]
** Script error: PARSE - syntax error in rule: if

These should help users figure out rule problems.

4 Comments

REBOL 3.0
Updated 23-Nov-2024 - Edit - Copyright REBOL Technologies - REBOL.net