src/Pure/Thy/thy_header.scala
changeset 64777 ca09695eb43c
parent 64759 100941134718
child 64824 330ec9bc4b75
equal deleted inserted replaced
64776:3f20c63f71be 64777:ca09695eb43c
    75   val ML_BOOTSTRAP = "ML_Bootstrap"
    75   val ML_BOOTSTRAP = "ML_Bootstrap"
    76   val ML_ROOT = "ML_Root"
    76   val ML_ROOT = "ML_Root"
    77   val ml_roots = List("ROOT0.ML" -> "ML_Root0", "ROOT.ML" -> ML_ROOT)
    77   val ml_roots = List("ROOT0.ML" -> "ML_Root0", "ROOT.ML" -> ML_ROOT)
    78   val bootstrap_thys = List(PURE, ML_BOOTSTRAP).map(a => a -> ("Bootstrap_" + a))
    78   val bootstrap_thys = List(PURE, ML_BOOTSTRAP).map(a => a -> ("Bootstrap_" + a))
    79 
    79 
    80   private val Dir_Name = new Regex("""(.*?)[^/\\:]+""")
       
    81   private val Base_Name = new Regex(""".*?([^/\\:]+)""")
    80   private val Base_Name = new Regex(""".*?([^/\\:]+)""")
    82   private val Thy_Name = new Regex(""".*?([^/\\:]+)\.thy""")
    81   private val Thy_Name = new Regex(""".*?([^/\\:]+)\.thy""")
    83 
       
    84   def dir_name(s: String): String =
       
    85     s match { case Dir_Name(name) => name case _ => "" }
       
    86 
    82 
    87   def base_name(s: String): String =
    83   def base_name(s: String): String =
    88     s match { case Base_Name(name) => name case _ => error("Malformed import: " + quote(s)) }
    84     s match { case Base_Name(name) => name case _ => error("Malformed import: " + quote(s)) }
    89 
    85 
    90   def thy_name(s: String): Option[String] =
    86   def thy_name(s: String): Option[String] =