Skip to content

Commit

Permalink
Fixed CASE-WHEN syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
vpinna80 authored Oct 17, 2024
1 parent 34079fc commit f88e349
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion v2.1/src/main/antlr4/org/sdmx/vtl/Vtl.g4
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ expr:
| left=expr op=AND right=expr # booleanExpr
| left=expr op=(OR|XOR) right=expr # booleanExpr
| IF conditionalExpr=expr THEN thenExpr=expr ELSE elseExpr=expr # ifExpr
| CASE WHEN whenExpr=expr THEN thenExpr=expr (WHEN whenExpr=expr THEN thenExpr=expr)* ELSE elseExpr=expr # caseExpr
| CASE WHEN (condExpr=expr THEN thenExpr=expr)+ ELSE elseExpr=expr # caseExpr
| constant # constantExpr
| varID # varIdExpr

Expand All @@ -45,6 +45,7 @@ exprComponent:
| left=exprComponent op=AND right=exprComponent # booleanExprComp
| left=exprComponent op=(OR|XOR) right=exprComponent # booleanExprComp
| IF conditionalExpr=exprComponent THEN thenExpr=exprComponent ELSE elseExpr=exprComponent # ifExprComp
| CASE WHEN (condExpr=exprComponent THEN thenExpr=exprComponent)+ ELSE elseExpr=exprComponent # caseExprComp
| constant # constantExprComp
| componentID # compId
;
Expand Down

0 comments on commit f88e349

Please sign in to comment.