summaryrefslogtreecommitdiff
path: root/src/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/parse.y b/src/parse.y
index 4de4151..8aed868 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -199,7 +199,9 @@ option : TOK_OUTFILE '=' NAME
| TOK_EXTRA_TYPE '=' NAME
{ extra_type = xstrdup(nmstr); }
| TOK_PREFIX '=' NAME
- { prefix = xstrdup(nmstr); }
+ { prefix = xstrdup(nmstr);
+ if (strchr(prefix, '[') || strchr(prefix, ']'))
+ flexerror(_("Prefix must not contain [ or ]")); }
| TOK_YYCLASS '=' NAME
{ yyclass = xstrdup(nmstr); }
| TOK_HEADER_FILE '=' NAME