The rule to easily find unbalanced parentheses is actually very simple, it's just hard work to code 
A simple rule is that a set of parentheses can only contain nothing, an expression, or a list of comma seperated expressions. As soon as you get more than one expression which is not comma seperated you have an error. This is true whether the parentheses are on the same line or spread over multiple lines.
Code:
; Good 1:
someFunction(a,b)
; Bad 1:
someFunction(a b)
; Good 2:
someFuntion(
someOtherFunction(
b
)
)
; Bad 2:
someFunction(a
someOtherFunction b)
You know that Bad 2 is wrong, because it has the parameters "a" and "someOtherFunction" which are not comma seperated. It also has parameter "b" but you already know that you have a problem from the first two.
You could also report the closing parenthesis as bad, or you could ignore it in which case it would be picked up after the coder fixed the earlier error.
You will however need to determine what constitutes a parameter. For example this is perfectly acceptable code:
Code:
a = foo ( bar ( ) )
So your parser will need to lose the redundant spaces which might otherwise cause you problems.