equal
deleted
inserted
replaced
89 NONE => [D.Unparseable {text = text}] |
89 NONE => [D.Unparseable {text = text}] |
90 | SOME f => f text)); |
90 | SOME f => f text)); |
91 |
91 |
92 fun parse_span span = |
92 fun parse_span span = |
93 let |
93 let |
94 val kind = ThySyntax.span_kind span; |
94 val kind = Thy_Syntax.span_kind span; |
95 val toks = ThySyntax.span_content span; |
95 val toks = Thy_Syntax.span_content span; |
96 val text = implode (map (Print_Mode.setmp [] ThySyntax.present_token) toks); |
96 val text = implode (map (Print_Mode.setmp [] Thy_Syntax.present_token) toks); |
97 in |
97 in |
98 (case kind of |
98 (case kind of |
99 ThySyntax.Command name => parse_command name text |
99 Thy_Syntax.Command name => parse_command name text |
100 | ThySyntax.Ignored => [D.Whitespace {text = text}] |
100 | Thy_Syntax.Ignored => [D.Whitespace {text = text}] |
101 | ThySyntax.Malformed => [D.Unparseable {text = text}]) |
101 | Thy_Syntax.Malformed => [D.Unparseable {text = text}]) |
102 end; |
102 end; |
103 |
103 |
104 |
104 |
105 fun pgip_parser pos str = |
105 fun pgip_parser pos str = |
106 maps parse_span (ThySyntax.parse_spans (Keyword.get_lexicons ()) pos str); |
106 maps parse_span (Thy_Syntax.parse_spans (Keyword.get_lexicons ()) pos str); |
107 |
107 |
108 end; |
108 end; |