equal
deleted
inserted
replaced
93 |
93 |
94 /* read -- lazy scanning */ |
94 /* read -- lazy scanning */ |
95 |
95 |
96 def read(reader: Reader[Char]): Thy_Header = |
96 def read(reader: Reader[Char]): Thy_Header = |
97 { |
97 { |
98 val token = Token.Parsers.token(lexicon, _ => false) |
98 val token = Token.Parsers.token(lexicon, Scan.Lexicon.empty) |
99 val toks = new mutable.ListBuffer[Token] |
99 val toks = new mutable.ListBuffer[Token] |
100 |
100 |
101 @tailrec def scan_to_begin(in: Reader[Char]) |
101 @tailrec def scan_to_begin(in: Reader[Char]) |
102 { |
102 { |
103 token(in) match { |
103 token(in) match { |
136 def decode_symbols: Thy_Header = |
136 def decode_symbols: Thy_Header = |
137 { |
137 { |
138 val f = Symbol.decode _ |
138 val f = Symbol.decode _ |
139 Thy_Header(f(name), imports.map(f), |
139 Thy_Header(f(name), imports.map(f), |
140 keywords.map({ case (a, b, c) => |
140 keywords.map({ case (a, b, c) => |
141 (f(a), b.map({ case ((x, y), z) => ((f(x), y.map(f)), z.map(f)) }), c.map(f)) })) |
141 (f(a), b.map({ case ((x, y), z) => ((f(x), y.map(f)), z.map(f)) }), c.map(f)) })) |
142 } |
142 } |
143 } |
143 } |
144 |
144 |