Use a c++ compiler

This commit is contained in:
Dane Johnson 2021-12-17 15:47:46 -06:00
parent a8155e885f
commit d7acfd8c8e
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
CC = gcc
CC = g++
CFLAGS = -g
all: cyoa

View File

@ -1,8 +1,9 @@
%{
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cassert>
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