diff options
-rw-r--r-- | BisonMacros.cmake | 4 | ||||
-rw-r--r-- | src/CMakeLists.txt | 14 | ||||
-rw-r--r-- | src/evaluator.cpp | 2 | ||||
-rw-r--r-- | src/lexer.ll | 2 | ||||
-rw-r--r-- | src/mainwindow.cpp | 2 | ||||
-rw-r--r-- | src/parser.yy | 4 |
6 files changed, 15 insertions, 13 deletions
diff --git a/BisonMacros.cmake b/BisonMacros.cmake index d6dcb19..b509e88 100644 --- a/BisonMacros.cmake +++ b/BisonMacros.cmake @@ -82,8 +82,8 @@ MACRO(GENERATE_BISON_FLEX_SOURCES parser parser_args lexer lexer_args) GET_FILENAME_COMPONENT(parser_base "${parser}" NAME_WE) - SET(BISON_TAB_C "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.c") - SET(BISON_TAB_H "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.h") + SET(BISON_TAB_C "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.cc") + SET(BISON_TAB_H "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.hh") SET(BISON_CC "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.cc") SET(BISON_H "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.h") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4420ffb..9802b55 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,23 +30,25 @@ install( FILES abakusui.rc DESTINATION ${DATA_INSTALL_DIR} ) ##### abakus (executable) ####################### -GENERATE_BISON_FLEX_SOURCES("lexer.ll", "", "parser.yy", "-d") +GENERATE_BISON_FLEX_SOURCES(${CMAKE_SOURCE_DIR}/src/parser.yy "" ${CMAKE_SOURCE_DIR}/src/lexer.ll "") if( HAVE_MPFR ) - set( MPFR_SOURCES "hmath.cpp number.c" ) + set( MPFR_SOURCES "" ) set( MPFR_LIBRARIES "mpfr gmp" ) +else( HAVE_MPFR ) + set( MPFR_SOURCES hmath.cpp number.c ) + set( MPFR_LIBRARIES "" ) endif( HAVE_MPFR ) tde_add_executable( abakus AUTOMOC SOURCES abakus.cpp abakuslistview.cpp dragsupport.cpp editor.cpp evaluator.cpp function.cpp - lexer_lex.cpp mainwindow.cpp - node.cpp numerictypes.cpp - parser_yacc.cpp result.cpp + mainwindow.cpp node.cpp + numerictypes.cpp result.cpp resultlistview.cpp resultlistviewtext.cpp rpnmuncher.cpp valuemanager.cpp dcopIface.skel - ${MPFR_SOURCES} + ${BF_SOURCES} ${MPFR_SOURCES} LINK kio-shared kdecore-shared kdeprint-shared kdeui-shared DCOP-shared ${MPFR_LIBRARIES} DESTINATION ${BIN_INSTALL_DIR} ) diff --git a/src/evaluator.cpp b/src/evaluator.cpp index 71998cf..0bea1f3 100644 --- a/src/evaluator.cpp +++ b/src/evaluator.cpp @@ -22,7 +22,7 @@ #include "evaluator.h" #include "function.h" #include "node.h" // For parser_yacc.hpp below -#include "parser_yacc.hpp" +#include "parser.h" #include <tqapplication.h> #include <tqmap.h> diff --git a/src/lexer.ll b/src/lexer.ll index f83b142..5e7d049 100644 --- a/src/lexer.ll +++ b/src/lexer.ll @@ -24,7 +24,7 @@ #include "node.h" #include "function.h" -#include "parser_yacc.hpp" +#include "parser.h" #include "result.h" int yyCurTokenPos; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 764c2aa..613f513 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -419,7 +419,7 @@ void MainWindow::loadConfig() TQStringList fnList = config.readListEntry("FunctionList"); for(TQStringList::ConstIterator it = fnList.begin(); it != fnList.end(); ++it) - parseString(*it); // Run the function definitions through the parser + parseString((*it).ascii()); // Run the function definitions through the parser } populateListViews(); diff --git a/src/parser.yy b/src/parser.yy index 4410843..b24dafb 100644 --- a/src/parser.yy +++ b/src/parser.yy @@ -148,7 +148,7 @@ S: SET FUNC ASSIGN EXP { if(manager->isFunction(funcName)) manager->removeFunction(funcName); - BaseFunction *newFn = new UserDefinedFunction(funcName, $4); + BaseFunction *newFn = new UserDefinedFunction(funcName.ascii(), $4); if(!manager->addFunction(newFn, ident)) { TQString s(i18n("Unable to define function %1 because it is recursive.").tqarg(funcName)); Result::setLastResult(s); @@ -170,7 +170,7 @@ S: SET IDENT ASSIGN EXP { // No need to check if the function is already defined, because the // lexer checked for us before returning the IDENT token. - BaseFunction *newFn = new UserDefinedFunction(funcName, $4); + BaseFunction *newFn = new UserDefinedFunction(funcName.ascii(), $4); FunctionManager::instance()->addFunction(newFn, ident); Result::setLastResult(Result::Null); |