src/Pure/Thy/sessions.scala
changeset 66970 13857f49d215
parent 66969 39077839947e
child 66974 b14c24b31f45
equal deleted inserted replaced
66969:39077839947e 66970:13857f49d215
   689       val theory_entry =
   689       val theory_entry =
   690         position(theory_name) ~ global ^^ { case x ~ y => (x, y) }
   690         position(theory_name) ~ global ^^ { case x ~ y => (x, y) }
   691 
   691 
   692       val theories =
   692       val theories =
   693         $$$(THEORIES) ~!
   693         $$$(THEORIES) ~!
   694           ((options | success(Nil)) ~ rep(theory_entry)) ^^
   694           ((options | success(Nil)) ~ rep1(theory_entry)) ^^
   695           { case _ ~ (x ~ y) => (x, y) }
   695           { case _ ~ (x ~ y) => (x, y) }
   696 
   696 
   697       val document_files =
   697       val document_files =
   698         $$$(DOCUMENT_FILES) ~!
   698         $$$(DOCUMENT_FILES) ~!
   699           (($$$("(") ~! ($$$(IN) ~! (path ~ $$$(")"))) ^^
   699           (($$$("(") ~! ($$$(IN) ~! (path ~ $$$(")"))) ^^
   706           (($$$(IN) ~! path ^^ { case _ ~ x => x }) | success(".")) ~
   706           (($$$(IN) ~! path ^^ { case _ ~ x => x }) | success(".")) ~
   707           ($$$("=") ~!
   707           ($$$("=") ~!
   708             (opt(session_name ~! $$$("+") ^^ { case x ~ _ => x }) ~
   708             (opt(session_name ~! $$$("+") ^^ { case x ~ _ => x }) ~
   709               (($$$(DESCRIPTION) ~! text ^^ { case _ ~ x => x }) | success("")) ~
   709               (($$$(DESCRIPTION) ~! text ^^ { case _ ~ x => x }) | success("")) ~
   710               (($$$(OPTIONS) ~! options ^^ { case _ ~ x => x }) | success(Nil)) ~
   710               (($$$(OPTIONS) ~! options ^^ { case _ ~ x => x }) | success(Nil)) ~
   711               (($$$(SESSIONS) ~! rep(session_name)  ^^ { case _ ~ x => x }) | success(Nil)) ~
   711               (($$$(SESSIONS) ~! rep1(session_name)  ^^ { case _ ~ x => x }) | success(Nil)) ~
   712               rep1(theories) ~
   712               rep(theories) ~
   713               (rep(document_files) ^^ (x => x.flatten))))) ^^
   713               (rep(document_files) ^^ (x => x.flatten))))) ^^
   714         { case _ ~ ((a, pos) ~ b ~ c ~ (_ ~ (d ~ e ~ f ~ g ~ h ~ i))) =>
   714         { case _ ~ ((a, pos) ~ b ~ c ~ (_ ~ (d ~ e ~ f ~ g ~ h ~ i))) =>
   715             Session_Entry(pos, a, b, c, d, e, f, g, h, i) }
   715             Session_Entry(pos, a, b, c, d, e, f, g, h, i) }
   716     }
   716     }
   717 
   717