Skip to content

Commit

Permalink
define operator precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
unitmatrix committed Sep 14, 2024
1 parent db27a84 commit 255ec3c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/stream_processor/parser/sql.y
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
%name-prefix="flb_sp_" // replace with %define api.prefix {flb_sp_}
%define api.pure full
%name-prefix "flb_sp_" // replace with %define api.prefix {flb_sp_}
%define parse.error verbose
%parse-param { struct flb_sp_cmd *cmd };
%parse-param { const char *query };
Expand Down Expand Up @@ -98,6 +97,10 @@ void yyerror(struct flb_sp_cmd *cmd, const char *query, void *scanner, const cha
%type <integer> aggregate_func
%type <integer> COUNT AVG SUM MAX MIN TIMESERIES_FORECAST

/* Define operator precedence and associativity for logical operations in conditions */
%right NOT // Highest precedence for NOT
%left OR // Lowest precedence for OR
%left AND // Middle precedence for AND

%destructor { flb_free ($$); } IDENTIFIER

Expand Down

0 comments on commit 255ec3c

Please sign in to comment.