aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2019-02-14 16:04:33 +0100
committerThomas White <taw@physics.org>2019-02-14 16:04:33 +0100
commitb2276977058b8a434952b500a1a13dacfa9303ab (patch)
tree0f1c6a70201d4d7525b7efdd392d41df3f21e291
parentc9456a1a73a8b781f4460d48c541a8977e249b91 (diff)
Move prefix to flex/bison input files
-rw-r--r--libstorycode/storycode.l1
-rw-r--r--libstorycode/storycode.y1
-rw-r--r--meson.build4
3 files changed, 3 insertions, 3 deletions
diff --git a/libstorycode/storycode.l b/libstorycode/storycode.l
index e8fd70a..663a4b1 100644
--- a/libstorycode/storycode.l
+++ b/libstorycode/storycode.l
@@ -25,6 +25,7 @@
#include "storycode_parse.h"
%}
+%option prefix="sc"
%option noyywrap nounput noinput
%s string
diff --git a/libstorycode/storycode.y b/libstorycode/storycode.y
index 625f080..38ce93b 100644
--- a/libstorycode/storycode.y
+++ b/libstorycode/storycode.y
@@ -28,6 +28,7 @@
%define api.value.type {char *}
%define api.token.prefix {SC_}
+%define api.prefix {sc}
%token STYLES SLIDE
%token NARRATIVE
%token PRESTITLE
diff --git a/meson.build b/meson.build
index 6a03731..9515624 100644
--- a/meson.build
+++ b/meson.build
@@ -39,8 +39,7 @@ storycode_parse_ch = custom_target('storycode_parse.c',
'storycode_parse.h'],
input : 'libstorycode/storycode.y',
command : [bison, '--defines=@OUTPUT1@',
- '-p', 'sc',
- '--report=all',
+ '--report=all',
'--output=@OUTPUT0@',
'@INPUT@'])
@@ -49,7 +48,6 @@ storycode_lex_c = custom_target('storycode_lex.c',
input : ['libstorycode/storycode.l', storycode_parse_ch],
command : [flex, '--outfile=@OUTPUT0@',
'--header-file=@OUTPUT1@',
- '-P', 'sc',
'@INPUT@'])
libstorycode = library('storycode',