src/Pure/Isar/outer_syntax.scala
changeset 36956 21be4832c362
parent 36947 285b39022372
child 38471 0924654b8163
equal deleted inserted replaced
36955:226fb165833e 36956:21be4832c362
    37     }
    37     }
    38 
    38 
    39 
    39 
    40   /* tokenize */
    40   /* tokenize */
    41 
    41 
    42   def scan(input: Reader[Char]): List[Outer_Lex.Token] =
    42   def scan(input: Reader[Char]): List[Token] =
    43   {
    43   {
    44     import lexicon._
    44     import lexicon._
    45 
    45 
    46     parseAll(rep(token(symbols, is_command)), input) match {
    46     parseAll(rep(token(symbols, is_command)), input) match {
    47       case Success(tokens, _) => tokens
    47       case Success(tokens, _) => tokens
    48       case _ => error("Unexpected failure of tokenizing input:\n" + input.source.toString)
    48       case _ => error("Unexpected failure of tokenizing input:\n" + input.source.toString)
    49     }
    49     }
    50   }
    50   }
    51 
    51 
    52   def scan(input: CharSequence): List[Outer_Lex.Token] =
    52   def scan(input: CharSequence): List[Token] =
    53     scan(new CharSequenceReader(input))
    53     scan(new CharSequenceReader(input))
    54 }
    54 }