more robust: proper system_name;
authorwenzelm
Fri, 26 Aug 2022 21:34:09 +0200
changeset 75987 ff2e67d73592
parent 75986 27d98da31985
child 75988 ca73ced9e630
more robust: proper system_name;
src/Pure/Isar/parse.scala
src/Pure/Thy/sessions.scala
--- a/src/Pure/Isar/parse.scala	Fri Aug 26 21:28:26 2022 +0200
+++ b/src/Pure/Isar/parse.scala	Fri Aug 26 21:34:09 2022 +0200
@@ -71,6 +71,7 @@
     def path: Parser[String] =
       atom("file name/path specification", tok => tok.is_embedded && Path.is_wellformed(tok.content))
 
+    def chapter_name: Parser[String] = atom("chapter name", _.is_system_name)
     def session_name: Parser[String] = atom("session name", _.is_system_name)
     def theory_name: Parser[String] = atom("theory name", _.is_system_name)
 
--- a/src/Pure/Thy/sessions.scala	Fri Aug 26 21:28:26 2022 +0200
+++ b/src/Pure/Thy/sessions.scala	Fri Aug 26 21:34:09 2022 +0200
@@ -941,9 +941,6 @@
   }
 
   private object Parsers extends Options.Parsers {
-    private val chapter_name: Parser[String] =
-      atom("chapter name", _.is_name)
-
     private val chapter_def: Parser[Chapter_Def] =
       command(CHAPTER_DEFINITION) ~!
         (position(chapter_name) ~ $$$(DESCRIPTION) ~ text) ^^