leftRecursive :: [Token] -> ([Token] -> ParserResult) -> Token
                 -> (Ast -> Ast -> Ast) -> ParserResult
leftRecursive tokens parsingFunc separator astType = do
    (aa, ta) <- manySep tokens parsingFunc separator
    return (buildTree aa, ta)
    where
        buildTree subList =
            if length subList == 1 then head subList
            else astType (buildTree $ init subList) (last subList)
leftRecursive :: [Token] -> ([Token] -> ParserResult) -> Token
                 -> (Ast -> Ast -> Ast) -> ParserResult
leftRecursive tokens parsingFunc separator astType = do
    (aa, ta) <- manySep tokens parsingFunc separator
    return (buildTree aa, ta)
    where
        buildTree subList =
            if length subList == 1 then head subList
            else astType (buildTree $ init subList) (last subList)
leftRecursive tokens parsingFunc separator astType = do
    (aa, ta) <- manySep tokens parsingFunc separator
    return (buildTree aa, ta)
    where
        buildTree subList =
            if length subList == 1 then head subList
            else astType (buildTree $ init subList) (last subList)