Skip to content

Commit

Permalink
use FLEX/BISON FILES_PREFIX
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored and nyalldawson committed Aug 11, 2019
1 parent 03c0d69 commit 799aafb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
8 changes: 5 additions & 3 deletions src/core/CMakeLists.txt
Expand Up @@ -608,8 +608,10 @@ IF (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)
)
ENDIF (QT_MOBILITY_LOCATION_FOUND OR Qt5Positioning_FOUND)

ADD_FLEX_FILES(QGIS_CORE_SRCS qgsexpressionlexer.ll qgssqlstatementlexer.ll)
ADD_BISON_FILES(QGIS_CORE_SRCS qgsexpressionparser.yy qgssqlstatementparser.yy)
ADD_FLEX_FILES_PREFIX(QGIS_CORE_SRCS exp_ qgsexpressionlexer.ll)
ADD_FLEX_FILES_PREFIX(QGIS_CORE_SRCS sqlstatement_ qgssqlstatementlexer.ll)
ADD_BISON_FILES_PREFIX(QGIS_CORE_SRCS exp_ qgsexpressionparser.yy)
ADD_BISON_FILES_PREFIX(QGIS_CORE_SRCS sqlstatement_ qgssqlstatementparser.yy)

IF(NOT MSVC)
SET_SOURCE_FILES_PROPERTIES(qgsexpressionparser.cpp qgssqlstatementparser.cpp PROPERTIES COMPILE_FLAGS -w)
Expand Down Expand Up @@ -1020,7 +1022,7 @@ SET(QGIS_CORE_HDRS
qgstilecache.h
qgstracer.h
qgstranslationcontext.h
qobjectuniqueptr.h
qobjectuniqueptr.h

qgsvectordataprovider.h
qgsvectorlayercache.h
Expand Down
2 changes: 0 additions & 2 deletions src/core/qgsexpressionparser.yy
Expand Up @@ -90,8 +90,6 @@ void addParserLocation(YYLTYPE* yyloc, QgsExpressionNode *node)
%lex-param {void * scanner}
%parse-param {expression_parser_context* parser_ctx}

%define api.prefix {exp_}

%union
{
QgsExpressionNode* node;
Expand Down
10 changes: 4 additions & 6 deletions src/core/qgssqlstatementparser.yy
Expand Up @@ -87,8 +87,6 @@ struct sqlstatement_parser_context
%lex-param {void * scanner}
%parse-param {sqlstatement_parser_context* parser_ctx}

%define api.prefix {sqlstatement_}

%union
{
QgsSQLStatement::Node* node;
Expand Down Expand Up @@ -376,7 +374,7 @@ selected_column:
delete $1;
QgsSQLStatement::NodeList* nodeList = new QgsSQLStatement::NodeList();
nodeList->append( new QgsSQLStatement::NodeColumnRef("*", true) );
$$ = new QgsSQLStatement::NodeSelectedColumn(
$$ = new QgsSQLStatement::NodeSelectedColumn(
new QgsSQLStatement::NodeFunction( "COUNT", nodeList) );
}

Expand All @@ -393,7 +391,7 @@ selected_column:
delete $1;
QgsSQLStatement::NodeList* nodeList = new QgsSQLStatement::NodeList();
nodeList->append( new QgsSQLStatement::NodeColumnRef("*", true) );
$$ = new QgsSQLStatement::NodeSelectedColumn(
$$ = new QgsSQLStatement::NodeSelectedColumn(
new QgsSQLStatement::NodeFunction( "COUNT", nodeList) );
$$->setAlias(*$5);
delete $5;
Expand All @@ -414,7 +412,7 @@ selected_column:
QgsSQLStatement::NodeList* nodeList = new QgsSQLStatement::NodeList();
$4->setDistinct();
nodeList->append( $4 );
$$ = new QgsSQLStatement::NodeSelectedColumn(
$$ = new QgsSQLStatement::NodeSelectedColumn(
new QgsSQLStatement::NodeFunction( "COUNT", nodeList) );
}

Expand All @@ -434,7 +432,7 @@ selected_column:
QgsSQLStatement::NodeList* nodeList = new QgsSQLStatement::NodeList();
$4->setDistinct();
nodeList->append( $4 );
$$ = new QgsSQLStatement::NodeSelectedColumn(
$$ = new QgsSQLStatement::NodeSelectedColumn(
new QgsSQLStatement::NodeFunction( "COUNT", nodeList) );
$$->setAlias(*$6);
delete $6;
Expand Down

0 comments on commit 799aafb

Please sign in to comment.