summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authorJohn Millaway <john43@users.sourceforge.net>2003-03-02 01:45:17 +0000
committerJohn Millaway <john43@users.sourceforge.net>2003-03-02 01:45:17 +0000
commitf4121c7bbf44465afb6cee00677084132aa5df0f (patch)
tree2121e30008099078dc2c7e07f0b1a0da1f6578a0 /misc.c
parentd39859dfa3c8dc32510fc32a4b11658bd0e031a6 (diff)
Removed awkward %push %pop syntax from skeleton.
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/misc.c b/misc.c
index 1873c2a..0ef04be 100644
--- a/misc.c
+++ b/misc.c
@@ -37,9 +37,9 @@
#define CMD_IF_TABLES_SER "%if-tables-serialization"
#define CMD_TABLES_YYDMAP "%tables-yydmap"
#define CMD_DEFINE_YYTABLES "%define-yytables"
-#define CMD_CPP_ONLY "%c++-only"
-#define CMD_C_ONLY "%c-only"
-#define CMD_C_OR_CPP "%c-or-c++"
+#define CMD_IF_CPP_ONLY "%if-c++-only"
+#define CMD_IF_C_ONLY "%if-c-only"
+#define CMD_IF_C_OR_CPP "%if-c-or-c++"
#define CMD_NOT_FOR_HEADER "%not-for-header"
#define CMD_OK_FOR_HEADER "%ok-for-header"
#define CMD_PUSH "%push"
@@ -939,16 +939,19 @@ void skelout ()
out_str("#define YYTABLES_NAME \"%s\"\n",
tablesname?tablesname:"yytables");
}
- else if (cmd_match (CMD_CPP_ONLY)) {
+ else if (cmd_match (CMD_IF_CPP_ONLY)) {
/* only for C++ */
+ sko_push(do_copy);
do_copy = C_plus_plus;
}
- else if (cmd_match (CMD_C_ONLY)) {
+ else if (cmd_match (CMD_IF_C_ONLY)) {
/* %- only for C */
+ sko_push(do_copy);
do_copy = !C_plus_plus;
}
- else if (cmd_match (CMD_C_OR_CPP)) {
+ else if (cmd_match (CMD_IF_C_OR_CPP)) {
/* %* for C and C++ */
+ sko_push(do_copy);
do_copy = true;
}
else if (cmd_match (CMD_NOT_FOR_HEADER)) {