Grammer loading works and test file can lex itself. Got rid of regex memory saftey for speed, will reintroduce next

This commit is contained in:
Nathan Braswell
2015-07-06 13:48:19 -04:00
parent 501331e37b
commit 92f5c63c9a
7 changed files with 61 additions and 10 deletions

View File

@@ -4,6 +4,12 @@ import string
import vector
import util
fun lexer(regs: vector::vector<regex::regex>): lexer {
var toRet.construct() :lexer
regs.for_each( fun(reg: regex::regex) toRet.add_regex(reg); )
return toRet
}
obj lexer (Object) {
var regs: vector::vector<regex::regex>
var input: string::string