src/Pure/Thy/thy_header.scala
changeset 58900 1435cc20b022
parent 58899 0a793c580685
child 58903 38c72f5f6c2e
     1.1 --- a/src/Pure/Thy/thy_header.scala	Wed Nov 05 15:32:11 2014 +0100
     1.2 +++ b/src/Pure/Thy/thy_header.scala	Wed Nov 05 16:57:12 2014 +0100
     1.3 @@ -27,9 +27,10 @@
     1.4    val AND = "and"
     1.5    val BEGIN = "begin"
     1.6  
     1.7 -  private val lexicon =
     1.8 -    Scan.Lexicon("%", "(", ")", ",", "::", "==", AND, BEGIN,
     1.9 -      HEADER, CHAPTER, SECTION, SUBSECTION, SUBSUBSECTION, IMPORTS, KEYWORDS, THEORY)
    1.10 +  private val keywords =
    1.11 +    Keyword.Keywords(
    1.12 +      List("%", "(", ")", ",", "::", "==", AND, BEGIN,
    1.13 +        HEADER, CHAPTER, SECTION, SUBSECTION, SUBSUBSECTION, IMPORTS, KEYWORDS, THEORY))
    1.14  
    1.15  
    1.16    /* theory file name */
    1.17 @@ -95,7 +96,7 @@
    1.18  
    1.19    def read(reader: Reader[Char]): Thy_Header =
    1.20    {
    1.21 -    val token = Token.Parsers.token(lexicon, Scan.Lexicon.empty)
    1.22 +    val token = Token.Parsers.token(keywords)
    1.23      val toks = new mutable.ListBuffer[Token]
    1.24  
    1.25      @tailrec def scan_to_begin(in: Reader[Char])
    1.26 @@ -121,7 +122,7 @@
    1.27  
    1.28    /* keywords */
    1.29  
    1.30 -  type Keywords = List[(String, Option[((String, List[String]), List[String])], Option[String])]
    1.31 +  type Keywords = List[(String, Option[Keyword.Spec], Option[String])]
    1.32  }
    1.33  
    1.34