@finos/legend-application-repl 0.0.27 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/grammar/datacube_filter__lexer.g4 +40 -0
- package/grammar/datacube_filter__parser.g4 +14 -0
- package/grammar/generateGrammar.js +43 -0
- package/grammar/parser/generated/datacube_filter__lexer.interp +59 -0
- package/grammar/parser/generated/datacube_filter__lexer.tokens +14 -0
- package/grammar/parser/generated/datacube_filter__lexer.ts +142 -0
- package/grammar/parser/generated/datacube_filter__parser.interp +38 -0
- package/grammar/parser/generated/datacube_filter__parser.tokens +14 -0
- package/grammar/parser/generated/datacube_filter__parser.ts +514 -0
- package/grammar/parser/parser.ts +55 -0
- package/lib/components/Core_LegendREPLApplicationPlugin.d.ts.map +1 -1
- package/lib/components/Core_LegendREPLApplicationPlugin.js +0 -7
- package/lib/components/Core_LegendREPLApplicationPlugin.js.map +1 -1
- package/lib/components/LegendREPLApplication.d.ts +0 -1
- package/lib/components/LegendREPLApplication.d.ts.map +1 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts +0 -1
- package/lib/components/LegendREPLFrameworkProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.d.ts +1 -1
- package/lib/components/REPLStoreProvider.d.ts.map +1 -1
- package/lib/components/REPLStoreProvider.js +1 -1
- package/lib/components/REPLStoreProvider.js.map +1 -1
- package/lib/components/dataCube/DataCube.d.ts.map +1 -1
- package/lib/components/dataCube/DataCube.js +15 -4
- package/lib/components/dataCube/DataCube.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts +2 -4
- package/lib/components/dataCube/editor/DataCubeEditor.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditor.js +109 -32
- package/lib/components/dataCube/editor/DataCubeEditor.js.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.d.ts.map +1 -1
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js +178 -104
- package/lib/components/dataCube/editor/DataCubeEditorCodePanel.js.map +1 -1
- package/lib/components/dataCube/editor/{DataCubeEditorSortPanel.d.ts → DataCubeEditorColumnPropertiesPanel.d.ts} +2 -5
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.d.ts +22 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js +230 -0
- package/lib/components/dataCube/editor/DataCubeEditorColumnsSelector.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorFilterPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorHPivotsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js +26 -0
- package/lib/components/dataCube/editor/DataCubeEditorSortsPanel.js.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.d.ts +19 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.d.ts.map +1 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js +27 -0
- package/lib/components/dataCube/editor/DataCubeEditorVPivotsPanel.js.map +1 -0
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts +1 -4
- package/lib/components/dataCube/grid/DataCubeGrid.d.ts.map +1 -1
- package/lib/components/dataCube/grid/DataCubeGrid.js +75 -30
- package/lib/components/dataCube/grid/DataCubeGrid.js.map +1 -1
- package/lib/grammar/generated/datacube_filter__lexer.d.ts +31 -0
- package/lib/grammar/generated/datacube_filter__lexer.js +118 -0
- package/lib/grammar/generated/datacube_filter__parser.d.ts +91 -0
- package/lib/grammar/generated/datacube_filter__parser.js +485 -0
- package/lib/grammar/parser.d.ts +16 -0
- package/lib/grammar/parser.js +39 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +9 -6
- package/lib/server/REPLServerClient.d.ts +2 -3
- package/lib/server/REPLServerClient.d.ts.map +1 -1
- package/lib/server/models/DataCubeEngineModels.d.ts +8 -1
- package/lib/server/models/DataCubeEngineModels.d.ts.map +1 -1
- package/lib/server/models/DataCubeEngineModels.js +13 -0
- package/lib/server/models/DataCubeEngineModels.js.map +1 -1
- package/lib/stores/dataCube/DataCubeDefaultConfig.d.ts +17 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.d.ts.map +1 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.js +17 -0
- package/lib/stores/dataCube/DataCubeDefaultConfig.js.map +1 -0
- package/lib/stores/dataCube/DataCubeState.d.ts +6 -6
- package/lib/stores/dataCube/DataCubeState.d.ts.map +1 -1
- package/lib/stores/dataCube/DataCubeState.js +18 -14
- package/lib/stores/dataCube/DataCubeState.js.map +1 -1
- package/lib/stores/dataCube/{DataCubeStore.d.ts → REPLStore.d.ts} +1 -1
- package/lib/stores/dataCube/REPLStore.d.ts.map +1 -0
- package/lib/stores/dataCube/{DataCubeStore.js → REPLStore.js} +1 -1
- package/lib/stores/dataCube/REPLStore.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts +29 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.js +46 -0
- package/lib/stores/dataCube/core/DataCubeCoreState.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts +2 -3
- package/lib/stores/dataCube/core/DataCubeEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeEngine.js +2 -3
- package/lib/stores/dataCube/core/DataCubeEngine.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts +27 -3
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js +210 -278
- package/lib/stores/dataCube/core/DataCubeQueryBuilder.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts +72 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js +67 -0
- package/lib/stores/dataCube/core/DataCubeQueryEngine.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts +73 -38
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js +101 -40
- package/lib/stores/dataCube/core/DataCubeQuerySnapshot.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts +32 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js +232 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts +8 -2
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js +20 -5
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotManager.js.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts +8 -3
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.d.ts.map +1 -1
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js +8 -4
- package/lib/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.js.map +1 -1
- package/lib/stores/dataCube/editor/{DataCubeEditorCodeState.d.ts → DataCubeEditorCodePanelState.d.ts} +6 -5
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorCodeState.js → DataCubeEditorCodePanelState.js} +7 -7
- package/lib/stores/dataCube/editor/DataCubeEditorCodePanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.d.ts +30 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js +51 -0
- package/lib/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts +29 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.js +63 -0
- package/lib/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.d.ts → DataCubeEditorPanelState.d.ts} +2 -2
- package/lib/stores/dataCube/editor/DataCubeEditorPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.js → DataCubeEditorPanelState.js} +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts +34 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js +67 -0
- package/lib/stores/dataCube/editor/DataCubeEditorSortsPanelState.js.map +1 -0
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts +10 -7
- package/lib/stores/dataCube/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/dataCube/editor/DataCubeEditorState.js +25 -17
- package/lib/stores/dataCube/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts +13 -7
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js +87 -86
- package/lib/stores/dataCube/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts +20 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js +103 -0
- package/lib/stores/dataCube/grid/DataCubeGridQueryBuilder.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts +7 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js +121 -214
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.js.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts +25 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js +83 -0
- package/lib/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -0
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts +6 -5
- package/lib/stores/dataCube/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/dataCube/grid/DataCubeGridState.js +32 -10
- package/lib/stores/dataCube/grid/DataCubeGridState.js.map +1 -1
- package/package.json +15 -12
- package/src/components/Core_LegendREPLApplicationPlugin.tsx +0 -7
- package/src/components/REPLStoreProvider.tsx +1 -1
- package/src/components/dataCube/DataCube.tsx +51 -29
- package/src/components/dataCube/editor/DataCubeEditor.tsx +204 -95
- package/src/components/dataCube/editor/DataCubeEditorCodePanel.tsx +186 -190
- package/src/components/dataCube/editor/DataCubeEditorColumnPropertiesPanel.tsx +42 -0
- package/src/components/dataCube/editor/DataCubeEditorColumnsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorColumnsSelector.tsx +408 -0
- package/src/components/dataCube/editor/DataCubeEditorExtendedColumnsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorFilterPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorGeneralPropertiesPanel.tsx +48 -0
- package/src/components/dataCube/editor/DataCubeEditorHPivotsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorSortsPanel.tsx +41 -0
- package/src/components/dataCube/editor/DataCubeEditorVPivotsPanel.tsx +41 -0
- package/src/components/dataCube/grid/DataCubeGrid.tsx +134 -43
- package/src/server/REPLServerClient.ts +2 -2
- package/src/server/models/DataCubeEngineModels.ts +23 -1
- package/{lib/grid.css → src/stores/dataCube/DataCubeDefaultConfig.ts} +2 -2
- package/src/stores/dataCube/DataCubeState.ts +26 -20
- package/src/stores/dataCube/core/DataCubeCoreState.ts +57 -0
- package/src/stores/dataCube/core/DataCubeEngine.ts +6 -4
- package/src/stores/dataCube/core/DataCubeQueryBuilder.ts +349 -353
- package/src/stores/dataCube/core/DataCubeQueryEngine.ts +90 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshot.ts +168 -156
- package/src/stores/dataCube/core/DataCubeQuerySnapshotBuilder.ts +398 -0
- package/src/stores/dataCube/core/DataCubeQuerySnapshotManager.ts +37 -5
- package/src/stores/dataCube/core/DataCubeQuerySnapshotSubscriber.ts +13 -5
- package/src/stores/dataCube/editor/{DataCubeEditorCodeState.ts → DataCubeEditorCodePanelState.ts} +6 -6
- package/src/stores/dataCube/editor/DataCubeEditorColumnsSelectorState.ts +61 -0
- package/src/stores/dataCube/editor/DataCubeEditorGeneralPropertiesPanelState.ts +80 -0
- package/src/stores/dataCube/editor/{DataCubeEditorQuerySnapshotBuilder.ts → DataCubeEditorPanelState.ts} +1 -1
- package/src/stores/dataCube/editor/DataCubeEditorSortsPanelState.ts +116 -0
- package/src/stores/dataCube/editor/DataCubeEditorState.ts +29 -20
- package/src/stores/dataCube/grid/DataCubeGridClientEngine.ts +96 -128
- package/src/stores/dataCube/grid/DataCubeGridQueryBuilder.ts +154 -0
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.tsx +191 -0
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotBuilder.ts +127 -0
- package/src/stores/dataCube/grid/DataCubeGridState.ts +41 -14
- package/tsconfig.json +23 -9
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.d.ts.map +0 -1
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js +0 -61
- package/lib/components/dataCube/editor/DataCubeEditorSortPanel.js.map +0 -1
- package/lib/grid.css.map +0 -1
- package/lib/repl.css +0 -17
- package/lib/repl.css.map +0 -1
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts +0 -63
- package/lib/stores/dataCube/DataCubeMetaModelConst.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeMetaModelConst.js +0 -72
- package/lib/stores/dataCube/DataCubeMetaModelConst.js.map +0 -1
- package/lib/stores/dataCube/DataCubeStore.d.ts.map +0 -1
- package/lib/stores/dataCube/DataCubeStore.js.map +0 -1
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts +0 -37
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.d.ts.map +0 -1
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js +0 -269
- package/lib/stores/dataCube/core/DataCubeQueryAnalyzer.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorCodeState.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorQuerySnapshotBuilder.js.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts +0 -46
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.d.ts.map +0 -1
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js +0 -133
- package/lib/stores/dataCube/editor/DataCubeEditorSortState.js.map +0 -1
- package/src/components/dataCube/editor/DataCubeEditorSortPanel.tsx +0 -274
- package/src/stores/dataCube/DataCubeMetaModelConst.ts +0 -76
- package/src/stores/dataCube/core/DataCubeQueryAnalyzer.ts +0 -424
- package/src/stores/dataCube/editor/DataCubeEditorSortState.ts +0 -198
- package/src/stores/dataCube/grid/DataCubeGridQuerySnapshotAnalyzer.ts +0 -281
- /package/src/stores/dataCube/{DataCubeStore.ts → REPLStore.ts} +0 -0
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
// Generated from /Users/blacksteed232/Developer/legend/studio/packages/legend-application-repl/grammar/datacube_filter__parser.g4 by ANTLR 4.13.1
|
|
2
|
+
// noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
ATN,
|
|
6
|
+
ATNDeserializer, DecisionState, DFA, FailedPredicateException,
|
|
7
|
+
RecognitionException, NoViableAltException, BailErrorStrategy,
|
|
8
|
+
Parser, ParserATNSimulator,
|
|
9
|
+
RuleContext, ParserRuleContext, PredictionMode, PredictionContextCache,
|
|
10
|
+
TerminalNode, RuleNode,
|
|
11
|
+
Token, TokenStream,
|
|
12
|
+
Interval, IntervalSet
|
|
13
|
+
} from 'antlr4';
|
|
14
|
+
// for running tests with parameters, TODO: discuss strategy for typed parameters in CI
|
|
15
|
+
// eslint-disable-next-line no-unused-vars
|
|
16
|
+
type int = number;
|
|
17
|
+
|
|
18
|
+
export default class datacube_filter__parser extends Parser {
|
|
19
|
+
public static readonly OPERATOR = 1;
|
|
20
|
+
public static readonly GROUP_OPERATOR_AND = 2;
|
|
21
|
+
public static readonly GROUP_OPERATOR_OR = 3;
|
|
22
|
+
public static readonly GROUP_OPEN = 4;
|
|
23
|
+
public static readonly GROUP_CLOSE = 5;
|
|
24
|
+
public static readonly NUMBER = 6;
|
|
25
|
+
public static readonly STRING = 7;
|
|
26
|
+
public static readonly COLUMN = 8;
|
|
27
|
+
public static readonly IDENTIFIER = 9;
|
|
28
|
+
public static readonly WHITESPACE = 10;
|
|
29
|
+
public static readonly EOF = Token.EOF;
|
|
30
|
+
public static readonly RULE_filter = 0;
|
|
31
|
+
public static readonly RULE_condition = 1;
|
|
32
|
+
public static readonly RULE_column = 2;
|
|
33
|
+
public static readonly RULE_value = 3;
|
|
34
|
+
public static readonly RULE_group = 4;
|
|
35
|
+
public static readonly RULE_groupOperator = 5;
|
|
36
|
+
public static readonly RULE_groupCondition = 6;
|
|
37
|
+
public static readonly literalNames: (string | null)[] = [ null, null,
|
|
38
|
+
"'&&'", "'||'",
|
|
39
|
+
"'('", "')'" ];
|
|
40
|
+
public static readonly symbolicNames: (string | null)[] = [ null, "OPERATOR",
|
|
41
|
+
"GROUP_OPERATOR_AND",
|
|
42
|
+
"GROUP_OPERATOR_OR",
|
|
43
|
+
"GROUP_OPEN",
|
|
44
|
+
"GROUP_CLOSE",
|
|
45
|
+
"NUMBER", "STRING",
|
|
46
|
+
"COLUMN", "IDENTIFIER",
|
|
47
|
+
"WHITESPACE" ];
|
|
48
|
+
// tslint:disable:no-trailing-whitespace
|
|
49
|
+
public static readonly ruleNames: string[] = [
|
|
50
|
+
"filter", "condition", "column", "value", "group", "groupOperator", "groupCondition",
|
|
51
|
+
];
|
|
52
|
+
public get grammarFileName(): string { return "datacube_filter__parser.g4"; }
|
|
53
|
+
public get literalNames(): (string | null)[] { return datacube_filter__parser.literalNames; }
|
|
54
|
+
public get symbolicNames(): (string | null)[] { return datacube_filter__parser.symbolicNames; }
|
|
55
|
+
public get ruleNames(): string[] { return datacube_filter__parser.ruleNames; }
|
|
56
|
+
public get serializedATN(): number[] { return datacube_filter__parser._serializedATN; }
|
|
57
|
+
|
|
58
|
+
protected createFailedPredicateException(predicate?: string, message?: string): FailedPredicateException {
|
|
59
|
+
return new FailedPredicateException(this, predicate, message);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
constructor(input: TokenStream) {
|
|
63
|
+
super(input);
|
|
64
|
+
this._interp = new ParserATNSimulator(this, datacube_filter__parser._ATN, datacube_filter__parser.DecisionsToDFA, new PredictionContextCache());
|
|
65
|
+
}
|
|
66
|
+
// @RuleVersion(0)
|
|
67
|
+
public filter(): FilterContext {
|
|
68
|
+
let localctx: FilterContext = new FilterContext(this, this._ctx, this.state);
|
|
69
|
+
this.enterRule(localctx, 0, datacube_filter__parser.RULE_filter);
|
|
70
|
+
try {
|
|
71
|
+
this.enterOuterAlt(localctx, 1);
|
|
72
|
+
{
|
|
73
|
+
this.state = 16;
|
|
74
|
+
this._errHandler.sync(this);
|
|
75
|
+
switch ( this._interp.adaptivePredict(this._input, 0, this._ctx) ) {
|
|
76
|
+
case 1:
|
|
77
|
+
{
|
|
78
|
+
this.state = 14;
|
|
79
|
+
this.groupCondition();
|
|
80
|
+
}
|
|
81
|
+
break;
|
|
82
|
+
case 2:
|
|
83
|
+
{
|
|
84
|
+
this.state = 15;
|
|
85
|
+
this.group();
|
|
86
|
+
}
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
this.state = 18;
|
|
90
|
+
this.match(datacube_filter__parser.EOF);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (re) {
|
|
94
|
+
if (re instanceof RecognitionException) {
|
|
95
|
+
localctx.exception = re;
|
|
96
|
+
this._errHandler.reportError(this, re);
|
|
97
|
+
this._errHandler.recover(this, re);
|
|
98
|
+
} else {
|
|
99
|
+
throw re;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
finally {
|
|
103
|
+
this.exitRule();
|
|
104
|
+
}
|
|
105
|
+
return localctx;
|
|
106
|
+
}
|
|
107
|
+
// @RuleVersion(0)
|
|
108
|
+
public condition(): ConditionContext {
|
|
109
|
+
let localctx: ConditionContext = new ConditionContext(this, this._ctx, this.state);
|
|
110
|
+
this.enterRule(localctx, 2, datacube_filter__parser.RULE_condition);
|
|
111
|
+
let _la: number;
|
|
112
|
+
try {
|
|
113
|
+
this.enterOuterAlt(localctx, 1);
|
|
114
|
+
{
|
|
115
|
+
this.state = 20;
|
|
116
|
+
this.column();
|
|
117
|
+
this.state = 21;
|
|
118
|
+
_la = this._input.LA(1);
|
|
119
|
+
if(!(_la===1 || _la===9)) {
|
|
120
|
+
this._errHandler.recoverInline(this);
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
this._errHandler.reportMatch(this);
|
|
124
|
+
this.consume();
|
|
125
|
+
}
|
|
126
|
+
this.state = 23;
|
|
127
|
+
this._errHandler.sync(this);
|
|
128
|
+
_la = this._input.LA(1);
|
|
129
|
+
if (_la===6 || _la===7) {
|
|
130
|
+
{
|
|
131
|
+
this.state = 22;
|
|
132
|
+
this.value();
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
catch (re) {
|
|
139
|
+
if (re instanceof RecognitionException) {
|
|
140
|
+
localctx.exception = re;
|
|
141
|
+
this._errHandler.reportError(this, re);
|
|
142
|
+
this._errHandler.recover(this, re);
|
|
143
|
+
} else {
|
|
144
|
+
throw re;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
finally {
|
|
148
|
+
this.exitRule();
|
|
149
|
+
}
|
|
150
|
+
return localctx;
|
|
151
|
+
}
|
|
152
|
+
// @RuleVersion(0)
|
|
153
|
+
public column(): ColumnContext {
|
|
154
|
+
let localctx: ColumnContext = new ColumnContext(this, this._ctx, this.state);
|
|
155
|
+
this.enterRule(localctx, 4, datacube_filter__parser.RULE_column);
|
|
156
|
+
try {
|
|
157
|
+
this.enterOuterAlt(localctx, 1);
|
|
158
|
+
{
|
|
159
|
+
this.state = 25;
|
|
160
|
+
this.match(datacube_filter__parser.COLUMN);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
catch (re) {
|
|
164
|
+
if (re instanceof RecognitionException) {
|
|
165
|
+
localctx.exception = re;
|
|
166
|
+
this._errHandler.reportError(this, re);
|
|
167
|
+
this._errHandler.recover(this, re);
|
|
168
|
+
} else {
|
|
169
|
+
throw re;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
finally {
|
|
173
|
+
this.exitRule();
|
|
174
|
+
}
|
|
175
|
+
return localctx;
|
|
176
|
+
}
|
|
177
|
+
// @RuleVersion(0)
|
|
178
|
+
public value(): ValueContext {
|
|
179
|
+
let localctx: ValueContext = new ValueContext(this, this._ctx, this.state);
|
|
180
|
+
this.enterRule(localctx, 6, datacube_filter__parser.RULE_value);
|
|
181
|
+
let _la: number;
|
|
182
|
+
try {
|
|
183
|
+
this.enterOuterAlt(localctx, 1);
|
|
184
|
+
{
|
|
185
|
+
this.state = 27;
|
|
186
|
+
_la = this._input.LA(1);
|
|
187
|
+
if(!(_la===6 || _la===7)) {
|
|
188
|
+
this._errHandler.recoverInline(this);
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
this._errHandler.reportMatch(this);
|
|
192
|
+
this.consume();
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
catch (re) {
|
|
197
|
+
if (re instanceof RecognitionException) {
|
|
198
|
+
localctx.exception = re;
|
|
199
|
+
this._errHandler.reportError(this, re);
|
|
200
|
+
this._errHandler.recover(this, re);
|
|
201
|
+
} else {
|
|
202
|
+
throw re;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
finally {
|
|
206
|
+
this.exitRule();
|
|
207
|
+
}
|
|
208
|
+
return localctx;
|
|
209
|
+
}
|
|
210
|
+
// @RuleVersion(0)
|
|
211
|
+
public group(): GroupContext {
|
|
212
|
+
let localctx: GroupContext = new GroupContext(this, this._ctx, this.state);
|
|
213
|
+
this.enterRule(localctx, 8, datacube_filter__parser.RULE_group);
|
|
214
|
+
try {
|
|
215
|
+
this.enterOuterAlt(localctx, 1);
|
|
216
|
+
{
|
|
217
|
+
this.state = 29;
|
|
218
|
+
this.match(datacube_filter__parser.GROUP_OPEN);
|
|
219
|
+
this.state = 30;
|
|
220
|
+
this.groupCondition();
|
|
221
|
+
this.state = 31;
|
|
222
|
+
this.match(datacube_filter__parser.GROUP_CLOSE);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
catch (re) {
|
|
226
|
+
if (re instanceof RecognitionException) {
|
|
227
|
+
localctx.exception = re;
|
|
228
|
+
this._errHandler.reportError(this, re);
|
|
229
|
+
this._errHandler.recover(this, re);
|
|
230
|
+
} else {
|
|
231
|
+
throw re;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
finally {
|
|
235
|
+
this.exitRule();
|
|
236
|
+
}
|
|
237
|
+
return localctx;
|
|
238
|
+
}
|
|
239
|
+
// @RuleVersion(0)
|
|
240
|
+
public groupOperator(): GroupOperatorContext {
|
|
241
|
+
let localctx: GroupOperatorContext = new GroupOperatorContext(this, this._ctx, this.state);
|
|
242
|
+
this.enterRule(localctx, 10, datacube_filter__parser.RULE_groupOperator);
|
|
243
|
+
let _la: number;
|
|
244
|
+
try {
|
|
245
|
+
this.enterOuterAlt(localctx, 1);
|
|
246
|
+
{
|
|
247
|
+
this.state = 33;
|
|
248
|
+
_la = this._input.LA(1);
|
|
249
|
+
if(!(_la===2 || _la===3)) {
|
|
250
|
+
this._errHandler.recoverInline(this);
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
this._errHandler.reportMatch(this);
|
|
254
|
+
this.consume();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
catch (re) {
|
|
259
|
+
if (re instanceof RecognitionException) {
|
|
260
|
+
localctx.exception = re;
|
|
261
|
+
this._errHandler.reportError(this, re);
|
|
262
|
+
this._errHandler.recover(this, re);
|
|
263
|
+
} else {
|
|
264
|
+
throw re;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
finally {
|
|
268
|
+
this.exitRule();
|
|
269
|
+
}
|
|
270
|
+
return localctx;
|
|
271
|
+
}
|
|
272
|
+
// @RuleVersion(0)
|
|
273
|
+
public groupCondition(): GroupConditionContext {
|
|
274
|
+
let localctx: GroupConditionContext = new GroupConditionContext(this, this._ctx, this.state);
|
|
275
|
+
this.enterRule(localctx, 12, datacube_filter__parser.RULE_groupCondition);
|
|
276
|
+
let _la: number;
|
|
277
|
+
try {
|
|
278
|
+
this.enterOuterAlt(localctx, 1);
|
|
279
|
+
{
|
|
280
|
+
this.state = 37;
|
|
281
|
+
this._errHandler.sync(this);
|
|
282
|
+
switch (this._input.LA(1)) {
|
|
283
|
+
case 8:
|
|
284
|
+
{
|
|
285
|
+
this.state = 35;
|
|
286
|
+
this.condition();
|
|
287
|
+
}
|
|
288
|
+
break;
|
|
289
|
+
case 4:
|
|
290
|
+
{
|
|
291
|
+
this.state = 36;
|
|
292
|
+
this.group();
|
|
293
|
+
}
|
|
294
|
+
break;
|
|
295
|
+
default:
|
|
296
|
+
throw new NoViableAltException(this);
|
|
297
|
+
}
|
|
298
|
+
this.state = 46;
|
|
299
|
+
this._errHandler.sync(this);
|
|
300
|
+
_la = this._input.LA(1);
|
|
301
|
+
while (_la===2 || _la===3) {
|
|
302
|
+
{
|
|
303
|
+
{
|
|
304
|
+
this.state = 39;
|
|
305
|
+
this.groupOperator();
|
|
306
|
+
this.state = 42;
|
|
307
|
+
this._errHandler.sync(this);
|
|
308
|
+
switch (this._input.LA(1)) {
|
|
309
|
+
case 8:
|
|
310
|
+
{
|
|
311
|
+
this.state = 40;
|
|
312
|
+
this.condition();
|
|
313
|
+
}
|
|
314
|
+
break;
|
|
315
|
+
case 4:
|
|
316
|
+
{
|
|
317
|
+
this.state = 41;
|
|
318
|
+
this.group();
|
|
319
|
+
}
|
|
320
|
+
break;
|
|
321
|
+
default:
|
|
322
|
+
throw new NoViableAltException(this);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
this.state = 48;
|
|
327
|
+
this._errHandler.sync(this);
|
|
328
|
+
_la = this._input.LA(1);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
catch (re) {
|
|
333
|
+
if (re instanceof RecognitionException) {
|
|
334
|
+
localctx.exception = re;
|
|
335
|
+
this._errHandler.reportError(this, re);
|
|
336
|
+
this._errHandler.recover(this, re);
|
|
337
|
+
} else {
|
|
338
|
+
throw re;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
finally {
|
|
342
|
+
this.exitRule();
|
|
343
|
+
}
|
|
344
|
+
return localctx;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
public static readonly _serializedATN: number[] = [4,1,10,50,2,0,7,0,2,
|
|
348
|
+
1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,1,0,1,0,3,0,17,8,0,1,0,1,
|
|
349
|
+
0,1,1,1,1,1,1,3,1,24,8,1,1,2,1,2,1,3,1,3,1,4,1,4,1,4,1,4,1,5,1,5,1,6,1,
|
|
350
|
+
6,3,6,38,8,6,1,6,1,6,1,6,3,6,43,8,6,5,6,45,8,6,10,6,12,6,48,9,6,1,6,0,0,
|
|
351
|
+
7,0,2,4,6,8,10,12,0,3,2,0,1,1,9,9,1,0,6,7,1,0,2,3,47,0,16,1,0,0,0,2,20,
|
|
352
|
+
1,0,0,0,4,25,1,0,0,0,6,27,1,0,0,0,8,29,1,0,0,0,10,33,1,0,0,0,12,37,1,0,
|
|
353
|
+
0,0,14,17,3,12,6,0,15,17,3,8,4,0,16,14,1,0,0,0,16,15,1,0,0,0,17,18,1,0,
|
|
354
|
+
0,0,18,19,5,0,0,1,19,1,1,0,0,0,20,21,3,4,2,0,21,23,7,0,0,0,22,24,3,6,3,
|
|
355
|
+
0,23,22,1,0,0,0,23,24,1,0,0,0,24,3,1,0,0,0,25,26,5,8,0,0,26,5,1,0,0,0,27,
|
|
356
|
+
28,7,1,0,0,28,7,1,0,0,0,29,30,5,4,0,0,30,31,3,12,6,0,31,32,5,5,0,0,32,9,
|
|
357
|
+
1,0,0,0,33,34,7,2,0,0,34,11,1,0,0,0,35,38,3,2,1,0,36,38,3,8,4,0,37,35,1,
|
|
358
|
+
0,0,0,37,36,1,0,0,0,38,46,1,0,0,0,39,42,3,10,5,0,40,43,3,2,1,0,41,43,3,
|
|
359
|
+
8,4,0,42,40,1,0,0,0,42,41,1,0,0,0,43,45,1,0,0,0,44,39,1,0,0,0,45,48,1,0,
|
|
360
|
+
0,0,46,44,1,0,0,0,46,47,1,0,0,0,47,13,1,0,0,0,48,46,1,0,0,0,5,16,23,37,
|
|
361
|
+
42,46];
|
|
362
|
+
|
|
363
|
+
private static __ATN: ATN;
|
|
364
|
+
public static get _ATN(): ATN {
|
|
365
|
+
if (!datacube_filter__parser.__ATN) {
|
|
366
|
+
datacube_filter__parser.__ATN = new ATNDeserializer().deserialize(datacube_filter__parser._serializedATN);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return datacube_filter__parser.__ATN;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
static DecisionsToDFA = datacube_filter__parser._ATN.decisionToState.map( (ds: DecisionState, index: number) => new DFA(ds, index) );
|
|
374
|
+
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export class FilterContext extends ParserRuleContext {
|
|
378
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
379
|
+
super(parent, invokingState);
|
|
380
|
+
this.parser = parser;
|
|
381
|
+
}
|
|
382
|
+
public EOF(): TerminalNode {
|
|
383
|
+
return this.getToken(datacube_filter__parser.EOF, 0);
|
|
384
|
+
}
|
|
385
|
+
public groupCondition(): GroupConditionContext {
|
|
386
|
+
return this.getTypedRuleContext(GroupConditionContext, 0) as GroupConditionContext;
|
|
387
|
+
}
|
|
388
|
+
public group(): GroupContext {
|
|
389
|
+
return this.getTypedRuleContext(GroupContext, 0) as GroupContext;
|
|
390
|
+
}
|
|
391
|
+
public get ruleIndex(): number {
|
|
392
|
+
return datacube_filter__parser.RULE_filter;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
export class ConditionContext extends ParserRuleContext {
|
|
398
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
399
|
+
super(parent, invokingState);
|
|
400
|
+
this.parser = parser;
|
|
401
|
+
}
|
|
402
|
+
public column(): ColumnContext {
|
|
403
|
+
return this.getTypedRuleContext(ColumnContext, 0) as ColumnContext;
|
|
404
|
+
}
|
|
405
|
+
public OPERATOR(): TerminalNode {
|
|
406
|
+
return this.getToken(datacube_filter__parser.OPERATOR, 0);
|
|
407
|
+
}
|
|
408
|
+
public IDENTIFIER(): TerminalNode {
|
|
409
|
+
return this.getToken(datacube_filter__parser.IDENTIFIER, 0);
|
|
410
|
+
}
|
|
411
|
+
public value(): ValueContext {
|
|
412
|
+
return this.getTypedRuleContext(ValueContext, 0) as ValueContext;
|
|
413
|
+
}
|
|
414
|
+
public get ruleIndex(): number {
|
|
415
|
+
return datacube_filter__parser.RULE_condition;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
export class ColumnContext extends ParserRuleContext {
|
|
421
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
422
|
+
super(parent, invokingState);
|
|
423
|
+
this.parser = parser;
|
|
424
|
+
}
|
|
425
|
+
public COLUMN(): TerminalNode {
|
|
426
|
+
return this.getToken(datacube_filter__parser.COLUMN, 0);
|
|
427
|
+
}
|
|
428
|
+
public get ruleIndex(): number {
|
|
429
|
+
return datacube_filter__parser.RULE_column;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
export class ValueContext extends ParserRuleContext {
|
|
435
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
436
|
+
super(parent, invokingState);
|
|
437
|
+
this.parser = parser;
|
|
438
|
+
}
|
|
439
|
+
public STRING(): TerminalNode {
|
|
440
|
+
return this.getToken(datacube_filter__parser.STRING, 0);
|
|
441
|
+
}
|
|
442
|
+
public NUMBER(): TerminalNode {
|
|
443
|
+
return this.getToken(datacube_filter__parser.NUMBER, 0);
|
|
444
|
+
}
|
|
445
|
+
public get ruleIndex(): number {
|
|
446
|
+
return datacube_filter__parser.RULE_value;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
export class GroupContext extends ParserRuleContext {
|
|
452
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
453
|
+
super(parent, invokingState);
|
|
454
|
+
this.parser = parser;
|
|
455
|
+
}
|
|
456
|
+
public GROUP_OPEN(): TerminalNode {
|
|
457
|
+
return this.getToken(datacube_filter__parser.GROUP_OPEN, 0);
|
|
458
|
+
}
|
|
459
|
+
public groupCondition(): GroupConditionContext {
|
|
460
|
+
return this.getTypedRuleContext(GroupConditionContext, 0) as GroupConditionContext;
|
|
461
|
+
}
|
|
462
|
+
public GROUP_CLOSE(): TerminalNode {
|
|
463
|
+
return this.getToken(datacube_filter__parser.GROUP_CLOSE, 0);
|
|
464
|
+
}
|
|
465
|
+
public get ruleIndex(): number {
|
|
466
|
+
return datacube_filter__parser.RULE_group;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
export class GroupOperatorContext extends ParserRuleContext {
|
|
472
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
473
|
+
super(parent, invokingState);
|
|
474
|
+
this.parser = parser;
|
|
475
|
+
}
|
|
476
|
+
public GROUP_OPERATOR_AND(): TerminalNode {
|
|
477
|
+
return this.getToken(datacube_filter__parser.GROUP_OPERATOR_AND, 0);
|
|
478
|
+
}
|
|
479
|
+
public GROUP_OPERATOR_OR(): TerminalNode {
|
|
480
|
+
return this.getToken(datacube_filter__parser.GROUP_OPERATOR_OR, 0);
|
|
481
|
+
}
|
|
482
|
+
public get ruleIndex(): number {
|
|
483
|
+
return datacube_filter__parser.RULE_groupOperator;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
export class GroupConditionContext extends ParserRuleContext {
|
|
489
|
+
constructor(parser?: datacube_filter__parser, parent?: ParserRuleContext, invokingState?: number) {
|
|
490
|
+
super(parent, invokingState);
|
|
491
|
+
this.parser = parser;
|
|
492
|
+
}
|
|
493
|
+
public condition_list(): ConditionContext[] {
|
|
494
|
+
return this.getTypedRuleContexts(ConditionContext) as ConditionContext[];
|
|
495
|
+
}
|
|
496
|
+
public condition(i: number): ConditionContext {
|
|
497
|
+
return this.getTypedRuleContext(ConditionContext, i) as ConditionContext;
|
|
498
|
+
}
|
|
499
|
+
public group_list(): GroupContext[] {
|
|
500
|
+
return this.getTypedRuleContexts(GroupContext) as GroupContext[];
|
|
501
|
+
}
|
|
502
|
+
public group(i: number): GroupContext {
|
|
503
|
+
return this.getTypedRuleContext(GroupContext, i) as GroupContext;
|
|
504
|
+
}
|
|
505
|
+
public groupOperator_list(): GroupOperatorContext[] {
|
|
506
|
+
return this.getTypedRuleContexts(GroupOperatorContext) as GroupOperatorContext[];
|
|
507
|
+
}
|
|
508
|
+
public groupOperator(i: number): GroupOperatorContext {
|
|
509
|
+
return this.getTypedRuleContext(GroupOperatorContext, i) as GroupOperatorContext;
|
|
510
|
+
}
|
|
511
|
+
public get ruleIndex(): number {
|
|
512
|
+
return datacube_filter__parser.RULE_groupCondition;
|
|
513
|
+
}
|
|
514
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020-present, Goldman Sachs
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import {
|
|
18
|
+
CharStreams,
|
|
19
|
+
CommonTokenStream,
|
|
20
|
+
ParseTreeVisitor,
|
|
21
|
+
ErrorListener,
|
|
22
|
+
} from 'antlr4';
|
|
23
|
+
import datacube_filterLexer from './generated/datacube_filter__lexer.js';
|
|
24
|
+
import datacube_filterParser from './generated/datacube_filter__parser.js';
|
|
25
|
+
|
|
26
|
+
class DataCubeFilterErrorListener extends ErrorListener<unknown> {
|
|
27
|
+
syntaxError(
|
|
28
|
+
recognizer: any,
|
|
29
|
+
offendingSymbol: any,
|
|
30
|
+
line: number,
|
|
31
|
+
column: number,
|
|
32
|
+
msg: string,
|
|
33
|
+
e: any,
|
|
34
|
+
) {
|
|
35
|
+
// TODO: we should make this set the parser error state when we use this in typeahead
|
|
36
|
+
console.error(`${offendingSymbol} line ${line}, col ${column}: ${msg}`, e);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function parseDataCubeQueryFilter(code: string) {
|
|
41
|
+
const charStream = CharStreams.fromString(code);
|
|
42
|
+
const lexer = new datacube_filterLexer(charStream);
|
|
43
|
+
const tokenStream = new CommonTokenStream(lexer);
|
|
44
|
+
const parser = new datacube_filterParser(tokenStream);
|
|
45
|
+
// parser.buildParseTrees = true;
|
|
46
|
+
parser.removeErrorListeners();
|
|
47
|
+
parser.addErrorListener(new DataCubeFilterErrorListener());
|
|
48
|
+
const ruleContext = parser.filter();
|
|
49
|
+
console.log(ruleContext);
|
|
50
|
+
// TODO: the last token can be used for auto-complete/typeahead
|
|
51
|
+
|
|
52
|
+
// ruleContext.children?.forEach((child) => {
|
|
53
|
+
// console.log('suggestion', child, child.getText());
|
|
54
|
+
// });
|
|
55
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Core_LegendREPLApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/Core_LegendREPLApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"Core_LegendREPLApplicationPlugin.d.ts","sourceRoot":"","sources":["../../src/components/Core_LegendREPLApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAExE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAMvF,qBAAa,gCAAiC,SAAQ,2BAA2B;IAC/E,MAAM,CAAC,IAAI,SAAgD;;IAMlD,yBAAyB,IAAI,sBAAsB,EAAE;CAQ/D"}
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
import packageJson from '../../package.json' assert { type: 'json' };
|
|
17
17
|
import { LegendREPLApplicationPlugin } from '../stores/LegendREPLApplicationPlugin.js';
|
|
18
18
|
import { configureCodeEditorComponent, setupPureLanguageService, } from '@finos/legend-lego/code-editor';
|
|
19
|
-
import { ModuleRegistry } from '@ag-grid-community/core';
|
|
20
|
-
import { ClientSideRowModelModule } from '@ag-grid-community/client-side-row-model';
|
|
21
|
-
import { RowGroupingModule } from '@ag-grid-enterprise/row-grouping';
|
|
22
19
|
export class Core_LegendREPLApplicationPlugin extends LegendREPLApplicationPlugin {
|
|
23
20
|
static NAME = packageJson.extensions.applicationREPLPlugin;
|
|
24
21
|
constructor() {
|
|
@@ -27,10 +24,6 @@ export class Core_LegendREPLApplicationPlugin extends LegendREPLApplicationPlugi
|
|
|
27
24
|
getExtraApplicationSetups() {
|
|
28
25
|
return [
|
|
29
26
|
async (applicationStore) => {
|
|
30
|
-
ModuleRegistry.registerModules([
|
|
31
|
-
ClientSideRowModelModule,
|
|
32
|
-
RowGroupingModule,
|
|
33
|
-
]);
|
|
34
27
|
await configureCodeEditorComponent(applicationStore);
|
|
35
28
|
setupPureLanguageService();
|
|
36
29
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Core_LegendREPLApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/Core_LegendREPLApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,WAAW,MAAM,oBAAoB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"Core_LegendREPLApplicationPlugin.js","sourceRoot":"","sources":["../../src/components/Core_LegendREPLApplicationPlugin.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,WAAW,MAAM,oBAAoB,CAAC,SAAS,IAAI,EAAE,MAAM,EAAE,CAAC;AACrE,OAAO,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AACvF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AAExC,MAAM,OAAO,gCAAiC,SAAQ,2BAA2B;IAC/E,MAAM,CAAC,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAE3D;QACE,KAAK,CAAC,gCAAgC,CAAC,IAAI,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACpE,CAAC;IAEQ,yBAAyB;QAChC,OAAO;YACL,KAAK,EAAE,gBAAgB,EAAE,EAAE;gBACzB,MAAM,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;gBACrD,wBAAwB,EAAE,CAAC;YAC7B,CAAC;SACF,CAAC;IACJ,CAAC"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
17
16
|
export declare const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN: Readonly<{
|
|
18
17
|
DATA_CUBE: "/dataCube";
|
|
19
18
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"LegendREPLApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAaH,eAAO,MAAM,qCAAqC;;EAEhD,CAAC;AAEH,eAAO,MAAM,gBAAgB,wBAe5B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC;CACjB,CAUA,CAAC"}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
/// <reference types="react" resolution-mode="require"/>
|
|
17
16
|
import { type LegendREPLApplicationStore } from '../stores/LegendREPLBaseStore.js';
|
|
18
17
|
export declare const useLegendREPLApplicationStore: () => LegendREPLApplicationStore;
|
|
19
18
|
export declare const LegendREPLFrameworkProvider: React.FC<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendREPLFrameworkProvider.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLFrameworkProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG
|
|
1
|
+
{"version":3,"file":"LegendREPLFrameworkProvider.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLFrameworkProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAUH,OAAO,EACL,KAAK,0BAA0B,EAEhC,MAAM,kCAAkC,CAAC;AAE1C,eAAO,MAAM,6BAA6B,QAAO,0BAC4B,CAAC;AAoB9E,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAIA,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { REPLStore } from '../stores/dataCube/
|
|
16
|
+
import { REPLStore } from '../stores/dataCube/REPLStore.js';
|
|
17
17
|
export declare const REPLStoreProvider: ({ children, }: {
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
}) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"REPLStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/REPLStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"REPLStoreProvider.d.ts","sourceRoot":"","sources":["../../src/components/REPLStoreProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAQ5D,eAAO,MAAM,iBAAiB,kBAE3B;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,KAAG,KAAK,CAAC,YAWT,CAAC;AAEF,eAAO,MAAM,YAAY,QAAO,SAI7B,CAAC;AAEJ,eAAO,MAAM,aAAa,qBAAsB,KAAK,CAAC,EAAE,KAAG,KAAK,CAAC,EAO9D,CAAC"}
|
|
@@ -16,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
16
|
*/
|
|
17
17
|
import { createContext, useContext } from 'react';
|
|
18
18
|
import { useLocalObservable } from 'mobx-react-lite';
|
|
19
|
-
import { REPLStore } from '../stores/dataCube/
|
|
19
|
+
import { REPLStore } from '../stores/dataCube/REPLStore.js';
|
|
20
20
|
import { guaranteeNonNullable } from '@finos/legend-shared';
|
|
21
21
|
import { useApplicationStore } from '@finos/legend-application';
|
|
22
22
|
const REPLStoreContext = createContext(undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"REPLStoreProvider.js","sourceRoot":"","sources":["../../src/components/REPLStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"REPLStoreProvider.js","sourceRoot":"","sources":["../../src/components/REPLStoreProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAIhE,MAAM,gBAAgB,GAAG,aAAa,CAAwB,SAAS,CAAC,CAAC;AAEzE,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAChC,QAAQ,GAGT,EAAsB,EAAE;IACvB,MAAM,gBAAgB,GAAG,mBAAmB,EAGzC,CAAC;IACJ,MAAM,KAAK,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC,IAAI,SAAS,CAAC,gBAAgB,CAAC,CAAC,CAAC;IACxE,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpC,QAAQ,GACiB,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,GAAc,EAAE,CAC1C,oBAAoB,CAClB,UAAU,CAAC,gBAAgB,CAAC,EAC5B,kCAAkC,CACnC,CAAC;AAEJ,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,gBAA0B,EAAY,EAAE,CACpE,SAAS,aAAa;IACpB,OAAO,CACL,KAAC,iBAAiB,cAChB,KAAC,gBAAgB,KAAG,GACF,CACrB,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataCube.d.ts","sourceRoot":"","sources":["../../../src/components/dataCube/DataCube.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"DataCube.d.ts","sourceRoot":"","sources":["../../../src/components/dataCube/DataCube.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA+CH,eAAO,MAAM,QAAQ;;CAuBnB,CAAC"}
|