From d7acfd8c8ee5cd06883a2f657affee8587d36835 Mon Sep 17 00:00:00 2001 From: Dane Johnson Date: Fri, 17 Dec 2021 15:47:46 -0600 Subject: [PATCH] Use a c++ compiler --- Makefile | 2 +- cyoa.leg | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 28df1f3..d748995 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -CC = gcc +CC = g++ CFLAGS = -g all: cyoa diff --git a/cyoa.leg b/cyoa.leg index 0b8c4ab..ed0310e 100644 --- a/cyoa.leg +++ b/cyoa.leg @@ -1,8 +1,9 @@ %{ - -#include -#include -#include + +#include +#include +#include +#include typedef struct page_t page_t; typedef struct footer_t footer_t; @@ -110,7 +111,7 @@ TextLine = < (!Newline .)* Newline > { $$.string = strndup(yytext, yyleng); Footer = Ending { $$.page = emit_ending(); } | g:Goto { $$.page = emit_goto(g.string); } - | c:ChoiceList { $$.page = emit_choices(c.choices); } + | c:ChoiceList { $$.page = emit_choices(); } ; Goto = 'GOTO' Spacing < i:Identifier > Newline