equal
deleted
inserted
replaced
112 |
112 |
113 (* group atomic parsers (no cuts!) *) |
113 (* group atomic parsers (no cuts!) *) |
114 |
114 |
115 fun fail_with s = Scan.fail_with |
115 fun fail_with s = Scan.fail_with |
116 (fn [] => s ^ " expected (past end-of-file!)" |
116 (fn [] => s ^ " expected (past end-of-file!)" |
117 | (tok :: _) => |
117 | tok :: _ => |
118 (case Token.text_of tok of |
118 (case Token.text_of tok of |
119 (txt, "") => |
119 (txt, "") => |
120 s ^ " expected,\nbut " ^ txt ^ Token.pos_of tok ^ " was found" |
120 s ^ " expected,\nbut " ^ txt ^ Token.pos_of tok ^ " was found" |
121 | (txt1, txt2) => |
121 | (txt1, txt2) => |
122 s ^ " expected,\nbut " ^ txt1 ^ Token.pos_of tok ^ " was found:\n" ^ txt2)); |
122 s ^ " expected,\nbut " ^ txt1 ^ Token.pos_of tok ^ " was found:\n" ^ txt2)); |