Skip to content

Commit

Permalink
Merge pull request #525 from sdmx-twg/vpinna80-patch-1
Browse files Browse the repository at this point in the history
Fix several bugs in the grammar
  • Loading branch information
FranckCo authored Dec 16, 2024
2 parents 2f1c895 + 890bb39 commit 3e7e0ca
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions v2.1/src/main/antlr4/org/sdmx/vtl/Vtl.g4
Original file line number Diff line number Diff line change
Expand Up @@ -233,16 +233,16 @@ timeOperatorsComponent:
| TIMESHIFT LPAREN exprComponent COMMA signedInteger RPAREN # timeShiftAtomComponent
| TIME_AGG LPAREN periodIndTo=STRING_CONSTANT (COMMA periodIndFrom=(STRING_CONSTANT| OPTIONAL ))? (COMMA op=optionalExprComponent)? (COMMA delim=(FIRST|LAST))? RPAREN # timeAggAtomComponent
| CURRENT_DATE LPAREN RPAREN # currentDateAtomComponent
| DATEDIFF LPAREN dateFrom=expr COMMA dateTo=expr RPAREN # dateDiffAtomComponent
| DATEADD LPAREN op=expr COMMA shiftNumber=expr COMMA periodInd=expr RPAREN # dateAddAtomComponent
| YEAR_OP LPAREN expr RPAREN # yearAtomComponent
| MONTH_OP LPAREN expr RPAREN # monthAtomComponent
| DAYOFMONTH LPAREN expr RPAREN # dayOfMonthAtomComponent
| DAYOFYEAR LPAREN expr RPAREN # datOfYearAtomComponent
| DAYTOYEAR LPAREN expr RPAREN # dayToYearAtomComponent
| DAYTOMONTH LPAREN expr RPAREN # dayToMonthAtomComponent
| YEARTODAY LPAREN expr RPAREN # yearTodayAtomComponent
| MONTHTODAY LPAREN expr RPAREN # monthTodayAtomComponent
| DATEDIFF LPAREN dateFrom=exprComponent COMMA dateTo=expr RPAREN # dateDiffAtomComponent
| DATEADD LPAREN op=exprComponent COMMA shiftNumber=exprComponent COMMA periodInd=exprComponent RPAREN # dateAddAtomComponent
| YEAR_OP LPAREN exprComponent RPAREN # yearAtomComponent
| MONTH_OP LPAREN exprComponent RPAREN # monthAtomComponent
| DAYOFMONTH LPAREN exprComponent RPAREN # dayOfMonthAtomComponent
| DAYOFYEAR LPAREN exprComponent RPAREN # datOfYearAtomComponent
| DAYTOYEAR LPAREN exprComponent RPAREN # dayToYearAtomComponent
| DAYTOMONTH LPAREN exprComponent RPAREN # dayToMonthAtomComponent
| YEARTODAY LPAREN exprComponent RPAREN # yearTodayAtomComponent
| MONTHTODAY LPAREN exprComponent RPAREN # monthTodayAtomComponent
;

setOperators:
Expand Down Expand Up @@ -433,7 +433,7 @@ limitClauseItem:
/* ------------------------------------------------------------ GROUPING CLAUSE ------------------------------------*/
groupingClause:
GROUP op=(BY | EXCEPT) componentID (COMMA componentID)* ( TIME_AGG LPAREN STRING_CONSTANT (COMMA delim=(FIRST|LAST))? RPAREN )? # groupByOrExcept
| GROUP ALL exprComponent ( TIME_AGG LPAREN STRING_CONSTANT RPAREN )? # groupAll
| GROUP ALL ( TIME_AGG LPAREN STRING_CONSTANT RPAREN )? # groupAll
;

havingClause:
Expand Down

0 comments on commit 3e7e0ca

Please sign in to comment.