regexp/syntax: replace internal error on unexpected ) w/ ErrUnexpectedParen

Unbalanced extra right parenthesis produced an internal error instead of
a more descriptive one.

Fixes #3406.

R=r, rsc
CC=golang-dev
https://golang.org/cl/6201063
diff --git a/src/pkg/regexp/syntax/parse_test.go b/src/pkg/regexp/syntax/parse_test.go
index c6e6339..81fd9dc 100644
--- a/src/pkg/regexp/syntax/parse_test.go
+++ b/src/pkg/regexp/syntax/parse_test.go
@@ -441,10 +441,18 @@
 	`(`,
 	`)`,
 	`(a`,
+	`a)`,
+	`(a))`,
 	`(a|b|`,
+	`a|b|)`,
+	`(a|b|))`,
 	`(a|b`,
+	`a|b)`,
+	`(a|b))`,
 	`[a-z`,
 	`([a-z)`,
+	`[a-z)`,
+	`([a-z]))`,
 	`x{1001}`,
 	`x{9876543210}`,
 	`x{2,1}`,