@plurnk/plurnk-grammar 0.2.0 → 0.5.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.
Files changed (77) hide show
  1. package/bin/plurnk.js +1 -1
  2. package/{schema → dist/schema}/LogEntry.json +1 -1
  3. package/{schema → dist/schema}/Packet.json +15 -2
  4. package/{schema → dist/schema}/Run.json +6 -1
  5. package/{schema → dist/schema}/SchemeRegistration.json +6 -0
  6. package/{schema → dist/schema}/Session.json +1 -1
  7. package/dist/src/AstBuilder.d.ts +19 -0
  8. package/dist/src/AstBuilder.d.ts.map +1 -0
  9. package/{src/AstBuilder.ts → dist/src/AstBuilder.js} +176 -161
  10. package/dist/src/AstBuilder.js.map +1 -0
  11. package/dist/src/PlurnkErrorStrategy.d.ts +10 -0
  12. package/dist/src/PlurnkErrorStrategy.d.ts.map +1 -0
  13. package/{src/PlurnkErrorStrategy.ts → dist/src/PlurnkErrorStrategy.js} +41 -49
  14. package/dist/src/PlurnkErrorStrategy.js.map +1 -0
  15. package/dist/src/PlurnkParseError.d.ts +14 -0
  16. package/dist/src/PlurnkParseError.d.ts.map +1 -0
  17. package/{src/PlurnkParseError.ts → dist/src/PlurnkParseError.js} +6 -9
  18. package/dist/src/PlurnkParseError.js.map +1 -0
  19. package/dist/src/PlurnkParser.d.ts +6 -0
  20. package/dist/src/PlurnkParser.d.ts.map +1 -0
  21. package/{src/PlurnkParser.ts → dist/src/PlurnkParser.js} +32 -40
  22. package/dist/src/PlurnkParser.js.map +1 -0
  23. package/dist/src/RecordingListener.d.ts +9 -0
  24. package/dist/src/RecordingListener.d.ts.map +1 -0
  25. package/dist/src/RecordingListener.js +19 -0
  26. package/dist/src/RecordingListener.js.map +1 -0
  27. package/dist/src/Validator.d.ts +28 -0
  28. package/dist/src/Validator.d.ts.map +1 -0
  29. package/dist/src/Validator.js +86 -0
  30. package/dist/src/Validator.js.map +1 -0
  31. package/dist/src/generated/plurnkLexer.d.ts +88 -0
  32. package/dist/src/generated/plurnkLexer.d.ts.map +1 -0
  33. package/dist/src/generated/plurnkLexer.js +440 -0
  34. package/dist/src/generated/plurnkLexer.js.map +1 -0
  35. package/dist/src/generated/plurnkParser.d.ts +274 -0
  36. package/dist/src/generated/plurnkParser.d.ts.map +1 -0
  37. package/dist/src/generated/plurnkParser.js +1833 -0
  38. package/dist/src/generated/plurnkParser.js.map +1 -0
  39. package/{src/generated/plurnkParserVisitor.ts → dist/src/generated/plurnkParserVisitor.d.ts} +2 -7
  40. package/dist/src/generated/plurnkParserVisitor.d.ts.map +1 -0
  41. package/dist/src/generated/plurnkParserVisitor.js +131 -0
  42. package/dist/src/generated/plurnkParserVisitor.js.map +1 -0
  43. package/dist/src/index.d.ts +10 -0
  44. package/dist/src/index.d.ts.map +1 -0
  45. package/dist/src/index.js +7 -0
  46. package/dist/src/index.js.map +1 -0
  47. package/dist/src/types.d.ts +23 -0
  48. package/dist/src/types.d.ts.map +1 -0
  49. package/dist/src/types.generated.d.ts +465 -0
  50. package/dist/src/types.generated.d.ts.map +1 -0
  51. package/dist/src/types.generated.js +4 -0
  52. package/dist/src/types.generated.js.map +1 -0
  53. package/dist/src/types.js +4 -0
  54. package/dist/src/types.js.map +1 -0
  55. package/package.json +10 -7
  56. package/plurnk.md +1 -1
  57. package/src/RecordingListener.ts +0 -34
  58. package/src/Validator.ts +0 -94
  59. package/src/generated/plurnkLexer.ts +0 -467
  60. package/src/generated/plurnkParser.ts +0 -1891
  61. package/src/index.ts +0 -29
  62. package/src/types.generated.ts +0 -491
  63. package/src/types.ts +0 -30
  64. /package/{schema → dist/schema}/Agent.json +0 -0
  65. /package/{schema → dist/schema}/ChannelContent.json +0 -0
  66. /package/{schema → dist/schema}/Entry.json +0 -0
  67. /package/{schema → dist/schema}/LineMarker.json +0 -0
  68. /package/{schema → dist/schema}/Loop.json +0 -0
  69. /package/{schema → dist/schema}/MatcherBody.json +0 -0
  70. /package/{schema → dist/schema}/Params.json +0 -0
  71. /package/{schema → dist/schema}/ParsedPath.json +0 -0
  72. /package/{schema → dist/schema}/PlurnkStatement.json +0 -0
  73. /package/{schema → dist/schema}/Position.json +0 -0
  74. /package/{schema → dist/schema}/ProviderDeclaration.json +0 -0
  75. /package/{schema → dist/schema}/SendBody.json +0 -0
  76. /package/{schema → dist/schema}/Turn.json +0 -0
  77. /package/{schema → dist/schema}/Visibility.json +0 -0
package/src/Validator.ts DELETED
@@ -1,94 +0,0 @@
1
- import { Validator as CfValidator, type OutputUnit, type Schema } from "@cfworker/json-schema";
2
- import positionSchema from "../schema/Position.json" with { type: "json" };
3
- import lineMarkerSchema from "../schema/LineMarker.json" with { type: "json" };
4
- import paramsSchema from "../schema/Params.json" with { type: "json" };
5
- import channelContentSchema from "../schema/ChannelContent.json" with { type: "json" };
6
- import parsedPathSchema from "../schema/ParsedPath.json" with { type: "json" };
7
- import matcherBodySchema from "../schema/MatcherBody.json" with { type: "json" };
8
- import sendBodySchema from "../schema/SendBody.json" with { type: "json" };
9
- import entrySchema from "../schema/Entry.json" with { type: "json" };
10
- import schemeRegistrationSchema from "../schema/SchemeRegistration.json" with { type: "json" };
11
- import providerDeclarationSchema from "../schema/ProviderDeclaration.json" with { type: "json" };
12
- import visibilitySchema from "../schema/Visibility.json" with { type: "json" };
13
- import logEntrySchema from "../schema/LogEntry.json" with { type: "json" };
14
- import plurnkStatementSchema from "../schema/PlurnkStatement.json" with { type: "json" };
15
- import turnSchema from "../schema/Turn.json" with { type: "json" };
16
- import loopSchema from "../schema/Loop.json" with { type: "json" };
17
- import runSchema from "../schema/Run.json" with { type: "json" };
18
- import sessionSchema from "../schema/Session.json" with { type: "json" };
19
- import agentSchema from "../schema/Agent.json" with { type: "json" };
20
- import packetSchema from "../schema/Packet.json" with { type: "json" };
21
-
22
- export type ValidationResult = { valid: boolean; errors: OutputUnit[] };
23
-
24
- // All foundational schemas — handy when a top-level shape transitively references many others.
25
- const FOUNDATIONAL = [
26
- positionSchema, lineMarkerSchema, paramsSchema, channelContentSchema,
27
- parsedPathSchema, matcherBodySchema, sendBodySchema,
28
- plurnkStatementSchema,
29
- entrySchema, logEntrySchema,
30
- schemeRegistrationSchema, providerDeclarationSchema,
31
- visibilitySchema,
32
- packetSchema,
33
- ];
34
-
35
- export default class Validator {
36
- static #position = new CfValidator(positionSchema as Schema, "2020-12");
37
- static #lineMarker = new CfValidator(lineMarkerSchema as Schema, "2020-12");
38
- static #params = new CfValidator(paramsSchema as Schema, "2020-12");
39
- static #channelContent = new CfValidator(channelContentSchema as Schema, "2020-12");
40
- static #parsedPath = Validator.#buildWithRefs(parsedPathSchema, [paramsSchema]);
41
- static #matcherBody = new CfValidator(matcherBodySchema as Schema, "2020-12");
42
- static #sendBody = new CfValidator(sendBodySchema as Schema, "2020-12");
43
- static #entry = Validator.#buildWithRefs(entrySchema, [paramsSchema, channelContentSchema]);
44
- static #schemeRegistration = new CfValidator(schemeRegistrationSchema as Schema, "2020-12");
45
- static #providerDeclaration = new CfValidator(providerDeclarationSchema as Schema, "2020-12");
46
- static #visibility = new CfValidator(visibilitySchema as Schema, "2020-12");
47
- static #logEntry = Validator.#buildWithRefs(logEntrySchema, [paramsSchema, lineMarkerSchema]);
48
- static #plurnkStatement = Validator.#buildWithRefs(
49
- plurnkStatementSchema,
50
- [positionSchema, lineMarkerSchema, paramsSchema, parsedPathSchema, matcherBodySchema, sendBodySchema],
51
- );
52
- static #turn = Validator.#buildWithRefs(turnSchema, FOUNDATIONAL);
53
- static #loop = new CfValidator(loopSchema as Schema, "2020-12");
54
- static #run = new CfValidator(runSchema as Schema, "2020-12");
55
- static #session = Validator.#buildWithRefs(sessionSchema, [schemeRegistrationSchema]);
56
- static #agent = Validator.#buildWithRefs(agentSchema, [providerDeclarationSchema, schemeRegistrationSchema]);
57
- static #packet = Validator.#buildWithRefs(packetSchema, FOUNDATIONAL);
58
-
59
- static #buildWithRefs(mainSchema: unknown, refSchemas: unknown[]): CfValidator {
60
- const validator = new CfValidator(mainSchema as Schema, "2020-12");
61
- const mainId = (mainSchema as { $id?: string }).$id;
62
- for (const ref of refSchemas) {
63
- const refId = (ref as { $id?: string }).$id;
64
- if (refId && refId === mainId) continue;
65
- validator.addSchema(ref as Schema);
66
- }
67
- return validator;
68
- }
69
-
70
- static validatePosition(obj: unknown): ValidationResult { return Validator.#run_(Validator.#position, obj); }
71
- static validateLineMarker(obj: unknown): ValidationResult { return Validator.#run_(Validator.#lineMarker, obj); }
72
- static validateParams(obj: unknown): ValidationResult { return Validator.#run_(Validator.#params, obj); }
73
- static validateChannelContent(obj: unknown): ValidationResult { return Validator.#run_(Validator.#channelContent, obj); }
74
- static validateParsedPath(obj: unknown): ValidationResult { return Validator.#run_(Validator.#parsedPath, obj); }
75
- static validateMatcherBody(obj: unknown): ValidationResult { return Validator.#run_(Validator.#matcherBody, obj); }
76
- static validateSendBody(obj: unknown): ValidationResult { return Validator.#run_(Validator.#sendBody, obj); }
77
- static validateEntry(obj: unknown): ValidationResult { return Validator.#run_(Validator.#entry, obj); }
78
- static validateSchemeRegistration(obj: unknown): ValidationResult { return Validator.#run_(Validator.#schemeRegistration, obj); }
79
- static validateProviderDeclaration(obj: unknown): ValidationResult { return Validator.#run_(Validator.#providerDeclaration, obj); }
80
- static validateVisibility(obj: unknown): ValidationResult { return Validator.#run_(Validator.#visibility, obj); }
81
- static validateLogEntry(obj: unknown): ValidationResult { return Validator.#run_(Validator.#logEntry, obj); }
82
- static validatePlurnkStatement(obj: unknown): ValidationResult { return Validator.#run_(Validator.#plurnkStatement, obj); }
83
- static validateTurn(obj: unknown): ValidationResult { return Validator.#run_(Validator.#turn, obj); }
84
- static validateLoop(obj: unknown): ValidationResult { return Validator.#run_(Validator.#loop, obj); }
85
- static validateRun(obj: unknown): ValidationResult { return Validator.#run_(Validator.#run, obj); }
86
- static validateSession(obj: unknown): ValidationResult { return Validator.#run_(Validator.#session, obj); }
87
- static validateAgent(obj: unknown): ValidationResult { return Validator.#run_(Validator.#agent, obj); }
88
- static validatePacket(obj: unknown): ValidationResult { return Validator.#run_(Validator.#packet, obj); }
89
-
90
- static #run_(validator: CfValidator, obj: unknown): ValidationResult {
91
- const result = validator.validate(obj);
92
- return { valid: result.valid, errors: result.errors };
93
- }
94
- }
@@ -1,467 +0,0 @@
1
-
2
- import * as antlr from "antlr4ng";
3
- import { Token } from "antlr4ng";
4
-
5
-
6
- export class plurnkLexer extends antlr.Lexer {
7
- public static readonly LBRACKET = 1;
8
- public static readonly RBRACKET = 2;
9
- public static readonly LPAREN = 3;
10
- public static readonly RPAREN = 4;
11
- public static readonly L_MARKER = 5;
12
- public static readonly COLON = 6;
13
- public static readonly COMMA = 7;
14
- public static readonly INT = 8;
15
- public static readonly IDENT = 9;
16
- public static readonly TAG = 10;
17
- public static readonly PATH_TEXT = 11;
18
- public static readonly BODY_TEXT = 12;
19
- public static readonly CLOSE_TAG = 13;
20
- public static readonly TEXT = 14;
21
- public static readonly OPEN_FIND = 15;
22
- public static readonly OPEN_READ = 16;
23
- public static readonly OPEN_EDIT = 17;
24
- public static readonly OPEN_COPY = 18;
25
- public static readonly OPEN_MOVE = 19;
26
- public static readonly OPEN_SHOW = 20;
27
- public static readonly OPEN_HIDE = 21;
28
- public static readonly OPEN_SEND = 22;
29
- public static readonly OPEN_EXEC = 23;
30
- public static readonly SLOTS_WS = 24;
31
- public static readonly ST_WS = 25;
32
- public static readonly SI_WS = 26;
33
- public static readonly SD_WS = 27;
34
- public static readonly ST_COMMA = 28;
35
- public static readonly B_COLON = 29;
36
- public static readonly SLOTS = 1;
37
- public static readonly SIGNAL_TAGS = 2;
38
- public static readonly SIGNAL_INT = 3;
39
- public static readonly SIGNAL_IDENT = 4;
40
- public static readonly PATH = 5;
41
- public static readonly BODY = 6;
42
-
43
- public static readonly channelNames = [
44
- "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
45
- ];
46
-
47
- public static readonly literalNames = [
48
- null, null, null, null, null, null, null, null, null, null, null,
49
- null, null, null, null, null, null, null, null, null, null, null,
50
- null, null, null, null, null, null, "','", "':'"
51
- ];
52
-
53
- public static readonly symbolicNames = [
54
- null, "LBRACKET", "RBRACKET", "LPAREN", "RPAREN", "L_MARKER", "COLON",
55
- "COMMA", "INT", "IDENT", "TAG", "PATH_TEXT", "BODY_TEXT", "CLOSE_TAG",
56
- "TEXT", "OPEN_FIND", "OPEN_READ", "OPEN_EDIT", "OPEN_COPY", "OPEN_MOVE",
57
- "OPEN_SHOW", "OPEN_HIDE", "OPEN_SEND", "OPEN_EXEC", "SLOTS_WS",
58
- "ST_WS", "SI_WS", "SD_WS", "ST_COMMA", "B_COLON"
59
- ];
60
-
61
- public static readonly modeNames = [
62
- "DEFAULT_MODE", "SLOTS", "SIGNAL_TAGS", "SIGNAL_INT", "SIGNAL_IDENT",
63
- "PATH", "BODY",
64
- ];
65
-
66
- public static readonly ruleNames = [
67
- "SUFFIX", "L_PATTERN", "OPEN_FIND", "OPEN_READ", "OPEN_EDIT", "OPEN_COPY",
68
- "OPEN_MOVE", "OPEN_SHOW", "OPEN_HIDE", "OPEN_SEND", "OPEN_EXEC",
69
- "TEXT", "SLOTS_WS", "SLOTS_LB_TAGS", "SLOTS_LB_INT", "SLOTS_LB_IDENT",
70
- "SLOTS_LPAREN", "SLOTS_L", "SLOTS_COLON", "ST_WS", "ST_COMMA", "ST_TAG",
71
- "ST_END", "SI_WS", "SI_INT", "SI_END", "SD_WS", "SD_IDENT", "SD_END",
72
- "PATH_INNER", "PATH_END", "B_CLOSE", "B_RUN", "B_COLON",
73
- ];
74
-
75
-
76
- private openTag: string = "";
77
- private openTagLine: number = 0;
78
- private openTagColumn: number = 0;
79
-
80
- private setOpenTag(): void {
81
- this.openTag = this.text.substring(2);
82
- // Capture where the open tag began, for reference in mismatched-close-tag errors.
83
- this.openTagLine = (this as any).currentTokenStartLine;
84
- this.openTagColumn = (this as any).currentTokenColumn;
85
- }
86
-
87
- public getOpenTag(): string { return this.openTag; }
88
- public getOpenTagLine(): number { return this.openTagLine; }
89
- public getOpenTagColumn(): number { return this.openTagColumn; }
90
-
91
- private atColonCloseTag(): boolean {
92
- if (this.inputStream.LA(1) !== 0x3A /* ':' */) return false;
93
- const tag = this.openTag;
94
- if (tag.length === 0) return false;
95
- for (let i = 0; i < tag.length; i++) {
96
- if (this.inputStream.LA(i + 2) !== tag.charCodeAt(i)) return false;
97
- }
98
- const followChar = this.inputStream.LA(tag.length + 2);
99
- if (followChar > 0 && this.isIdentChar(followChar)) return false;
100
- return true;
101
- }
102
-
103
- private isIdentChar(c: number): boolean {
104
- return (c >= 0x30 && c <= 0x39) ||
105
- (c >= 0x41 && c <= 0x5A) ||
106
- (c >= 0x61 && c <= 0x7A) ||
107
- c === 0x5F;
108
- }
109
-
110
- private consumeRestOfCloseTagAfterColon(): void {
111
- const remaining = this.openTag.length - 1;
112
- for (let i = 0; i < remaining; i++) {
113
- this.inputStream.consume();
114
- }
115
- }
116
-
117
- private isOpKeywordAfterLtLt(): boolean {
118
- const ops = ["FIND", "READ", "EDIT", "COPY", "MOVE", "SHOW", "HIDE", "SEND", "EXEC"];
119
- for (const op of ops) {
120
- let matches = true;
121
- for (let i = 0; i < op.length; i++) {
122
- if (this.inputStream.LA(i + 1) !== op.charCodeAt(i)) {
123
- matches = false;
124
- break;
125
- }
126
- }
127
- if (matches) return true;
128
- }
129
- return false;
130
- }
131
-
132
- private isSendOp(): boolean { return this.openTag.startsWith("SEND"); }
133
- private isExecOp(): boolean { return this.openTag.startsWith("EXEC"); }
134
-
135
-
136
- public constructor(input: antlr.CharStream) {
137
- super(input);
138
- this.interpreter = new antlr.LexerATNSimulator(this, plurnkLexer._ATN, plurnkLexer.decisionsToDFA, new antlr.PredictionContextCache());
139
- }
140
-
141
- public get grammarFileName(): string { return "plurnkLexer.g4"; }
142
-
143
- public get literalNames(): (string | null)[] { return plurnkLexer.literalNames; }
144
- public get symbolicNames(): (string | null)[] { return plurnkLexer.symbolicNames; }
145
- public get ruleNames(): string[] { return plurnkLexer.ruleNames; }
146
-
147
- public get serializedATN(): number[] { return plurnkLexer._serializedATN; }
148
-
149
- public get channelNames(): string[] { return plurnkLexer.channelNames; }
150
-
151
- public get modeNames(): string[] { return plurnkLexer.modeNames; }
152
-
153
- public override action(localContext: antlr.ParserRuleContext | null, ruleIndex: number, actionIndex: number): void {
154
- switch (ruleIndex) {
155
- case 2:
156
- this.OPEN_FIND_action(localContext, actionIndex);
157
- break;
158
- case 3:
159
- this.OPEN_READ_action(localContext, actionIndex);
160
- break;
161
- case 4:
162
- this.OPEN_EDIT_action(localContext, actionIndex);
163
- break;
164
- case 5:
165
- this.OPEN_COPY_action(localContext, actionIndex);
166
- break;
167
- case 6:
168
- this.OPEN_MOVE_action(localContext, actionIndex);
169
- break;
170
- case 7:
171
- this.OPEN_SHOW_action(localContext, actionIndex);
172
- break;
173
- case 8:
174
- this.OPEN_HIDE_action(localContext, actionIndex);
175
- break;
176
- case 9:
177
- this.OPEN_SEND_action(localContext, actionIndex);
178
- break;
179
- case 10:
180
- this.OPEN_EXEC_action(localContext, actionIndex);
181
- break;
182
- case 31:
183
- this.B_CLOSE_action(localContext, actionIndex);
184
- break;
185
- }
186
- }
187
- private OPEN_FIND_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
188
- switch (actionIndex) {
189
- case 0:
190
- this.setOpenTag();
191
- break;
192
- }
193
- }
194
- private OPEN_READ_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
195
- switch (actionIndex) {
196
- case 1:
197
- this.setOpenTag();
198
- break;
199
- }
200
- }
201
- private OPEN_EDIT_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
202
- switch (actionIndex) {
203
- case 2:
204
- this.setOpenTag();
205
- break;
206
- }
207
- }
208
- private OPEN_COPY_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
209
- switch (actionIndex) {
210
- case 3:
211
- this.setOpenTag();
212
- break;
213
- }
214
- }
215
- private OPEN_MOVE_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
216
- switch (actionIndex) {
217
- case 4:
218
- this.setOpenTag();
219
- break;
220
- }
221
- }
222
- private OPEN_SHOW_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
223
- switch (actionIndex) {
224
- case 5:
225
- this.setOpenTag();
226
- break;
227
- }
228
- }
229
- private OPEN_HIDE_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
230
- switch (actionIndex) {
231
- case 6:
232
- this.setOpenTag();
233
- break;
234
- }
235
- }
236
- private OPEN_SEND_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
237
- switch (actionIndex) {
238
- case 7:
239
- this.setOpenTag();
240
- break;
241
- }
242
- }
243
- private OPEN_EXEC_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
244
- switch (actionIndex) {
245
- case 8:
246
- this.setOpenTag();
247
- break;
248
- }
249
- }
250
- private B_CLOSE_action(localContext: antlr.ParserRuleContext | null, actionIndex: number): void {
251
- switch (actionIndex) {
252
- case 9:
253
- this.consumeRestOfCloseTagAfterColon();
254
- break;
255
- }
256
- }
257
- public override sempred(localContext: antlr.ParserRuleContext | null, ruleIndex: number, predIndex: number): boolean {
258
- switch (ruleIndex) {
259
- case 11:
260
- return this.TEXT_sempred(localContext, predIndex);
261
- case 13:
262
- return this.SLOTS_LB_TAGS_sempred(localContext, predIndex);
263
- case 14:
264
- return this.SLOTS_LB_INT_sempred(localContext, predIndex);
265
- case 15:
266
- return this.SLOTS_LB_IDENT_sempred(localContext, predIndex);
267
- case 31:
268
- return this.B_CLOSE_sempred(localContext, predIndex);
269
- }
270
- return true;
271
- }
272
- private TEXT_sempred(localContext: antlr.ParserRuleContext | null, predIndex: number): boolean {
273
- switch (predIndex) {
274
- case 0:
275
- return !this.isOpKeywordAfterLtLt() ;
276
- }
277
- return true;
278
- }
279
- private SLOTS_LB_TAGS_sempred(localContext: antlr.ParserRuleContext | null, predIndex: number): boolean {
280
- switch (predIndex) {
281
- case 1:
282
- return !this.isSendOp() && !this.isExecOp() ;
283
- }
284
- return true;
285
- }
286
- private SLOTS_LB_INT_sempred(localContext: antlr.ParserRuleContext | null, predIndex: number): boolean {
287
- switch (predIndex) {
288
- case 2:
289
- return this.isSendOp() ;
290
- }
291
- return true;
292
- }
293
- private SLOTS_LB_IDENT_sempred(localContext: antlr.ParserRuleContext | null, predIndex: number): boolean {
294
- switch (predIndex) {
295
- case 3:
296
- return this.isExecOp() ;
297
- }
298
- return true;
299
- }
300
- private B_CLOSE_sempred(localContext: antlr.ParserRuleContext | null, predIndex: number): boolean {
301
- switch (predIndex) {
302
- case 4:
303
- return this.atColonCloseTag() ;
304
- }
305
- return true;
306
- }
307
-
308
- public static readonly _serializedATN: number[] = [
309
- 4,0,29,379,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,6,-1,2,0,7,0,2,1,7,1,2,
310
- 2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,
311
- 10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,
312
- 16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,2,21,7,21,2,22,7,22,2,
313
- 23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,
314
- 29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,1,0,4,0,77,8,0,11,0,12,
315
- 0,78,1,1,1,1,3,1,83,8,1,1,1,4,1,86,8,1,11,1,12,1,87,1,1,1,1,3,1,
316
- 92,8,1,1,1,4,1,95,8,1,11,1,12,1,96,3,1,99,8,1,1,1,1,1,1,2,1,2,1,
317
- 2,1,2,1,2,1,2,1,2,1,2,3,2,111,8,2,1,2,1,2,1,2,1,2,1,3,1,3,1,3,1,
318
- 3,1,3,1,3,1,3,1,3,3,3,125,8,3,1,3,1,3,1,3,1,3,1,4,1,4,1,4,1,4,1,
319
- 4,1,4,1,4,1,4,3,4,139,8,4,1,4,1,4,1,4,1,4,1,5,1,5,1,5,1,5,1,5,1,
320
- 5,1,5,1,5,3,5,153,8,5,1,5,1,5,1,5,1,5,1,6,1,6,1,6,1,6,1,6,1,6,1,
321
- 6,1,6,3,6,167,8,6,1,6,1,6,1,6,1,6,1,7,1,7,1,7,1,7,1,7,1,7,1,7,1,
322
- 7,3,7,181,8,7,1,7,1,7,1,7,1,7,1,8,1,8,1,8,1,8,1,8,1,8,1,8,1,8,3,
323
- 8,195,8,8,1,8,1,8,1,8,1,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,209,
324
- 8,9,1,9,1,9,1,9,1,9,1,10,1,10,1,10,1,10,1,10,1,10,1,10,1,10,3,10,
325
- 223,8,10,1,10,1,10,1,10,1,10,1,11,1,11,1,11,1,11,1,11,1,11,1,11,
326
- 4,11,236,8,11,11,11,12,11,237,1,12,4,12,241,8,12,11,12,12,12,242,
327
- 1,12,1,12,1,13,1,13,1,13,1,13,1,13,1,13,1,14,1,14,1,14,1,14,1,14,
328
- 1,14,1,15,1,15,1,15,1,15,1,15,1,15,1,16,1,16,1,16,1,16,1,16,1,17,
329
- 1,17,1,17,1,17,1,18,1,18,1,18,1,18,1,18,1,19,4,19,280,8,19,11,19,
330
- 12,19,281,1,19,1,19,1,20,1,20,1,20,1,20,1,21,1,21,1,21,4,21,293,
331
- 8,21,11,21,12,21,294,1,21,1,21,1,22,1,22,1,22,1,22,1,22,1,23,4,23,
332
- 305,8,23,11,23,12,23,306,1,23,1,23,1,24,3,24,312,8,24,1,24,4,24,
333
- 315,8,24,11,24,12,24,316,1,24,1,24,1,25,1,25,1,25,1,25,1,25,1,26,
334
- 4,26,327,8,26,11,26,12,26,328,1,26,1,26,1,27,1,27,5,27,335,8,27,
335
- 10,27,12,27,338,9,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,29,1,29,
336
- 1,29,4,29,350,8,29,11,29,12,29,351,1,29,1,29,1,30,1,30,1,30,1,30,
337
- 1,30,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,31,1,32,4,32,370,8,32,
338
- 11,32,12,32,371,1,32,1,32,1,33,1,33,1,33,1,33,0,0,34,7,0,9,0,11,
339
- 15,13,16,15,17,17,18,19,19,21,20,23,21,25,22,27,23,29,14,31,24,33,
340
- 0,35,0,37,0,39,0,41,0,43,0,45,25,47,28,49,0,51,0,53,26,55,0,57,0,
341
- 59,27,61,0,63,0,65,0,67,0,69,0,71,0,73,29,7,0,1,2,3,4,5,6,10,4,0,
342
- 48,57,65,90,95,95,97,122,1,0,48,57,1,0,60,60,3,0,9,10,13,13,32,32,
343
- 2,0,9,9,32,32,6,0,9,10,13,13,32,32,44,44,60,60,93,93,3,0,65,90,95,
344
- 95,97,122,6,0,43,43,45,46,48,57,65,90,95,95,97,122,4,0,10,10,13,
345
- 13,41,41,60,60,1,0,58,58,400,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,
346
- 0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,
347
- 0,0,0,27,1,0,0,0,0,29,1,0,0,0,1,31,1,0,0,0,1,33,1,0,0,0,1,35,1,0,
348
- 0,0,1,37,1,0,0,0,1,39,1,0,0,0,1,41,1,0,0,0,1,43,1,0,0,0,2,45,1,0,
349
- 0,0,2,47,1,0,0,0,2,49,1,0,0,0,2,51,1,0,0,0,3,53,1,0,0,0,3,55,1,0,
350
- 0,0,3,57,1,0,0,0,4,59,1,0,0,0,4,61,1,0,0,0,4,63,1,0,0,0,5,65,1,0,
351
- 0,0,5,67,1,0,0,0,6,69,1,0,0,0,6,71,1,0,0,0,6,73,1,0,0,0,7,76,1,0,
352
- 0,0,9,80,1,0,0,0,11,102,1,0,0,0,13,116,1,0,0,0,15,130,1,0,0,0,17,
353
- 144,1,0,0,0,19,158,1,0,0,0,21,172,1,0,0,0,23,186,1,0,0,0,25,200,
354
- 1,0,0,0,27,214,1,0,0,0,29,235,1,0,0,0,31,240,1,0,0,0,33,246,1,0,
355
- 0,0,35,252,1,0,0,0,37,258,1,0,0,0,39,264,1,0,0,0,41,269,1,0,0,0,
356
- 43,273,1,0,0,0,45,279,1,0,0,0,47,285,1,0,0,0,49,292,1,0,0,0,51,298,
357
- 1,0,0,0,53,304,1,0,0,0,55,311,1,0,0,0,57,320,1,0,0,0,59,326,1,0,
358
- 0,0,61,332,1,0,0,0,63,341,1,0,0,0,65,349,1,0,0,0,67,355,1,0,0,0,
359
- 69,360,1,0,0,0,71,369,1,0,0,0,73,375,1,0,0,0,75,77,7,0,0,0,76,75,
360
- 1,0,0,0,77,78,1,0,0,0,78,76,1,0,0,0,78,79,1,0,0,0,79,8,1,0,0,0,80,
361
- 82,5,60,0,0,81,83,5,45,0,0,82,81,1,0,0,0,82,83,1,0,0,0,83,85,1,0,
362
- 0,0,84,86,7,1,0,0,85,84,1,0,0,0,86,87,1,0,0,0,87,85,1,0,0,0,87,88,
363
- 1,0,0,0,88,98,1,0,0,0,89,91,5,45,0,0,90,92,5,45,0,0,91,90,1,0,0,
364
- 0,91,92,1,0,0,0,92,94,1,0,0,0,93,95,7,1,0,0,94,93,1,0,0,0,95,96,
365
- 1,0,0,0,96,94,1,0,0,0,96,97,1,0,0,0,97,99,1,0,0,0,98,89,1,0,0,0,
366
- 98,99,1,0,0,0,99,100,1,0,0,0,100,101,5,62,0,0,101,10,1,0,0,0,102,
367
- 103,5,60,0,0,103,104,5,60,0,0,104,105,5,70,0,0,105,106,5,73,0,0,
368
- 106,107,5,78,0,0,107,108,5,68,0,0,108,110,1,0,0,0,109,111,3,7,0,
369
- 0,110,109,1,0,0,0,110,111,1,0,0,0,111,112,1,0,0,0,112,113,6,2,0,
370
- 0,113,114,1,0,0,0,114,115,6,2,1,0,115,12,1,0,0,0,116,117,5,60,0,
371
- 0,117,118,5,60,0,0,118,119,5,82,0,0,119,120,5,69,0,0,120,121,5,65,
372
- 0,0,121,122,5,68,0,0,122,124,1,0,0,0,123,125,3,7,0,0,124,123,1,0,
373
- 0,0,124,125,1,0,0,0,125,126,1,0,0,0,126,127,6,3,2,0,127,128,1,0,
374
- 0,0,128,129,6,3,1,0,129,14,1,0,0,0,130,131,5,60,0,0,131,132,5,60,
375
- 0,0,132,133,5,69,0,0,133,134,5,68,0,0,134,135,5,73,0,0,135,136,5,
376
- 84,0,0,136,138,1,0,0,0,137,139,3,7,0,0,138,137,1,0,0,0,138,139,1,
377
- 0,0,0,139,140,1,0,0,0,140,141,6,4,3,0,141,142,1,0,0,0,142,143,6,
378
- 4,1,0,143,16,1,0,0,0,144,145,5,60,0,0,145,146,5,60,0,0,146,147,5,
379
- 67,0,0,147,148,5,79,0,0,148,149,5,80,0,0,149,150,5,89,0,0,150,152,
380
- 1,0,0,0,151,153,3,7,0,0,152,151,1,0,0,0,152,153,1,0,0,0,153,154,
381
- 1,0,0,0,154,155,6,5,4,0,155,156,1,0,0,0,156,157,6,5,1,0,157,18,1,
382
- 0,0,0,158,159,5,60,0,0,159,160,5,60,0,0,160,161,5,77,0,0,161,162,
383
- 5,79,0,0,162,163,5,86,0,0,163,164,5,69,0,0,164,166,1,0,0,0,165,167,
384
- 3,7,0,0,166,165,1,0,0,0,166,167,1,0,0,0,167,168,1,0,0,0,168,169,
385
- 6,6,5,0,169,170,1,0,0,0,170,171,6,6,1,0,171,20,1,0,0,0,172,173,5,
386
- 60,0,0,173,174,5,60,0,0,174,175,5,83,0,0,175,176,5,72,0,0,176,177,
387
- 5,79,0,0,177,178,5,87,0,0,178,180,1,0,0,0,179,181,3,7,0,0,180,179,
388
- 1,0,0,0,180,181,1,0,0,0,181,182,1,0,0,0,182,183,6,7,6,0,183,184,
389
- 1,0,0,0,184,185,6,7,1,0,185,22,1,0,0,0,186,187,5,60,0,0,187,188,
390
- 5,60,0,0,188,189,5,72,0,0,189,190,5,73,0,0,190,191,5,68,0,0,191,
391
- 192,5,69,0,0,192,194,1,0,0,0,193,195,3,7,0,0,194,193,1,0,0,0,194,
392
- 195,1,0,0,0,195,196,1,0,0,0,196,197,6,8,7,0,197,198,1,0,0,0,198,
393
- 199,6,8,1,0,199,24,1,0,0,0,200,201,5,60,0,0,201,202,5,60,0,0,202,
394
- 203,5,83,0,0,203,204,5,69,0,0,204,205,5,78,0,0,205,206,5,68,0,0,
395
- 206,208,1,0,0,0,207,209,3,7,0,0,208,207,1,0,0,0,208,209,1,0,0,0,
396
- 209,210,1,0,0,0,210,211,6,9,8,0,211,212,1,0,0,0,212,213,6,9,1,0,
397
- 213,26,1,0,0,0,214,215,5,60,0,0,215,216,5,60,0,0,216,217,5,69,0,
398
- 0,217,218,5,88,0,0,218,219,5,69,0,0,219,220,5,67,0,0,220,222,1,0,
399
- 0,0,221,223,3,7,0,0,222,221,1,0,0,0,222,223,1,0,0,0,223,224,1,0,
400
- 0,0,224,225,6,10,9,0,225,226,1,0,0,0,226,227,6,10,1,0,227,28,1,0,
401
- 0,0,228,229,5,60,0,0,229,230,5,60,0,0,230,231,1,0,0,0,231,236,4,
402
- 11,0,0,232,233,5,60,0,0,233,236,8,2,0,0,234,236,8,2,0,0,235,228,
403
- 1,0,0,0,235,232,1,0,0,0,235,234,1,0,0,0,236,237,1,0,0,0,237,235,
404
- 1,0,0,0,237,238,1,0,0,0,238,30,1,0,0,0,239,241,7,3,0,0,240,239,1,
405
- 0,0,0,241,242,1,0,0,0,242,240,1,0,0,0,242,243,1,0,0,0,243,244,1,
406
- 0,0,0,244,245,6,12,10,0,245,32,1,0,0,0,246,247,5,91,0,0,247,248,
407
- 4,13,1,0,248,249,1,0,0,0,249,250,6,13,11,0,250,251,6,13,12,0,251,
408
- 34,1,0,0,0,252,253,5,91,0,0,253,254,4,14,2,0,254,255,1,0,0,0,255,
409
- 256,6,14,11,0,256,257,6,14,13,0,257,36,1,0,0,0,258,259,5,91,0,0,
410
- 259,260,4,15,3,0,260,261,1,0,0,0,261,262,6,15,11,0,262,263,6,15,
411
- 14,0,263,38,1,0,0,0,264,265,5,40,0,0,265,266,1,0,0,0,266,267,6,16,
412
- 15,0,267,268,6,16,16,0,268,40,1,0,0,0,269,270,3,9,1,0,270,271,1,
413
- 0,0,0,271,272,6,17,17,0,272,42,1,0,0,0,273,274,5,58,0,0,274,275,
414
- 1,0,0,0,275,276,6,18,18,0,276,277,6,18,19,0,277,44,1,0,0,0,278,280,
415
- 7,4,0,0,279,278,1,0,0,0,280,281,1,0,0,0,281,279,1,0,0,0,281,282,
416
- 1,0,0,0,282,283,1,0,0,0,283,284,6,19,10,0,284,46,1,0,0,0,285,286,
417
- 5,44,0,0,286,287,1,0,0,0,287,288,6,20,20,0,288,48,1,0,0,0,289,293,
418
- 8,5,0,0,290,291,5,60,0,0,291,293,8,5,0,0,292,289,1,0,0,0,292,290,
419
- 1,0,0,0,293,294,1,0,0,0,294,292,1,0,0,0,294,295,1,0,0,0,295,296,
420
- 1,0,0,0,296,297,6,21,21,0,297,50,1,0,0,0,298,299,5,93,0,0,299,300,
421
- 1,0,0,0,300,301,6,22,22,0,301,302,6,22,1,0,302,52,1,0,0,0,303,305,
422
- 7,4,0,0,304,303,1,0,0,0,305,306,1,0,0,0,306,304,1,0,0,0,306,307,
423
- 1,0,0,0,307,308,1,0,0,0,308,309,6,23,10,0,309,54,1,0,0,0,310,312,
424
- 5,45,0,0,311,310,1,0,0,0,311,312,1,0,0,0,312,314,1,0,0,0,313,315,
425
- 7,1,0,0,314,313,1,0,0,0,315,316,1,0,0,0,316,314,1,0,0,0,316,317,
426
- 1,0,0,0,317,318,1,0,0,0,318,319,6,24,23,0,319,56,1,0,0,0,320,321,
427
- 5,93,0,0,321,322,1,0,0,0,322,323,6,25,22,0,323,324,6,25,1,0,324,
428
- 58,1,0,0,0,325,327,7,4,0,0,326,325,1,0,0,0,327,328,1,0,0,0,328,326,
429
- 1,0,0,0,328,329,1,0,0,0,329,330,1,0,0,0,330,331,6,26,10,0,331,60,
430
- 1,0,0,0,332,336,7,6,0,0,333,335,7,7,0,0,334,333,1,0,0,0,335,338,
431
- 1,0,0,0,336,334,1,0,0,0,336,337,1,0,0,0,337,339,1,0,0,0,338,336,
432
- 1,0,0,0,339,340,6,27,24,0,340,62,1,0,0,0,341,342,5,93,0,0,342,343,
433
- 1,0,0,0,343,344,6,28,22,0,344,345,6,28,1,0,345,64,1,0,0,0,346,350,
434
- 8,8,0,0,347,348,5,60,0,0,348,350,8,8,0,0,349,346,1,0,0,0,349,347,
435
- 1,0,0,0,350,351,1,0,0,0,351,349,1,0,0,0,351,352,1,0,0,0,352,353,
436
- 1,0,0,0,353,354,6,29,25,0,354,66,1,0,0,0,355,356,5,41,0,0,356,357,
437
- 1,0,0,0,357,358,6,30,26,0,358,359,6,30,1,0,359,68,1,0,0,0,360,361,
438
- 4,31,4,0,361,362,5,58,0,0,362,363,9,0,0,0,363,364,6,31,27,0,364,
439
- 365,1,0,0,0,365,366,6,31,28,0,366,367,6,31,29,0,367,70,1,0,0,0,368,
440
- 370,8,9,0,0,369,368,1,0,0,0,370,371,1,0,0,0,371,369,1,0,0,0,371,
441
- 372,1,0,0,0,372,373,1,0,0,0,373,374,6,32,30,0,374,72,1,0,0,0,375,
442
- 376,5,58,0,0,376,377,1,0,0,0,377,378,6,33,30,0,378,74,1,0,0,0,36,
443
- 0,1,2,3,4,5,6,78,82,87,91,96,98,110,124,138,152,166,180,194,208,
444
- 222,235,237,242,281,292,294,306,311,316,328,336,349,351,371,31,1,
445
- 2,0,2,1,0,1,3,1,1,4,2,1,5,3,1,6,4,1,7,5,1,8,6,1,9,7,1,10,8,6,0,0,
446
- 7,1,0,2,2,0,2,3,0,2,4,0,7,3,0,2,5,0,7,5,0,7,6,0,2,6,0,7,7,0,7,10,
447
- 0,7,2,0,7,8,0,7,9,0,7,11,0,7,4,0,1,31,9,7,13,0,2,0,0,7,12,0
448
- ];
449
-
450
- private static __ATN: antlr.ATN;
451
- public static get _ATN(): antlr.ATN {
452
- if (!plurnkLexer.__ATN) {
453
- plurnkLexer.__ATN = new antlr.ATNDeserializer().deserialize(plurnkLexer._serializedATN);
454
- }
455
-
456
- return plurnkLexer.__ATN;
457
- }
458
-
459
-
460
- private static readonly vocabulary = new antlr.Vocabulary(plurnkLexer.literalNames, plurnkLexer.symbolicNames, []);
461
-
462
- public override get vocabulary(): antlr.Vocabulary {
463
- return plurnkLexer.vocabulary;
464
- }
465
-
466
- private static readonly decisionsToDFA = plurnkLexer._ATN.decisionToState.map( (ds: antlr.DecisionState, index: number) => new antlr.DFA(ds, index) );
467
- }