mbol x =
    let (op, rest) = span isOpSymbol xs
    in case op of
        "+" -> BinOpSign Plus : lexer rest
        "*" -> BinOpSign Mul : lexer rest
        "-" -> BinOpSign Minus : lexer rest
        "<" -> BinOpSign Less : lexer rest
        ">" -> BinOpSign Greater : lexer rest
        "==" -> BinOpSign Equals : lexer rest
        ":=" -> AssignmentSign : lexer rest
        ";" -> SemicolonSign : lexer rest
        _ -> UnknownLexeme op : lexer rest
lexer ('(':xs) = LPSig
lexer xs@(x:_) | isOpSymbol x =
    let (op, rest) = span isOpSymbol xs
    in case op of
        "+" -> BinOpSign Plus : lexer rest
        "*" -> BinOpSign Mul : lexer rest
        "-" -> BinOpSign Minus : lexer rest
        "<" -> BinOpSign Less : lexer rest
        ">" -> BinOpSign Greater : lexer rest
        "==" -> BinOpSign Equals : lexer rest
        ":=" -> AssignmentSign : lexer rest
        ";" -> SemicolonSign : lexer rest
        _ -> UnknownLexeme op : lexer rest
lexer xs@(x:_) | isOpSymbol x =
    let (op, rest) = span isOpSymbol xs
    in case op of
        "+" -> BinOpSign Plus : lexer rest
        "*" -> BinOpSign Mul : lexer rest
        "-" -> BinOpSign Minus : lexer rest
        "<" -> BinOpSign Less : lexer rest
        ">" -> BinOpSign Greater : lexer rest
        "==" -> BinOpSign Equals : lexer rest
        ":=" -> AssignmentSign : lexer rest
        ";" -> SemicolonSign : lexer rest
        _ -> UnknownLexeme op : lexer rest