src/Pure/Isar/parse.ML
changeset 78804 d4e9d6b7f48d
parent 78690 e10ef4f9c848
child 78817 30bcf149054d
equal deleted inserted replaced
78803:577835250124 78804:d4e9d6b7f48d
   121   val thms1: (Facts.ref * Token.src list) list parser
   121   val thms1: (Facts.ref * Token.src list) list parser
   122   val options: ((string * Position.T) * (string * Position.T)) list parser
   122   val options: ((string * Position.T) * (string * Position.T)) list parser
   123   val embedded_ml: ML_Lex.token Antiquote.antiquote list parser
   123   val embedded_ml: ML_Lex.token Antiquote.antiquote list parser
   124   val read_antiq: Keyword.keywords -> 'a parser -> Symbol_Pos.T list * Position.T -> 'a
   124   val read_antiq: Keyword.keywords -> 'a parser -> Symbol_Pos.T list * Position.T -> 'a
   125   val read_embedded: Proof.context -> Keyword.keywords -> 'a parser -> Input.source -> 'a
   125   val read_embedded: Proof.context -> Keyword.keywords -> 'a parser -> Input.source -> 'a
   126   val read_embedded_src: Proof.context -> Keyword.keywords -> 'a parser -> Token.src -> 'a
       
   127 end;
   126 end;
   128 
   127 
   129 structure Parse: PARSE =
   128 structure Parse: PARSE =
   130 struct
   129 struct
   131 
   130 
   531     (case Scan.read Token.stopper parse toks of
   530     (case Scan.read Token.stopper parse toks of
   532       SOME res => res
   531       SOME res => res
   533     | NONE => error ("Bad input" ^ Position.here (Input.pos_of input)))
   532     | NONE => error ("Bad input" ^ Position.here (Input.pos_of input)))
   534   end;
   533   end;
   535 
   534 
   536 fun read_embedded_src ctxt keywords parse src =
       
   537   Token.read ctxt embedded_input src
       
   538   |> read_embedded ctxt keywords parse;
       
   539 
       
   540 end;
   535 end;