summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/scan/grammar.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/analysis/scan/grammar.y b/src/analysis/scan/grammar.y
index f603c85..02e5973 100644
--- a/src/analysis/scan/grammar.y
+++ b/src/analysis/scan/grammar.y
@@ -788,6 +788,7 @@ YY_DECL;
}
| "~" hex_token
{
+ if ($2 == NULL) YYERROR;
$$ = g_scan_token_node_not_new($2);
}
@@ -845,6 +846,9 @@ YY_DECL;
hex_choices : hex_token "|" hex_token
{
+ if ($1 == NULL) YYERROR;
+ if ($3 == NULL) YYERROR;
+
$$ = g_scan_token_node_choice_new();
g_scan_token_node_choice_add(G_SCAN_TOKEN_NODE_CHOICE($$), $1);
g_object_unref(G_OBJECT($1));
@@ -853,6 +857,8 @@ YY_DECL;
}
| hex_choices "|" hex_token
{
+ if ($3 == NULL) YYERROR;
+
$$ = $1;
g_scan_token_node_choice_add(G_SCAN_TOKEN_NODE_CHOICE($$), $3);
g_object_unref(G_OBJECT($3));