Browse Source

Fix FTBFS

tags/r14.0.0
Timothy Pearson 7 years ago
parent
commit
2c82d91b8c
6 changed files with 15 additions and 13 deletions
  1. 2
    2
      BisonMacros.cmake
  2. 8
    6
      src/CMakeLists.txt
  3. 1
    1
      src/evaluator.cpp
  4. 1
    1
      src/lexer.ll
  5. 1
    1
      src/mainwindow.cpp
  6. 2
    2
      src/parser.yy

+ 2
- 2
BisonMacros.cmake View File

@@ -82,8 +82,8 @@ MACRO(GENERATE_BISON_FLEX_SOURCES parser parser_args
82 82
                                   lexer  lexer_args)
83 83
   GET_FILENAME_COMPONENT(parser_base "${parser}" NAME_WE)
84 84
 
85
-  SET(BISON_TAB_C "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.c")
86
-  SET(BISON_TAB_H "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.h")
85
+  SET(BISON_TAB_C "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.cc")
86
+  SET(BISON_TAB_H "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.tab.hh")
87 87
   SET(BISON_CC    "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.cc")
88 88
   SET(BISON_H     "${CMAKE_CURRENT_BINARY_DIR}/${parser_base}.h")
89 89
 

+ 8
- 6
src/CMakeLists.txt View File

@@ -30,23 +30,25 @@ install( FILES abakusui.rc DESTINATION ${DATA_INSTALL_DIR} )
30 30
 
31 31
 ##### abakus (executable) #######################
32 32
 
33
-GENERATE_BISON_FLEX_SOURCES("lexer.ll", "", "parser.yy", "-d")
33
+GENERATE_BISON_FLEX_SOURCES(${CMAKE_SOURCE_DIR}/src/parser.yy "" ${CMAKE_SOURCE_DIR}/src/lexer.ll "")
34 34
 
35 35
 if( HAVE_MPFR )
36
-  set( MPFR_SOURCES "hmath.cpp number.c" )
36
+  set( MPFR_SOURCES "" )
37 37
   set( MPFR_LIBRARIES "mpfr gmp" )
38
+else( HAVE_MPFR )
39
+  set( MPFR_SOURCES hmath.cpp number.c )
40
+  set( MPFR_LIBRARIES "" )
38 41
 endif( HAVE_MPFR )
39 42
 
40 43
 tde_add_executable( abakus AUTOMOC
41 44
   SOURCES abakus.cpp abakuslistview.cpp
42 45
     dragsupport.cpp editor.cpp
43 46
     evaluator.cpp function.cpp
44
-    lexer_lex.cpp mainwindow.cpp
45
-    node.cpp numerictypes.cpp
46
-    parser_yacc.cpp result.cpp
47
+    mainwindow.cpp node.cpp
48
+    numerictypes.cpp result.cpp
47 49
     resultlistview.cpp resultlistviewtext.cpp
48 50
     rpnmuncher.cpp valuemanager.cpp dcopIface.skel
49
-    ${MPFR_SOURCES}
51
+    ${BF_SOURCES} ${MPFR_SOURCES}
50 52
   LINK kio-shared tdecore-shared tdeprint-shared tdeui-shared DCOP-shared ${MPFR_LIBRARIES}
51 53
   DESTINATION ${BIN_INSTALL_DIR}
52 54
 )

+ 1
- 1
src/evaluator.cpp View File

@@ -22,7 +22,7 @@
22 22
 #include "evaluator.h"
23 23
 #include "function.h"
24 24
 #include "node.h" // For parser_yacc.hpp below
25
-#include "parser_yacc.hpp"
25
+#include "parser.h"
26 26
 
27 27
 #include <tqapplication.h>
28 28
 #include <tqmap.h>

+ 1
- 1
src/lexer.ll View File

@@ -24,7 +24,7 @@
24 24
 
25 25
 #include "node.h"
26 26
 #include "function.h"
27
-#include "parser_yacc.hpp"
27
+#include "parser.h"
28 28
 #include "result.h"
29 29
 
30 30
 int yyCurTokenPos;

+ 1
- 1
src/mainwindow.cpp View File

@@ -419,7 +419,7 @@ void MainWindow::loadConfig()
419 419
 
420 420
         TQStringList fnList = config.readListEntry("FunctionList");
421 421
         for(TQStringList::ConstIterator it = fnList.begin(); it != fnList.end(); ++it)
422
-            parseString(*it); // Run the function definitions through the parser
422
+            parseString((*it).ascii()); // Run the function definitions through the parser
423 423
     }
424 424
 
425 425
     populateListViews();

+ 2
- 2
src/parser.yy View File

@@ -148,7 +148,7 @@ S: SET FUNC ASSIGN EXP {
148 148
     if(manager->isFunction(funcName))
149 149
 	manager->removeFunction(funcName);
150 150
 
151
-    BaseFunction *newFn = new UserDefinedFunction(funcName, $4);
151
+    BaseFunction *newFn = new UserDefinedFunction(funcName.ascii(), $4);
152 152
     if(!manager->addFunction(newFn, ident)) {
153 153
 	TQString s(i18n("Unable to define function %1 because it is recursive.").tqarg(funcName));
154 154
 	Result::setLastResult(s);
@@ -170,7 +170,7 @@ S: SET IDENT ASSIGN EXP {
170 170
 
171 171
     // No need to check if the function is already defined, because the
172 172
     // lexer checked for us before returning the IDENT token.
173
-    BaseFunction *newFn = new UserDefinedFunction(funcName, $4);
173
+    BaseFunction *newFn = new UserDefinedFunction(funcName.ascii(), $4);
174 174
     FunctionManager::instance()->addFunction(newFn, ident);
175 175
 
176 176
     Result::setLastResult(Result::Null);

Loading…
Cancel
Save