summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorDemi Obenour <demiobenour@gmail.com>2016-12-01 18:13:51 -0500
committerWill Estes <westes575@gmail.com>2016-12-29 14:18:15 -0500
commit8d4aa5ccaf1770194aee27505ccd460038c2d2dc (patch)
treeadfe13295a5468051e58908afabd7af2c2795934 /src/main.c
parent7975c43384d766ca12cb3f292754dbdc34168886 (diff)
scanner: Disallow, overquote '[' and ']' in prefix
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0c0e360..ef804cd 100644
--- a/src/main.c
+++ b/src/main.c
@@ -445,6 +445,8 @@ void check_options (void)
if ( bison_bridge_lloc)
buf_m4_define (&m4defs_buf, "<M4_YY_BISON_LLOC>", NULL);
+ if (strchr(prefix, '[') || strchr(prefix, ']'))
+ flexerror(_("Prefix cannot include '[' or ']'"));
buf_m4_define(&m4defs_buf, "M4_YY_PREFIX", prefix);
if (did_outfilename)