adapted ThyEdit operations;
authorwenzelm
Tue, 12 Aug 2008 21:28:01 +0200
changeset 27841 55b028593335
parent 27840 e9483ef084cc
child 27842 6c35d50d309f
adapted ThyEdit operations;
src/Pure/ProofGeneral/pgip_parser.ML
--- a/src/Pure/ProofGeneral/pgip_parser.ML	Tue Aug 12 21:27:59 2008 +0200
+++ b/src/Pure/ProofGeneral/pgip_parser.ML	Tue Aug 12 21:28:01 2008 +0200
@@ -90,16 +90,20 @@
             NONE => [D.Unparseable {text = text}]
           | SOME f => f text));
 
-fun parse_item (kind, toks) =
-  let val text = implode (map (PgmlIsabelle.pgml_mode ThyEdit.present_token) toks) in
+fun parse_span span =
+  let
+    val kind = ThyEdit.span_kind span;
+    val toks = ThyEdit.span_content span;
+    val text = implode (map (PgmlIsabelle.pgml_mode ThyEdit.present_token) toks);
+  in
     (case kind of
       ThyEdit.Command name => parse_command name text
     | ThyEdit.Ignored => [D.Whitespace {text = text}]
-    | ThyEdit.Unknown => [D.Unparseable {text = text}])
+    | ThyEdit.Malformed => [D.Unparseable {text = text}])
   end;
 
 
 fun pgip_parser pos str =
-  maps parse_item (ThyEdit.parse_spans pos (Source.of_string str));
+  maps parse_span (ThyEdit.parse_spans (OuterKeyword.get_lexicons ()) pos str);
 
 end;