equal
deleted
inserted
replaced
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 } |