(lex, rest) = span (not . isValid) xs
    in UnknownLexeme (x:lex) : lexer rest

getErrors :: [Lexeme]
lexer (x:xs) =
    let (lex, rest) = span (not . isValid) xs
    in UnknownLexeme (x:lex) : lexer rest
lexer (x:xs) =
    let (lex, rest) = span (not . isValid) xs
    in UnknownLexeme (x:lex) : lexer rest