diff --git a/src/DAAP2SQL.g b/src/DAAP2SQL.g index b10c772b..d1cf0dda 100644 --- a/src/DAAP2SQL.g +++ b/src/DAAP2SQL.g @@ -48,6 +48,7 @@ options { } query returns [ pANTLR3_STRING result ] +@init { $result = NULL; } : e = expr { if (!$e.valid) diff --git a/src/RSP2SQL.g b/src/RSP2SQL.g index c2c6b242..8796dba3 100644 --- a/src/RSP2SQL.g +++ b/src/RSP2SQL.g @@ -54,6 +54,7 @@ options { } query returns [ pANTLR3_STRING result ] +@init { $result = NULL; } : e = expr { if (!$e.valid) @@ -225,6 +226,7 @@ strcrit returns [ pANTLR3_STRING result, int valid ] ; strop returns [ pANTLR3_COMMON_TOKEN op ] +@init { $op = NULL; } : n = EQUAL { $op = $n->getToken($n); } | n = INCLUDES @@ -297,6 +299,7 @@ intcrit returns [ pANTLR3_STRING result, int valid ] ; intop returns [ pANTLR3_COMMON_TOKEN op ] +@init { $op = NULL; } : n = EQUAL { $op = $n->getToken($n); } | n = LESS @@ -369,6 +372,7 @@ datecrit returns [ pANTLR3_STRING result, int valid ] ; dateop returns [ pANTLR3_COMMON_TOKEN op ] +@init { $op = NULL; } : n = BEFORE { $op = $n->getToken($n); } | n = AFTER