equal
deleted
inserted
replaced
142 let |
142 let |
143 val chs = explode str; (*sic!*) |
143 val chs = explode str; (*sic!*) |
144 val scan_toks = Scan.repeat (scan_token lex); |
144 val scan_toks = Scan.repeat (scan_token lex); |
145 val ignore = fn (Ignore, _, _) => true | _ => false; |
145 val ignore = fn (Ignore, _, _) => true | _ => false; |
146 in |
146 in |
147 (case Scan.error (Scan.finite' Symbol.eof scan_toks) (Some 1, chs) of |
147 (case Scan.error (Scan.finite' Symbol.stopper scan_toks) (Some 1, chs) of |
148 (toks, (n, [])) => filter_out ignore toks @ [token EOF n "end-of-file"] |
148 (toks, (n, [])) => filter_out ignore toks @ [token EOF n "end-of-file"] |
149 | (_, (n, cs)) => error (lex_err n ("Bad input " ^ quote (beginning cs)))) |
149 | (_, (n, cs)) => error (lex_err n ("Bad input " ^ quote (beginning cs)))) |
150 end; |
150 end; |
151 |
151 |
152 |
152 |