src/Pure/ProofGeneral/parsing.ML
changeset 21966 edab0ecfbd7c
parent 21902 8e5e2571c716
child 21971 513e1d82640d
equal deleted inserted replaced
21965:7120ef5bc378 21966:edab0ecfbd7c
   298        to reconstruct the input. *)
   298        to reconstruct the input. *)
   299     (* TODO: see if duplicating isar_output/parse_thy can help here *)
   299     (* TODO: see if duplicating isar_output/parse_thy can help here *)
   300 
   300 
   301     fun match_tokens ([],us,vs) = (rev vs,us)  (* used, unused *)
   301     fun match_tokens ([],us,vs) = (rev vs,us)  (* used, unused *)
   302       | match_tokens (t::ts, w::ws, vs) =
   302       | match_tokens (t::ts, w::ws, vs) =
   303         if OuterLex.eq_token (t, w)
   303         if (t: OuterLex.token) = w  (* FIXME !? *)
   304           then match_tokens (ts, ws, w::vs)
   304           then match_tokens (ts, ws, w::vs)
   305           else match_tokens (t::ts, ws, w::vs)
   305           else match_tokens (t::ts, ws, w::vs)
   306       | match_tokens _ = error ("match_tokens: mismatched input parse")
   306       | match_tokens _ = error ("match_tokens: mismatched input parse")
   307 in
   307 in
   308     fun pgip_parser str =
   308     fun pgip_parser str =