@aehrc/ecl-core 1.0.0
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/LICENSE +201 -0
- package/README.md +142 -0
- package/dist/completion/context-detector.d.ts +51 -0
- package/dist/completion/context-detector.d.ts.map +1 -0
- package/dist/completion/context-detector.js +286 -0
- package/dist/completion/context-detector.js.map +1 -0
- package/dist/completion/context-items.d.ts +50 -0
- package/dist/completion/context-items.d.ts.map +1 -0
- package/dist/completion/context-items.js +526 -0
- package/dist/completion/context-items.js.map +1 -0
- package/dist/completion/filter-cache.d.ts +14 -0
- package/dist/completion/filter-cache.d.ts.map +1 -0
- package/dist/completion/filter-cache.js +55 -0
- package/dist/completion/filter-cache.js.map +1 -0
- package/dist/completion/provider.d.ts +34 -0
- package/dist/completion/provider.d.ts.map +1 -0
- package/dist/completion/provider.js +283 -0
- package/dist/completion/provider.js.map +1 -0
- package/dist/completion/snippets.d.ts +11 -0
- package/dist/completion/snippets.d.ts.map +1 -0
- package/dist/completion/snippets.js +80 -0
- package/dist/completion/snippets.js.map +1 -0
- package/dist/formatter/ast-printer.d.ts +12 -0
- package/dist/formatter/ast-printer.d.ts.map +1 -0
- package/dist/formatter/ast-printer.js +251 -0
- package/dist/formatter/ast-printer.js.map +1 -0
- package/dist/formatter/comments.d.ts +14 -0
- package/dist/formatter/comments.d.ts.map +1 -0
- package/dist/formatter/comments.js +232 -0
- package/dist/formatter/comments.js.map +1 -0
- package/dist/formatter/config.d.ts +5 -0
- package/dist/formatter/config.d.ts.map +1 -0
- package/dist/formatter/config.js +45 -0
- package/dist/formatter/config.js.map +1 -0
- package/dist/formatter/formatter.d.ts +3 -0
- package/dist/formatter/formatter.d.ts.map +1 -0
- package/dist/formatter/formatter.js +368 -0
- package/dist/formatter/formatter.js.map +1 -0
- package/dist/formatter/index.d.ts +6 -0
- package/dist/formatter/index.d.ts.map +1 -0
- package/dist/formatter/index.js +19 -0
- package/dist/formatter/index.js.map +1 -0
- package/dist/formatter/options.d.ts +31 -0
- package/dist/formatter/options.d.ts.map +1 -0
- package/dist/formatter/options.js +17 -0
- package/dist/formatter/options.js.map +1 -0
- package/dist/formatter/range.d.ts +16 -0
- package/dist/formatter/range.d.ts.map +1 -0
- package/dist/formatter/range.js +129 -0
- package/dist/formatter/range.js.map +1 -0
- package/dist/formatter/rules.d.ts +8 -0
- package/dist/formatter/rules.d.ts.map +1 -0
- package/dist/formatter/rules.js +42 -0
- package/dist/formatter/rules.js.map +1 -0
- package/dist/grammar/ECLLexer.d.ts +122 -0
- package/dist/grammar/ECLLexer.d.ts.map +1 -0
- package/dist/grammar/ECLLexer.js +399 -0
- package/dist/grammar/ECLLexer.js.map +1 -0
- package/dist/grammar/ECLParser.d.ts +2905 -0
- package/dist/grammar/ECLParser.d.ts.map +1 -0
- package/dist/grammar/ECLParser.js +24911 -0
- package/dist/grammar/ECLParser.js.map +1 -0
- package/dist/grammar/ECLVisitor.d.ts +1208 -0
- package/dist/grammar/ECLVisitor.d.ts.map +1 -0
- package/dist/grammar/ECLVisitor.js +4 -0
- package/dist/grammar/ECLVisitor.js.map +1 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +107 -0
- package/dist/index.js.map +1 -0
- package/dist/knowledge/filters.d.ts +6 -0
- package/dist/knowledge/filters.d.ts.map +1 -0
- package/dist/knowledge/filters.js +99 -0
- package/dist/knowledge/filters.js.map +1 -0
- package/dist/knowledge/grammar.d.ts +7 -0
- package/dist/knowledge/grammar.d.ts.map +1 -0
- package/dist/knowledge/grammar.js +217 -0
- package/dist/knowledge/grammar.js.map +1 -0
- package/dist/knowledge/index.d.ts +24 -0
- package/dist/knowledge/index.d.ts.map +1 -0
- package/dist/knowledge/index.js +101 -0
- package/dist/knowledge/index.js.map +1 -0
- package/dist/knowledge/operators.d.ts +10 -0
- package/dist/knowledge/operators.d.ts.map +1 -0
- package/dist/knowledge/operators.js +324 -0
- package/dist/knowledge/operators.js.map +1 -0
- package/dist/knowledge/patterns.d.ts +6 -0
- package/dist/knowledge/patterns.d.ts.map +1 -0
- package/dist/knowledge/patterns.js +172 -0
- package/dist/knowledge/patterns.js.map +1 -0
- package/dist/knowledge/refinements.d.ts +6 -0
- package/dist/knowledge/refinements.d.ts.map +1 -0
- package/dist/knowledge/refinements.js +134 -0
- package/dist/knowledge/refinements.js.map +1 -0
- package/dist/knowledge/types.d.ts +41 -0
- package/dist/knowledge/types.d.ts.map +1 -0
- package/dist/knowledge/types.js +5 -0
- package/dist/knowledge/types.js.map +1 -0
- package/dist/parser/ast.d.ts +111 -0
- package/dist/parser/ast.d.ts.map +1 -0
- package/dist/parser/ast.js +25 -0
- package/dist/parser/ast.js.map +1 -0
- package/dist/parser/concept-extractor.d.ts +21 -0
- package/dist/parser/concept-extractor.d.ts.map +1 -0
- package/dist/parser/concept-extractor.js +126 -0
- package/dist/parser/concept-extractor.js.map +1 -0
- package/dist/parser/error-analysis.d.ts +54 -0
- package/dist/parser/error-analysis.d.ts.map +1 -0
- package/dist/parser/error-analysis.js +260 -0
- package/dist/parser/error-analysis.js.map +1 -0
- package/dist/parser/error-listener.d.ts +14 -0
- package/dist/parser/error-listener.d.ts.map +1 -0
- package/dist/parser/error-listener.js +24 -0
- package/dist/parser/error-listener.js.map +1 -0
- package/dist/parser/expression-grouper.d.ts +20 -0
- package/dist/parser/expression-grouper.d.ts.map +1 -0
- package/dist/parser/expression-grouper.js +99 -0
- package/dist/parser/expression-grouper.js.map +1 -0
- package/dist/parser/generated/grammar/ECLLexer.d.ts +122 -0
- package/dist/parser/generated/grammar/ECLLexer.d.ts.map +1 -0
- package/dist/parser/generated/grammar/ECLLexer.js +399 -0
- package/dist/parser/generated/grammar/ECLLexer.js.map +1 -0
- package/dist/parser/generated/grammar/ECLParser.d.ts +2905 -0
- package/dist/parser/generated/grammar/ECLParser.d.ts.map +1 -0
- package/dist/parser/generated/grammar/ECLParser.js +24911 -0
- package/dist/parser/generated/grammar/ECLParser.js.map +1 -0
- package/dist/parser/generated/grammar/ECLVisitor.d.ts +1208 -0
- package/dist/parser/generated/grammar/ECLVisitor.d.ts.map +1 -0
- package/dist/parser/generated/grammar/ECLVisitor.js +4 -0
- package/dist/parser/generated/grammar/ECLVisitor.js.map +1 -0
- package/dist/parser/index.d.ts +26 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +202 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/position-detector.d.ts +45 -0
- package/dist/parser/position-detector.d.ts.map +1 -0
- package/dist/parser/position-detector.js +149 -0
- package/dist/parser/position-detector.js.map +1 -0
- package/dist/parser/refinement-check.d.ts +22 -0
- package/dist/parser/refinement-check.d.ts.map +1 -0
- package/dist/parser/refinement-check.js +194 -0
- package/dist/parser/refinement-check.js.map +1 -0
- package/dist/parser/visitor.d.ts +40 -0
- package/dist/parser/visitor.d.ts.map +1 -0
- package/dist/parser/visitor.js +587 -0
- package/dist/parser/visitor.js.map +1 -0
- package/dist/refactoring/add-description-filter.d.ts +8 -0
- package/dist/refactoring/add-description-filter.d.ts.map +1 -0
- package/dist/refactoring/add-description-filter.js +73 -0
- package/dist/refactoring/add-description-filter.js.map +1 -0
- package/dist/refactoring/add-display-terms.d.ts +20 -0
- package/dist/refactoring/add-display-terms.d.ts.map +1 -0
- package/dist/refactoring/add-display-terms.js +104 -0
- package/dist/refactoring/add-display-terms.js.map +1 -0
- package/dist/refactoring/add-history-supplement.d.ts +13 -0
- package/dist/refactoring/add-history-supplement.d.ts.map +1 -0
- package/dist/refactoring/add-history-supplement.js +80 -0
- package/dist/refactoring/add-history-supplement.js.map +1 -0
- package/dist/refactoring/add-parentheses.d.ts +14 -0
- package/dist/refactoring/add-parentheses.d.ts.map +1 -0
- package/dist/refactoring/add-parentheses.js +341 -0
- package/dist/refactoring/add-parentheses.js.map +1 -0
- package/dist/refactoring/index.d.ts +27 -0
- package/dist/refactoring/index.d.ts.map +1 -0
- package/dist/refactoring/index.js +237 -0
- package/dist/refactoring/index.js.map +1 -0
- package/dist/refactoring/remove-parentheses.d.ts +8 -0
- package/dist/refactoring/remove-parentheses.d.ts.map +1 -0
- package/dist/refactoring/remove-parentheses.js +162 -0
- package/dist/refactoring/remove-parentheses.js.map +1 -0
- package/dist/refactoring/simplify-expression.d.ts +15 -0
- package/dist/refactoring/simplify-expression.d.ts.map +1 -0
- package/dist/refactoring/simplify-expression.js +435 -0
- package/dist/refactoring/simplify-expression.js.map +1 -0
- package/dist/refactoring/strip-display-terms.d.ts +8 -0
- package/dist/refactoring/strip-display-terms.d.ts.map +1 -0
- package/dist/refactoring/strip-display-terms.js +27 -0
- package/dist/refactoring/strip-display-terms.js.map +1 -0
- package/dist/semantic/ecl-text.d.ts +35 -0
- package/dist/semantic/ecl-text.d.ts.map +1 -0
- package/dist/semantic/ecl-text.js +54 -0
- package/dist/semantic/ecl-text.js.map +1 -0
- package/dist/semantic/validator.d.ts +14 -0
- package/dist/semantic/validator.d.ts.map +1 -0
- package/dist/semantic/validator.js +183 -0
- package/dist/semantic/validator.js.map +1 -0
- package/dist/semantic-tokens.d.ts +12 -0
- package/dist/semantic-tokens.d.ts.map +1 -0
- package/dist/semantic-tokens.js +362 -0
- package/dist/semantic-tokens.js.map +1 -0
- package/dist/terminology/fetch-compat-browser.d.ts +3 -0
- package/dist/terminology/fetch-compat-browser.d.ts.map +1 -0
- package/dist/terminology/fetch-compat-browser.js +7 -0
- package/dist/terminology/fetch-compat-browser.js.map +1 -0
- package/dist/terminology/fetch-compat.d.ts +4 -0
- package/dist/terminology/fetch-compat.d.ts.map +1 -0
- package/dist/terminology/fetch-compat.js +18 -0
- package/dist/terminology/fetch-compat.js.map +1 -0
- package/dist/terminology/fhir-service.d.ts +65 -0
- package/dist/terminology/fhir-service.d.ts.map +1 -0
- package/dist/terminology/fhir-service.js +456 -0
- package/dist/terminology/fhir-service.js.map +1 -0
- package/dist/terminology/index.d.ts +4 -0
- package/dist/terminology/index.d.ts.map +1 -0
- package/dist/terminology/index.js +22 -0
- package/dist/terminology/index.js.map +1 -0
- package/dist/terminology/mock-service.d.ts +11 -0
- package/dist/terminology/mock-service.d.ts.map +1 -0
- package/dist/terminology/mock-service.js +108 -0
- package/dist/terminology/mock-service.js.map +1 -0
- package/dist/terminology/types.d.ts +31 -0
- package/dist/terminology/types.d.ts.map +1 -0
- package/dist/terminology/types.js +5 -0
- package/dist/terminology/types.js.map +1 -0
- package/dist/terminology/verhoeff.d.ts +38 -0
- package/dist/terminology/verhoeff.d.ts.map +1 -0
- package/dist/terminology/verhoeff.js +118 -0
- package/dist/terminology/verhoeff.js.map +1 -0
- package/dist/text-utils.d.ts +17 -0
- package/dist/text-utils.d.ts.map +1 -0
- package/dist/text-utils.js +49 -0
- package/dist/text-utils.js.map +1 -0
- package/dist/types.d.ts +64 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -0
- package/dist/validation/error-refinement.d.ts +31 -0
- package/dist/validation/error-refinement.d.ts.map +1 -0
- package/dist/validation/error-refinement.js +173 -0
- package/dist/validation/error-refinement.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
|
|
3
|
+
// ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.groupTokens = groupTokens;
|
|
6
|
+
exports.analyzeExpression = analyzeExpression;
|
|
7
|
+
// ── Tokeniser ───────────────────────────────────────────────────────────────
|
|
8
|
+
const KEYWORDS = new Set(['AND', 'OR', 'MINUS']); // canonical forms (uppercased for lookup)
|
|
9
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- tokenizer with multi-char operator recognition
|
|
10
|
+
function groupTokens(text) {
|
|
11
|
+
const tokens = [];
|
|
12
|
+
let inTerm = false;
|
|
13
|
+
let line = 1;
|
|
14
|
+
let col = 0;
|
|
15
|
+
let i = 0;
|
|
16
|
+
while (i < text.length) {
|
|
17
|
+
const ch = text[i];
|
|
18
|
+
// ── Pipe toggles term mode ──────────────────────────────────────────
|
|
19
|
+
if (ch === '|') {
|
|
20
|
+
tokens.push({ kind: 'symbol', text: '|', line, column: col, offset: i, inTerm });
|
|
21
|
+
inTerm = !inTerm;
|
|
22
|
+
i++;
|
|
23
|
+
col++;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
// ── Inside a term: consume everything until next pipe ────────────────
|
|
27
|
+
if (inTerm) {
|
|
28
|
+
const start = i;
|
|
29
|
+
const startCol = col;
|
|
30
|
+
while (i < text.length && text[i] !== '|') {
|
|
31
|
+
if (text[i] === '\n') {
|
|
32
|
+
line++;
|
|
33
|
+
col = 0;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
col++;
|
|
37
|
+
}
|
|
38
|
+
i++;
|
|
39
|
+
}
|
|
40
|
+
tokens.push({ kind: 'word', text: text.slice(start, i), line, column: startCol, offset: start, inTerm: true });
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
// ── Whitespace (outside terms) ──────────────────────────────────────
|
|
44
|
+
if (ch === ' ' || ch === '\t' || ch === '\n' || ch === '\r') {
|
|
45
|
+
const start = i;
|
|
46
|
+
const startLine = line;
|
|
47
|
+
const startCol = col;
|
|
48
|
+
while (i < text.length && (text[i] === ' ' || text[i] === '\t' || text[i] === '\n' || text[i] === '\r')) {
|
|
49
|
+
if (text[i] === '\n') {
|
|
50
|
+
line++;
|
|
51
|
+
col = 0;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
col++;
|
|
55
|
+
}
|
|
56
|
+
i++;
|
|
57
|
+
}
|
|
58
|
+
tokens.push({
|
|
59
|
+
kind: 'whitespace',
|
|
60
|
+
text: text.slice(start, i),
|
|
61
|
+
line: startLine,
|
|
62
|
+
column: startCol,
|
|
63
|
+
offset: start,
|
|
64
|
+
inTerm: false,
|
|
65
|
+
});
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
// ── Letters → word (may become keyword) ────────────────────────────
|
|
69
|
+
if ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z')) {
|
|
70
|
+
const start = i;
|
|
71
|
+
const startCol = col;
|
|
72
|
+
while (i < text.length && ((text[i] >= 'A' && text[i] <= 'Z') || (text[i] >= 'a' && text[i] <= 'z'))) {
|
|
73
|
+
i++;
|
|
74
|
+
col++;
|
|
75
|
+
}
|
|
76
|
+
const word = text.slice(start, i);
|
|
77
|
+
const kind = KEYWORDS.has(word.toUpperCase()) ? 'keyword' : 'word';
|
|
78
|
+
tokens.push({ kind, text: word, line, column: startCol, offset: start, inTerm: false });
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
// ── Structural symbols (single char each) ───────────────────────────
|
|
82
|
+
tokens.push({ kind: 'symbol', text: ch, line, column: col, offset: i, inTerm: false });
|
|
83
|
+
i++;
|
|
84
|
+
col++;
|
|
85
|
+
}
|
|
86
|
+
return tokens;
|
|
87
|
+
}
|
|
88
|
+
// ── Analyser ────────────────────────────────────────────────────────────────
|
|
89
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- single-pass heuristic analyzer scanning all error patterns
|
|
90
|
+
function analyzeExpression(text) {
|
|
91
|
+
const tokens = groupTokens(text);
|
|
92
|
+
const result = {
|
|
93
|
+
mixedOperator: null,
|
|
94
|
+
missingColonBeforeBrace: null,
|
|
95
|
+
trailingOperator: null,
|
|
96
|
+
duplicateOperator: null,
|
|
97
|
+
danglingEquals: null,
|
|
98
|
+
unclosedParen: null,
|
|
99
|
+
missingWhitespace: null,
|
|
100
|
+
};
|
|
101
|
+
// ── Shared state ────────────────────────────────────────────────────────
|
|
102
|
+
let parenDepth = 0;
|
|
103
|
+
let braceDepth = 0;
|
|
104
|
+
// Mixed operator (parenDepth === 0 only, braces don't count)
|
|
105
|
+
let firstOp = null;
|
|
106
|
+
// Missing colon before brace (parenDepth === 0 && braceDepth === 0)
|
|
107
|
+
let seenColonAtTopLevel = false;
|
|
108
|
+
let lastNonWsText = '';
|
|
109
|
+
// Trailing operator (combined depth === 0)
|
|
110
|
+
let lastTopLevelOp = null;
|
|
111
|
+
let hasContentAfterLastOp = false;
|
|
112
|
+
// Duplicate operator (combined depth === 0)
|
|
113
|
+
let prevOp = null;
|
|
114
|
+
// Unclosed paren
|
|
115
|
+
const parenStack = [];
|
|
116
|
+
for (const tok of tokens) {
|
|
117
|
+
// Skip term content entirely — only process the pipes themselves
|
|
118
|
+
if (tok.inTerm && tok.kind !== 'symbol')
|
|
119
|
+
continue;
|
|
120
|
+
// Skip whitespace (doesn't affect any state except it doesn't reset prevOp etc.)
|
|
121
|
+
if (tok.kind === 'whitespace')
|
|
122
|
+
continue;
|
|
123
|
+
const sym = tok.text;
|
|
124
|
+
// ── Pipe symbol ─────────────────────────────────────────────────────
|
|
125
|
+
if (sym === '|') {
|
|
126
|
+
lastNonWsText = '|';
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
// ── Parentheses ─────────────────────────────────────────────────────
|
|
130
|
+
if (sym === '(') {
|
|
131
|
+
parenDepth++;
|
|
132
|
+
parenStack.push({ line: tok.line, column: tok.column });
|
|
133
|
+
lastNonWsText = '(';
|
|
134
|
+
// Reset duplicate-op tracking when entering parens
|
|
135
|
+
if (parenDepth + braceDepth === 1)
|
|
136
|
+
prevOp = null;
|
|
137
|
+
continue;
|
|
138
|
+
}
|
|
139
|
+
if (sym === ')') {
|
|
140
|
+
parenDepth--;
|
|
141
|
+
if (parenStack.length > 0)
|
|
142
|
+
parenStack.pop();
|
|
143
|
+
lastNonWsText = ')';
|
|
144
|
+
// Reset duplicate-op tracking when exiting parens
|
|
145
|
+
if (parenDepth + braceDepth === 0)
|
|
146
|
+
prevOp = null;
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
// ── Braces ──────────────────────────────────────────────────────────
|
|
150
|
+
if (sym === '{') {
|
|
151
|
+
// Missing colon check (parenDepth === 0 && braceDepth === 0)
|
|
152
|
+
if (parenDepth === 0 && braceDepth === 0 && !result.missingColonBeforeBrace) {
|
|
153
|
+
if (lastNonWsText !== ':' && !seenColonAtTopLevel) {
|
|
154
|
+
result.missingColonBeforeBrace = { line: tok.line, column: tok.column };
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
braceDepth++;
|
|
158
|
+
lastNonWsText = '{';
|
|
159
|
+
// Reset duplicate-op tracking when entering braces
|
|
160
|
+
if (parenDepth + braceDepth === 1)
|
|
161
|
+
prevOp = null;
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
if (sym === '}') {
|
|
165
|
+
if (braceDepth > 0)
|
|
166
|
+
braceDepth--;
|
|
167
|
+
lastNonWsText = '}';
|
|
168
|
+
// Reset duplicate-op tracking when exiting braces
|
|
169
|
+
if (parenDepth + braceDepth === 0)
|
|
170
|
+
prevOp = null;
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
// ── Colon ───────────────────────────────────────────────────────────
|
|
174
|
+
if (sym === ':' && parenDepth === 0 && braceDepth === 0) {
|
|
175
|
+
seenColonAtTopLevel = true;
|
|
176
|
+
}
|
|
177
|
+
// ── Keyword (AND / OR / MINUS — case-insensitive) ─────────────────
|
|
178
|
+
if (tok.kind === 'keyword') {
|
|
179
|
+
const op = sym;
|
|
180
|
+
const opUpper = op.toUpperCase();
|
|
181
|
+
// Mixed operator check (parenDepth === 0 only, braces don't matter)
|
|
182
|
+
if (parenDepth === 0 && !result.mixedOperator) {
|
|
183
|
+
if (firstOp === null) {
|
|
184
|
+
firstOp = opUpper;
|
|
185
|
+
}
|
|
186
|
+
else if (opUpper !== firstOp) {
|
|
187
|
+
result.mixedOperator = { firstOp, conflictOp: op, line: tok.line, column: tok.column };
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
// Duplicate operator check (combined depth === 0)
|
|
191
|
+
if (parenDepth + braceDepth === 0 && !result.duplicateOperator) {
|
|
192
|
+
if (prevOp === opUpper) {
|
|
193
|
+
result.duplicateOperator = { op, line: tok.line, column: tok.column };
|
|
194
|
+
}
|
|
195
|
+
prevOp = opUpper;
|
|
196
|
+
}
|
|
197
|
+
else if (parenDepth + braceDepth !== 0) {
|
|
198
|
+
// Inside nesting — don't track
|
|
199
|
+
}
|
|
200
|
+
// Trailing operator check (combined depth === 0)
|
|
201
|
+
if (parenDepth + braceDepth === 0) {
|
|
202
|
+
lastTopLevelOp = { op, line: tok.line, column: tok.column };
|
|
203
|
+
hasContentAfterLastOp = false;
|
|
204
|
+
}
|
|
205
|
+
// Missing whitespace check (all depths, but skip terms — already skipped above)
|
|
206
|
+
if (!result.missingWhitespace) {
|
|
207
|
+
const before = tok.offset > 0 ? text[tok.offset - 1] : ' ';
|
|
208
|
+
const after = tok.offset + op.length < text.length ? text[tok.offset + op.length] : ' ';
|
|
209
|
+
const validBefore = before === ' ' || before === '\t' || before === '\n' || before === '(';
|
|
210
|
+
const validAfter = after === ' ' || after === '\t' || after === '\n' || after === ')' || after === '';
|
|
211
|
+
if (!validBefore) {
|
|
212
|
+
result.missingWhitespace = { op, side: 'before', line: tok.line, column: tok.column };
|
|
213
|
+
}
|
|
214
|
+
else if (!validAfter) {
|
|
215
|
+
result.missingWhitespace = { op, side: 'after', line: tok.line, column: tok.column };
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
lastNonWsText = op;
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
// ── Any other non-whitespace token ──────────────────────────────────
|
|
222
|
+
if (parenDepth + braceDepth === 0) {
|
|
223
|
+
// Content after a top-level operator → not trailing
|
|
224
|
+
if (lastTopLevelOp)
|
|
225
|
+
hasContentAfterLastOp = true;
|
|
226
|
+
// Non-operator token resets duplicate tracking
|
|
227
|
+
prevOp = null;
|
|
228
|
+
}
|
|
229
|
+
if (sym !== ' ' && sym !== '\t') {
|
|
230
|
+
lastNonWsText = sym;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
// ── Post-loop: trailing operator ────────────────────────────────────────
|
|
234
|
+
if (lastTopLevelOp && !hasContentAfterLastOp) {
|
|
235
|
+
result.trailingOperator = lastTopLevelOp;
|
|
236
|
+
}
|
|
237
|
+
// ── Post-loop: dangling equals ──────────────────────────────────────────
|
|
238
|
+
if (text.trimEnd().endsWith('=')) {
|
|
239
|
+
const eqIdx = text.lastIndexOf('=');
|
|
240
|
+
if (text.slice(eqIdx + 1).trim() === '') {
|
|
241
|
+
let eqLine = 1, eqCol = 0;
|
|
242
|
+
for (let i = 0; i < eqIdx; i++) {
|
|
243
|
+
if (text[i] === '\n') {
|
|
244
|
+
eqLine++;
|
|
245
|
+
eqCol = 0;
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
eqCol++;
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
result.danglingEquals = { line: eqLine, column: eqCol };
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
// ── Post-loop: unclosed paren ───────────────────────────────────────────
|
|
255
|
+
if (parenStack.length > 0) {
|
|
256
|
+
result.unclosedParen = parenStack[0];
|
|
257
|
+
}
|
|
258
|
+
return result;
|
|
259
|
+
}
|
|
260
|
+
//# sourceMappingURL=error-analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-analysis.js","sourceRoot":"","sources":["../../src/parser/error-analysis.ts"],"names":[],"mappings":";AAAA,sFAAsF;AACtF,0DAA0D;;AAoC1D,kCAkFC;AAKD,8CAsLC;AAlRD,+EAA+E;AAE/E,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,0CAA0C;AAE5F,0GAA0G;AAC1G,SAAgB,WAAW,CAAC,IAAY;IACtC,MAAM,MAAM,GAAmB,EAAE,CAAC;IAClC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,IAAI,IAA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interface ParseError {
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
message: string;
|
|
6
|
+
offendingSymbol?: any;
|
|
7
|
+
}
|
|
8
|
+
export declare class ECLErrorListener implements ANTLRErrorListener<any> {
|
|
9
|
+
private readonly errors;
|
|
10
|
+
syntaxError(recognizer: Recognizer<any, any>, offendingSymbol: any, line: number, charPositionInLine: number, msg: string, _e: RecognitionException | undefined): void;
|
|
11
|
+
getErrors(): ParseError[];
|
|
12
|
+
hasErrors(): boolean;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=error-listener.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-listener.d.ts","sourceRoot":"","sources":["../../src/parser/error-listener.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEhF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,GAAG,CAAC;CACvB;AAED,qBAAa,gBAAiB,YAAW,kBAAkB,CAAC,GAAG,CAAC;IAC9D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAE3C,WAAW,CACT,UAAU,EAAE,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAChC,eAAe,EAAE,GAAG,EACpB,IAAI,EAAE,MAAM,EACZ,kBAAkB,EAAE,MAAM,EAC1B,GAAG,EAAE,MAAM,EACX,EAAE,EAAE,oBAAoB,GAAG,SAAS,GACnC,IAAI;IASP,SAAS,IAAI,UAAU,EAAE;IAIzB,SAAS,IAAI,OAAO;CAGrB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
|
|
3
|
+
// ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.ECLErrorListener = void 0;
|
|
6
|
+
class ECLErrorListener {
|
|
7
|
+
errors = [];
|
|
8
|
+
syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, _e) {
|
|
9
|
+
this.errors.push({
|
|
10
|
+
line,
|
|
11
|
+
column: charPositionInLine,
|
|
12
|
+
message: msg,
|
|
13
|
+
offendingSymbol,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
getErrors() {
|
|
17
|
+
return this.errors;
|
|
18
|
+
}
|
|
19
|
+
hasErrors() {
|
|
20
|
+
return this.errors.length > 0;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ECLErrorListener = ECLErrorListener;
|
|
24
|
+
//# sourceMappingURL=error-listener.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-listener.js","sourceRoot":"","sources":["../../src/parser/error-listener.ts"],"names":[],"mappings":";AAAA,sFAAsF;AACtF,0DAA0D;;;AAW1D,MAAa,gBAAgB;IACV,MAAM,GAAiB,EAAE,CAAC;IAE3C,WAAW,CACT,UAAgC,EAChC,eAAoB,EACpB,IAAY,EACZ,kBAA0B,EAC1B,GAAW,EACX,EAAoC;QAEpC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YACf,IAAI;YACJ,MAAM,EAAE,kBAAkB;YAC1B,OAAO,EAAE,GAAG;YACZ,eAAe;SAChB,CAAC,CAAC;IACL,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAChC,CAAC;CACF;AA1BD,4CA0BC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a single ECL expression in a document.
|
|
3
|
+
* Expressions are separated by ECL-END comment delimiters.
|
|
4
|
+
*/
|
|
5
|
+
export interface Expression {
|
|
6
|
+
text: string;
|
|
7
|
+
startLine: number;
|
|
8
|
+
endLine: number;
|
|
9
|
+
lineOffsets: number[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Groups document lines into ECL expressions.
|
|
13
|
+
* Expressions are separated by ECL-END comment delimiters.
|
|
14
|
+
* Each expression can be multi-line.
|
|
15
|
+
*
|
|
16
|
+
* @param text - The full document text
|
|
17
|
+
* @returns Array of expressions with their positions in the document
|
|
18
|
+
*/
|
|
19
|
+
export declare function groupIntoExpressions(text: string): Expression[];
|
|
20
|
+
//# sourceMappingURL=expression-grouper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expression-grouper.d.ts","sourceRoot":"","sources":["../../src/parser/expression-grouper.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED;;;;;;;GAOG;AAEH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CA4F/D"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Copyright 2026 Commonwealth Scientific and Industrial Research Organisation (CSIRO)
|
|
3
|
+
// ABN 41 687 119 230. SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.groupIntoExpressions = groupIntoExpressions;
|
|
6
|
+
/**
|
|
7
|
+
* Groups document lines into ECL expressions.
|
|
8
|
+
* Expressions are separated by ECL-END comment delimiters.
|
|
9
|
+
* Each expression can be multi-line.
|
|
10
|
+
*
|
|
11
|
+
* @param text - The full document text
|
|
12
|
+
* @returns Array of expressions with their positions in the document
|
|
13
|
+
*/
|
|
14
|
+
// eslint-disable-next-line sonarjs/cognitive-complexity -- char-by-char expression splitter with comment/string tracking
|
|
15
|
+
function groupIntoExpressions(text) {
|
|
16
|
+
const lines = text.split('\n');
|
|
17
|
+
const expressions = [];
|
|
18
|
+
let currentExprLines = [];
|
|
19
|
+
let currentExprLineOffsets = [];
|
|
20
|
+
let exprStartLine = 0;
|
|
21
|
+
let inBlockComment = false;
|
|
22
|
+
for (let lineIndex = 0; lineIndex < lines.length; lineIndex++) {
|
|
23
|
+
const line = lines[lineIndex];
|
|
24
|
+
// Check for ECL-END delimiter
|
|
25
|
+
if (line.trim() === '/* ECL-END */') {
|
|
26
|
+
inBlockComment = false;
|
|
27
|
+
// End current expression if it has content
|
|
28
|
+
if (currentExprLines.length > 0) {
|
|
29
|
+
expressions.push({
|
|
30
|
+
text: currentExprLines.join('\n'),
|
|
31
|
+
startLine: exprStartLine,
|
|
32
|
+
endLine: lineIndex - 1,
|
|
33
|
+
lineOffsets: currentExprLineOffsets,
|
|
34
|
+
});
|
|
35
|
+
currentExprLines = [];
|
|
36
|
+
currentExprLineOffsets = [];
|
|
37
|
+
}
|
|
38
|
+
// Next expression starts after this delimiter
|
|
39
|
+
exprStartLine = lineIndex + 1;
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
// If inside a multi-line block comment, look for closing */
|
|
43
|
+
if (inBlockComment) {
|
|
44
|
+
const closeIdx = line.indexOf('*/');
|
|
45
|
+
if (closeIdx !== -1) {
|
|
46
|
+
inBlockComment = false;
|
|
47
|
+
// Check if there's code after the closing */
|
|
48
|
+
const afterComment = line.substring(closeIdx + 2);
|
|
49
|
+
const trimmedAfter = afterComment.trim();
|
|
50
|
+
if (trimmedAfter && !trimmedAfter.startsWith('//')) {
|
|
51
|
+
if (currentExprLines.length === 0) {
|
|
52
|
+
exprStartLine = lineIndex;
|
|
53
|
+
}
|
|
54
|
+
currentExprLines.push(afterComment);
|
|
55
|
+
currentExprLineOffsets.push(lineIndex);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
// Either way, skip the rest of this line (it's comment content)
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
// Remove inline comments for processing
|
|
62
|
+
let cleanLine = line;
|
|
63
|
+
const commentStart = line.indexOf('/*');
|
|
64
|
+
const commentEnd = line.indexOf('*/');
|
|
65
|
+
if (commentStart !== -1) {
|
|
66
|
+
if (commentEnd !== -1 && commentEnd > commentStart) {
|
|
67
|
+
// Remove /* ... */ from line
|
|
68
|
+
cleanLine = line.substring(0, commentStart) + line.substring(commentEnd + 2);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
// Unclosed block comment — remove everything after /* and enter block comment mode
|
|
72
|
+
cleanLine = line.substring(0, commentStart);
|
|
73
|
+
inBlockComment = true;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const trimmed = cleanLine.trim();
|
|
77
|
+
// Skip empty lines, lines that are just closing comments, or C++ style comments
|
|
78
|
+
if (!trimmed || trimmed === '*/' || trimmed.startsWith('//')) {
|
|
79
|
+
continue;
|
|
80
|
+
}
|
|
81
|
+
// Add to current expression
|
|
82
|
+
if (currentExprLines.length === 0) {
|
|
83
|
+
exprStartLine = lineIndex;
|
|
84
|
+
}
|
|
85
|
+
currentExprLines.push(cleanLine);
|
|
86
|
+
currentExprLineOffsets.push(lineIndex);
|
|
87
|
+
}
|
|
88
|
+
// Don't forget the last expression
|
|
89
|
+
if (currentExprLines.length > 0) {
|
|
90
|
+
expressions.push({
|
|
91
|
+
text: currentExprLines.join('\n'),
|
|
92
|
+
startLine: exprStartLine,
|
|
93
|
+
endLine: lines.length - 1,
|
|
94
|
+
lineOffsets: currentExprLineOffsets,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return expressions;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=expression-grouper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expression-grouper.js","sourceRoot":"","sources":["../../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gFAAgF;QAChF,IAAI,CAAC,OAAO,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7D,SAAS;QACX,CAAC;QAED,4BAA4B;QAC5B,IAAI,gBAAgB,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAClC,aAAa,GAAG,SAAS,CAAC;QAC5B,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACjC,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzC,CAAC;IAED,mCAAmC;IACnC,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,WAAW,CAAC,IAAI,CAAC;YACf,IAAI,EAAE,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC;YACjC,SAAS,EAAE,aAAa;YACxB,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC;YACzB,WAAW,EAAE,sBAAsB;SACpC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { ATN } from "antlr4ts/atn/ATN";
|
|
2
|
+
import { CharStream } from "antlr4ts/CharStream";
|
|
3
|
+
import { Lexer } from "antlr4ts/Lexer";
|
|
4
|
+
import { Vocabulary } from "antlr4ts/Vocabulary";
|
|
5
|
+
export declare class ECLLexer extends Lexer {
|
|
6
|
+
static readonly UTF8_LETTER = 1;
|
|
7
|
+
static readonly TAB = 2;
|
|
8
|
+
static readonly LF = 3;
|
|
9
|
+
static readonly CR = 4;
|
|
10
|
+
static readonly SPACE = 5;
|
|
11
|
+
static readonly EXCLAMATION = 6;
|
|
12
|
+
static readonly QUOTE = 7;
|
|
13
|
+
static readonly HASH = 8;
|
|
14
|
+
static readonly DOLLAR = 9;
|
|
15
|
+
static readonly PERCENT = 10;
|
|
16
|
+
static readonly AMPERSAND = 11;
|
|
17
|
+
static readonly APOSTROPHE = 12;
|
|
18
|
+
static readonly LEFT_PAREN = 13;
|
|
19
|
+
static readonly RIGHT_PAREN = 14;
|
|
20
|
+
static readonly ASTERISK = 15;
|
|
21
|
+
static readonly PLUS = 16;
|
|
22
|
+
static readonly COMMA = 17;
|
|
23
|
+
static readonly DASH = 18;
|
|
24
|
+
static readonly PERIOD = 19;
|
|
25
|
+
static readonly SLASH = 20;
|
|
26
|
+
static readonly ZERO = 21;
|
|
27
|
+
static readonly ONE = 22;
|
|
28
|
+
static readonly TWO = 23;
|
|
29
|
+
static readonly THREE = 24;
|
|
30
|
+
static readonly FOUR = 25;
|
|
31
|
+
static readonly FIVE = 26;
|
|
32
|
+
static readonly SIX = 27;
|
|
33
|
+
static readonly SEVEN = 28;
|
|
34
|
+
static readonly EIGHT = 29;
|
|
35
|
+
static readonly NINE = 30;
|
|
36
|
+
static readonly COLON = 31;
|
|
37
|
+
static readonly SEMICOLON = 32;
|
|
38
|
+
static readonly LESS_THAN = 33;
|
|
39
|
+
static readonly EQUALS = 34;
|
|
40
|
+
static readonly GREATER_THAN = 35;
|
|
41
|
+
static readonly QUESTION = 36;
|
|
42
|
+
static readonly AT = 37;
|
|
43
|
+
static readonly CAP_A = 38;
|
|
44
|
+
static readonly CAP_B = 39;
|
|
45
|
+
static readonly CAP_C = 40;
|
|
46
|
+
static readonly CAP_D = 41;
|
|
47
|
+
static readonly CAP_E = 42;
|
|
48
|
+
static readonly CAP_F = 43;
|
|
49
|
+
static readonly CAP_G = 44;
|
|
50
|
+
static readonly CAP_H = 45;
|
|
51
|
+
static readonly CAP_I = 46;
|
|
52
|
+
static readonly CAP_J = 47;
|
|
53
|
+
static readonly CAP_K = 48;
|
|
54
|
+
static readonly CAP_L = 49;
|
|
55
|
+
static readonly CAP_M = 50;
|
|
56
|
+
static readonly CAP_N = 51;
|
|
57
|
+
static readonly CAP_O = 52;
|
|
58
|
+
static readonly CAP_P = 53;
|
|
59
|
+
static readonly CAP_Q = 54;
|
|
60
|
+
static readonly CAP_R = 55;
|
|
61
|
+
static readonly CAP_S = 56;
|
|
62
|
+
static readonly CAP_T = 57;
|
|
63
|
+
static readonly CAP_U = 58;
|
|
64
|
+
static readonly CAP_V = 59;
|
|
65
|
+
static readonly CAP_W = 60;
|
|
66
|
+
static readonly CAP_X = 61;
|
|
67
|
+
static readonly CAP_Y = 62;
|
|
68
|
+
static readonly CAP_Z = 63;
|
|
69
|
+
static readonly LEFT_BRACE = 64;
|
|
70
|
+
static readonly BACKSLASH = 65;
|
|
71
|
+
static readonly RIGHT_BRACE = 66;
|
|
72
|
+
static readonly CARAT = 67;
|
|
73
|
+
static readonly UNDERSCORE = 68;
|
|
74
|
+
static readonly ACCENT = 69;
|
|
75
|
+
static readonly A = 70;
|
|
76
|
+
static readonly B = 71;
|
|
77
|
+
static readonly C = 72;
|
|
78
|
+
static readonly D = 73;
|
|
79
|
+
static readonly E = 74;
|
|
80
|
+
static readonly F = 75;
|
|
81
|
+
static readonly G = 76;
|
|
82
|
+
static readonly H = 77;
|
|
83
|
+
static readonly I = 78;
|
|
84
|
+
static readonly J = 79;
|
|
85
|
+
static readonly K = 80;
|
|
86
|
+
static readonly L = 81;
|
|
87
|
+
static readonly M = 82;
|
|
88
|
+
static readonly N = 83;
|
|
89
|
+
static readonly O = 84;
|
|
90
|
+
static readonly P = 85;
|
|
91
|
+
static readonly Q = 86;
|
|
92
|
+
static readonly R = 87;
|
|
93
|
+
static readonly S = 88;
|
|
94
|
+
static readonly T = 89;
|
|
95
|
+
static readonly U = 90;
|
|
96
|
+
static readonly V = 91;
|
|
97
|
+
static readonly W = 92;
|
|
98
|
+
static readonly X = 93;
|
|
99
|
+
static readonly Y = 94;
|
|
100
|
+
static readonly Z = 95;
|
|
101
|
+
static readonly LEFT_CURLY_BRACE = 96;
|
|
102
|
+
static readonly PIPE = 97;
|
|
103
|
+
static readonly RIGHT_CURLY_BRACE = 98;
|
|
104
|
+
static readonly TILDE = 99;
|
|
105
|
+
static readonly channelNames: string[];
|
|
106
|
+
static readonly modeNames: string[];
|
|
107
|
+
static readonly ruleNames: string[];
|
|
108
|
+
private static readonly _LITERAL_NAMES;
|
|
109
|
+
private static readonly _SYMBOLIC_NAMES;
|
|
110
|
+
static readonly VOCABULARY: Vocabulary;
|
|
111
|
+
get vocabulary(): Vocabulary;
|
|
112
|
+
constructor(input: CharStream);
|
|
113
|
+
get grammarFileName(): string;
|
|
114
|
+
get ruleNames(): string[];
|
|
115
|
+
get serializedATN(): string;
|
|
116
|
+
get channelNames(): string[];
|
|
117
|
+
get modeNames(): string[];
|
|
118
|
+
static readonly _serializedATN: string;
|
|
119
|
+
static __ATN: ATN;
|
|
120
|
+
static get _ATN(): ATN;
|
|
121
|
+
}
|
|
122
|
+
//# sourceMappingURL=ECLLexer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ECLLexer.d.ts","sourceRoot":"","sources":["../../../../src/parser/generated/grammar/ECLLexer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAKvC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMjD,qBAAa,QAAS,SAAQ,KAAK;IAClC,gBAAuB,WAAW,KAAK;IACvC,gBAAuB,GAAG,KAAK;IAC/B,gBAAuB,EAAE,KAAK;IAC9B,gBAAuB,EAAE,KAAK;IAC9B,gBAAuB,KAAK,KAAK;IACjC,gBAAuB,WAAW,KAAK;IACvC,gBAAuB,KAAK,KAAK;IACjC,gBAAuB,IAAI,KAAK;IAChC,gBAAuB,MAAM,KAAK;IAClC,gBAAuB,OAAO,MAAM;IACpC,gBAAuB,SAAS,MAAM;IACtC,gBAAuB,UAAU,MAAM;IACvC,gBAAuB,UAAU,MAAM;IACvC,gBAAuB,WAAW,MAAM;IAC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