Only add whitespace around not-escaped parentheses

Change-Id: I4ebfb44e10e67a9d21442203e7a6b0ff203d88c6
diff --git a/parser/grammar_parser_test.go b/parser/grammar_parser_test.go
index c6f96d1..189ff68 100644
--- a/parser/grammar_parser_test.go
+++ b/parser/grammar_parser_test.go
@@ -314,6 +314,34 @@
 			},
 		},
 		{
+			name:  "PAV mapping with special character",
+			input: "[$\\(] <> [ADV & PronType:Dem]",
+			expected: &MappingResult{
+				Upper: &ast.Token{
+					Wrap: &ast.Term{
+						Key:   "$(",
+						Match: ast.MatchEqual,
+					},
+				},
+				Lower: &ast.Token{
+					Wrap: &ast.TermGroup{
+						Relation: ast.AndRelation,
+						Operands: []ast.Node{
+							&ast.Term{
+								Key:   "ADV",
+								Match: ast.MatchEqual,
+							},
+							&ast.Term{
+								Key:   "PronType",
+								Value: "Dem",
+								Match: ast.MatchEqual,
+							},
+						},
+					},
+				},
+			},
+		},
+		{
 			name:    "Invalid mapping syntax",
 			input:   "[PAV] -> [ADV]",
 			wantErr: true,