equal
deleted
inserted
replaced
881 (DOCUMENT_FILES, Keyword.QUASI_COMMAND) + |
881 (DOCUMENT_FILES, Keyword.QUASI_COMMAND) + |
882 (EXPORT_FILES, Keyword.QUASI_COMMAND) + |
882 (EXPORT_FILES, Keyword.QUASI_COMMAND) + |
883 (EXPORT_CLASSPATH, Keyword.QUASI_COMMAND) |
883 (EXPORT_CLASSPATH, Keyword.QUASI_COMMAND) |
884 |
884 |
885 abstract class Entry |
885 abstract class Entry |
886 sealed case class Chapter(name: String) extends Entry |
886 sealed case class Chapter_Entry(name: String) extends Entry |
887 sealed case class Session_Entry( |
887 sealed case class Session_Entry( |
888 pos: Position.T, |
888 pos: Position.T, |
889 name: String, |
889 name: String, |
890 groups: List[String], |
890 groups: List[String], |
891 path: String, |
891 path: String, |
905 def document_theories_no_position: List[String] = |
905 def document_theories_no_position: List[String] = |
906 document_theories.map(_._1) |
906 document_theories.map(_._1) |
907 } |
907 } |
908 |
908 |
909 private object Parsers extends Options.Parsers { |
909 private object Parsers extends Options.Parsers { |
910 private val chapter: Parser[Chapter] = { |
910 private val chapter: Parser[Chapter_Entry] = { |
911 val chapter_name = atom("chapter name", _.is_name) |
911 val chapter_name = atom("chapter name", _.is_name) |
912 |
912 |
913 command(CHAPTER) ~! chapter_name ^^ { case _ ~ a => Chapter(a) } |
913 command(CHAPTER) ~! chapter_name ^^ { case _ ~ a => Chapter_Entry(a) } |
914 } |
914 } |
915 |
915 |
916 private val session_entry: Parser[Session_Entry] = { |
916 private val session_entry: Parser[Session_Entry] = { |
917 val option = |
917 val option = |
918 option_name ~ opt($$$("=") ~! option_value ^^ { case _ ~ x => x }) ^^ |
918 option_name ~ opt($$$("=") ~! option_value ^^ { case _ ~ x => x }) ^^ |
984 |
984 |
985 def read_root(options: Options, select: Boolean, path: Path): List[Info] = { |
985 def read_root(options: Options, select: Boolean, path: Path): List[Info] = { |
986 var entry_chapter = UNSORTED |
986 var entry_chapter = UNSORTED |
987 val infos = new mutable.ListBuffer[Info] |
987 val infos = new mutable.ListBuffer[Info] |
988 parse_root(path).foreach { |
988 parse_root(path).foreach { |
989 case Chapter(name) => entry_chapter = name |
989 case Chapter_Entry(name) => entry_chapter = name |
990 case entry: Session_Entry => |
990 case entry: Session_Entry => |
991 infos += make_info(options, select, path.dir, entry_chapter, entry) |
991 infos += make_info(options, select, path.dir, entry_chapter, entry) |
992 } |
992 } |
993 infos.toList |
993 infos.toList |
994 } |
994 } |