cleanup lexer implementation, replace is_char_numeric is isdigit from base