Skip to content

Commit

Permalink
[FEATURE] new QgsExpression class that replaces QgsSearchString
Browse files Browse the repository at this point in the history
The new class fixes various flaws in search strings:
- fixed and simplified grammar in parser
- simplified lexer
- only one evaluation routine (instead of separate getValue/checkAgainst)
- SQL compliant three-value logic (true, false, unknown)
- correct error handling
- easily extensible list of functions, saner evaluation of expressions
- tests included
  • Loading branch information
wonder-sk committed Aug 7, 2011
1 parent 0053426 commit 4d0e59c
Show file tree
Hide file tree
Showing 7 changed files with 2,025 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/CMakeLists.txt
Expand Up @@ -53,6 +53,7 @@ SET(QGIS_CORE_SRCS
qgsdiagram.cpp
qgsdiagramrendererv2.cpp
qgsdistancearea.cpp
qgsexpression.cpp
qgsfeature.cpp
qgsfield.cpp
qgsgeometry.cpp
Expand Down Expand Up @@ -216,9 +217,9 @@ IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(BEFORE spatialite/headers/spatialite)
ENDIF (WITH_INTERNAL_SPATIALITE)

ADD_FLEX_FILES(QGIS_CORE_SRCS qgssearchstringlexer.ll)
ADD_FLEX_FILES(QGIS_CORE_SRCS qgssearchstringlexer.ll qgsexpressionlexer.ll)

ADD_BISON_FILES(QGIS_CORE_SRCS qgssearchstringparser.yy)
ADD_BISON_FILES(QGIS_CORE_SRCS qgssearchstringparser.yy qgsexpressionparser.yy)

SET(QGIS_CORE_MOC_HDRS
qgsapplication.h
Expand Down Expand Up @@ -286,6 +287,7 @@ SET(QGIS_CORE_HDRS
qgsdistancearea.h
qgscsexception.h
qgsexception.h
qgsexpression.h
qgsfeature.h
qgsfield.h
qgsgeometry.h
Expand Down

0 comments on commit 4d0e59c

Please sign in to comment.