From 6052f7efee89006921b4ceb1182654526dd67f37 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 25 Oct 2020 13:23:34 +0200 Subject: Add genie project for the bison demo --- demo/bison/calc/genie.lua | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 demo/bison/calc/genie.lua (limited to 'demo') diff --git a/demo/bison/calc/genie.lua b/demo/bison/calc/genie.lua new file mode 100644 index 0000000..62af249 --- /dev/null +++ b/demo/bison/calc/genie.lua @@ -0,0 +1,38 @@ +solution 'BisonDemos' + configurations {'debug', 'release'} + flags { + 'Cpp14', + 'Symbols', + } + configuration '*' + + local root = 'build/' + + + configuration 'debug' + targetdir(root .. 'bin/debug') + objdir(root .. 'obj/debug') + + configuration 'release' + targetdir(root .. 'bin/release') + objdir(root .. 'obj/release') + flags 'OptimizeSpeed' + configuration '*' + + project 'Calc' + kind 'ConsoleApp' + language 'C' + uuid(os.uuid('Calc')) + files { + 'lex.yy.c', + 'parser.tab.c', + } + project 'DebugCalc' + kind 'ConsoleApp' + language 'C' + uuid(os.uuid('DebugCalc')) + defines 'YYDEBUG=1' + files { + 'lex.yy.c', + 'parser.tab.c', + } -- cgit v1.3.1-26-gb76a From d8cfd3b88c7c2f3e8c3811379d56658660a41912 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Sun, 25 Oct 2020 13:24:22 +0200 Subject: Fix bison demo build --- demo/bison/calc/lex.yy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demo') diff --git a/demo/bison/calc/lex.yy.c b/demo/bison/calc/lex.yy.c index 452fff5..8c0e8b8 100644 --- a/demo/bison/calc/lex.yy.c +++ b/demo/bison/calc/lex.yy.c @@ -1371,7 +1371,7 @@ static void yy_load_buffer_state (void) b->yy_bs_column = 0; } - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + b->yy_is_interactive = 0;//file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } -- cgit v1.3.1-26-gb76a From caa0952182984f866061a9e45cb55a06d3da5e87 Mon Sep 17 00:00:00 2001 From: Dimitar Trendafilov Date: Mon, 26 Oct 2020 20:55:09 +0200 Subject: Make the parser debuggability optional --- demo/bison/calc/parser.tab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'demo') diff --git a/demo/bison/calc/parser.tab.c b/demo/bison/calc/parser.tab.c index 2395da5..b3cfa78 100644 --- a/demo/bison/calc/parser.tab.c +++ b/demo/bison/calc/parser.tab.c @@ -67,7 +67,7 @@ #include int yylex(); int yyerror(const char* error); -#define YYDEBUG 1 + #line 73 "parser.tab.c" /* yacc.c:339 */ -- cgit v1.3.1-26-gb76a