diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/editor.cpp | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c27a931..36a4204 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -21,6 +21,7 @@ link_directories( ${TQT_LIBRARY_DIRS} ) +include( ${CMAKE_SOURCE_DIR}/BisonMacros.cmake ) ##### other data ################################ @@ -29,6 +30,8 @@ install( FILES abakusui.rc DESTINATION ${DATA_INSTALL_DIR} ) ##### abakus (executable) ####################### +GENERATE_BISON_FLEX_SOURCES("lexer.ll", "", "parser.yy", "-d") + if( HAVE_MPFR ) set( MPFR_SOURCES "hmath.cpp number.c" ) set( MPFR_LIBRARIES "mpfr gmp" ) diff --git a/src/editor.cpp b/src/editor.cpp index f4a4276..470198b 100644 --- a/src/editor.cpp +++ b/src/editor.cpp @@ -184,7 +184,12 @@ int EditorHighlighter::highlightParagraph ( const TQString & text, int ) case Token::Identifier: { color = editor->highlightColor( Editor::Variable ); +#ifndef QT_NO_STL if( binary_search( fnames.constBegin(), fnames.constEnd(), text) ) { +#else // QT_NO_STL + #warning "Not using STL libraries; performance may be degraded..." + if( fnames.find( text) != fnames.end()) { +#endif // QT_NO_STL color = editor->highlightColor( Editor::FunctionName ); } } |