diff --git a/LangS.l b/LangS.l index 10b3ce6..5d942bb 100644 --- a/LangS.l +++ b/LangS.l @@ -7,7 +7,7 @@ #define YYSTYPE ParseTree::Node* #include "ParseTree.h" -#include "LangS.tab.hpp" +#include "LangS.tab.h" void yyerror(std::string s); diff --git a/LangS.ypp b/LangS.y similarity index 100% rename from LangS.ypp rename to LangS.y diff --git a/wscript b/wscript index 16b676d..ffabe90 100644 --- a/wscript +++ b/wscript @@ -2,14 +2,8 @@ def options(ctx): ctx.load('compiler_cxx') def configure(ctx): - ctx.load('compiler_cxx') - ctx.find_program('flex', var='FLEX') - ctx.find_program('bison', var='BISON') + ctx.load('compiler_cxx flex bison') def build(bld): - sources = bld.path.ant_glob('*.cpp') + ['LangS.tab.cpp', 'LangS.yy.cpp' ] - bld(rule = '${FLEX} -o ${TGT} ${SRC}', source= 'LangS.l', target = 'LangS.yy.cpp') - bld(rule = '${BISON} -d ${SRC}', source= 'LangS.ypp', target = ['LangS.tab.cpp','LangS.tab.hpp']) + sources = bld.path.ant_glob('*.cpp') + ['LangS.l', 'LangS.y' ] langs = bld(features='c cxx cxxprogram', source=sources, target='LangS', includes='.') - -