4 1 \ allowed nested parens by keeping track of depth
6 >IN @ #IB @ >= IF \ End of TIB?
7 QUERY-INPUT \ Get next line
11 DUP [CHAR] ( = IF \ open paren?
12 DROP \ drop the open paren
15 [CHAR] ) = IF \ close paren?
19 DUP 0= UNTIL \ continue until we reach matching close paren, depth 0
20 DROP \ drop the depth counter