circuitscript 0.0.22 → 0.0.25

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 (180) hide show
  1. package/dist/cjs/BaseVisitor.js +487 -0
  2. package/dist/cjs/SemanticTokenVisitor.js +218 -0
  3. package/dist/cjs/SymbolValidatorVisitor.js +233 -0
  4. package/dist/cjs/antlr/CircuitScriptLexer.js +302 -0
  5. package/dist/cjs/antlr/CircuitScriptParser.js +5128 -0
  6. package/dist/cjs/antlr/CircuitScriptVisitor.js +7 -0
  7. package/dist/cjs/draw_symbols.js +819 -0
  8. package/dist/cjs/execute.js +778 -0
  9. package/{src/export.ts → dist/cjs/export.js} +34 -56
  10. package/dist/cjs/fonts.js +4 -0
  11. package/dist/cjs/geometry.js +450 -0
  12. package/dist/cjs/globals.js +60 -0
  13. package/dist/cjs/helpers.js +269 -0
  14. package/dist/cjs/index.js +31 -0
  15. package/{src/layout.ts → dist/cjs/layout.js} +421 -1002
  16. package/dist/cjs/lexer.js +111 -0
  17. package/dist/cjs/logger.js +17 -0
  18. package/dist/cjs/main.js +82 -0
  19. package/dist/cjs/objects/ClassComponent.js +145 -0
  20. package/dist/cjs/objects/ExecutionScope.js +135 -0
  21. package/dist/cjs/objects/Frame.js +22 -0
  22. package/{src/objects/Net.ts → dist/cjs/objects/Net.js} +9 -24
  23. package/dist/cjs/objects/ParamDefinition.js +42 -0
  24. package/dist/cjs/objects/PinDefinition.js +31 -0
  25. package/dist/cjs/objects/PinTypes.js +11 -0
  26. package/dist/cjs/objects/Wire.js +9 -0
  27. package/dist/cjs/objects/types.js +15 -0
  28. package/dist/cjs/parser.js +70 -0
  29. package/dist/cjs/regenerate-tests.js +23 -0
  30. package/dist/cjs/render.js +155 -0
  31. package/{src/server.ts → dist/cjs/server.js} +15 -21
  32. package/dist/cjs/sizing.js +105 -0
  33. package/{src/utils.ts → dist/cjs/utils.js} +25 -35
  34. package/dist/cjs/validate.js +81 -0
  35. package/dist/cjs/visitor.js +844 -0
  36. package/dist/esm/BaseVisitor.mjs +488 -0
  37. package/dist/esm/SemanticTokenVisitor.mjs +215 -0
  38. package/dist/esm/SymbolValidatorVisitor.mjs +222 -0
  39. package/dist/esm/antlr/CircuitScriptLexer.mjs +276 -0
  40. package/dist/esm/antlr/CircuitScriptParser.mjs +5038 -0
  41. package/{build/src/antlr/CircuitScriptVisitor.js → dist/esm/antlr/CircuitScriptVisitor.mjs} +8 -3
  42. package/{build/src/draw_symbols.js → dist/esm/draw_symbols.mjs} +78 -33
  43. package/{build/src/execute.js → dist/esm/execute.mjs} +59 -60
  44. package/{build/src/export.js → dist/esm/export.mjs} +2 -2
  45. package/{build/src/geometry.js → dist/esm/geometry.mjs} +31 -15
  46. package/dist/esm/helpers.mjs +252 -0
  47. package/dist/esm/index.mjs +15 -0
  48. package/{build/src/layout.js → dist/esm/layout.mjs} +19 -11
  49. package/{build/src/lexer.js → dist/esm/lexer.mjs} +10 -10
  50. package/{build/src/main.js → dist/esm/main.mjs} +9 -14
  51. package/{build/src/objects/ClassComponent.js → dist/esm/objects/ClassComponent.mjs} +6 -3
  52. package/{build/src/objects/ExecutionScope.js → dist/esm/objects/ExecutionScope.mjs} +1 -0
  53. package/{build/src/objects/PinDefinition.js → dist/esm/objects/PinDefinition.mjs} +1 -1
  54. package/dist/esm/objects/types.mjs +12 -0
  55. package/dist/esm/parser.mjs +64 -0
  56. package/{build/src/regenerate-tests.js → dist/esm/regenerate-tests.mjs} +1 -1
  57. package/{build/src/render.js → dist/esm/render.mjs} +7 -24
  58. package/{build/src/sizing.js → dist/esm/sizing.mjs} +22 -8
  59. package/{src/main.ts → dist/esm/validate.mjs} +31 -62
  60. package/dist/esm/visitor.mjs +838 -0
  61. package/dist/types/BaseVisitor.d.ts +69 -0
  62. package/dist/types/SemanticTokenVisitor.d.ts +36 -0
  63. package/dist/types/SymbolValidatorVisitor.d.ts +61 -0
  64. package/{build/src → dist/types}/antlr/CircuitScriptLexer.d.ts +28 -27
  65. package/dist/types/antlr/CircuitScriptParser.d.ts +719 -0
  66. package/{build/src → dist/types}/antlr/CircuitScriptVisitor.d.ts +69 -59
  67. package/{build/src → dist/types}/draw_symbols.d.ts +11 -2
  68. package/{build/src → dist/types}/execute.d.ts +6 -9
  69. package/{build/src → dist/types}/geometry.d.ts +5 -1
  70. package/dist/types/helpers.d.ts +40 -0
  71. package/dist/types/index.d.ts +15 -0
  72. package/{build/src → dist/types}/layout.d.ts +10 -10
  73. package/{build/src → dist/types}/lexer.d.ts +2 -2
  74. package/{build/src → dist/types}/objects/ClassComponent.d.ts +2 -2
  75. package/{build/src → dist/types}/objects/ExecutionScope.d.ts +4 -1
  76. package/{build/src → dist/types}/objects/PinDefinition.d.ts +1 -1
  77. package/{build/src → dist/types}/objects/types.d.ts +5 -0
  78. package/dist/types/parser.d.ts +25 -0
  79. package/{build/src → dist/types}/render.d.ts +1 -1
  80. package/{build/src → dist/types}/sizing.d.ts +3 -1
  81. package/dist/types/validate.d.ts +2 -0
  82. package/dist/types/visitor.d.ts +80 -0
  83. package/libs/lib.cst +0 -2
  84. package/package.json +38 -15
  85. package/.editorconfig +0 -15
  86. package/.eslintignore +0 -1
  87. package/.eslintrc.json +0 -27
  88. package/.gitlab-ci.yml +0 -81
  89. package/.prettierignore +0 -8
  90. package/.prettierrc +0 -16
  91. package/__tests__/expectedResults.ts +0 -657
  92. package/__tests__/helpers.ts +0 -82
  93. package/__tests__/parseScripts.ts +0 -593
  94. package/__tests__/renderData/script1.cst +0 -58
  95. package/__tests__/renderData/script1.cst.svg +0 -1
  96. package/__tests__/renderData/script2.cst +0 -16
  97. package/__tests__/renderData/script2.cst.svg +0 -1
  98. package/__tests__/renderData/script3.cst +0 -30
  99. package/__tests__/renderData/script3.cst.svg +0 -1
  100. package/__tests__/renderData/script4.cst +0 -54
  101. package/__tests__/renderData/script4.cst.svg +0 -1
  102. package/__tests__/renderData/script5.cst +0 -23
  103. package/__tests__/renderData/script5.cst.svg +0 -1
  104. package/__tests__/renderData/script6.cst +0 -28
  105. package/__tests__/renderData/script6.cst.svg +0 -1
  106. package/__tests__/renderData/script7.cst +0 -26
  107. package/__tests__/renderData/script7.cst.svg +0 -1
  108. package/__tests__/renderData/script8.cst +0 -37
  109. package/__tests__/renderData/script8.cst.svg +0 -1
  110. package/__tests__/testCLI.ts +0 -68
  111. package/__tests__/testMathOps.ts +0 -36
  112. package/__tests__/testMergeWires.ts +0 -141
  113. package/__tests__/testParse.ts +0 -263
  114. package/__tests__/testRender.ts +0 -38
  115. package/build/src/antlr/CircuitScriptLexer.js +0 -287
  116. package/build/src/antlr/CircuitScriptParser.d.ts +0 -674
  117. package/build/src/antlr/CircuitScriptParser.js +0 -4841
  118. package/build/src/helpers.d.ts +0 -1
  119. package/build/src/helpers.js +0 -73
  120. package/build/src/objects/types.js +0 -6
  121. package/build/src/parser.js +0 -69
  122. package/build/src/visitor.d.ts +0 -133
  123. package/build/src/visitor.js +0 -1154
  124. package/documentation.md +0 -238
  125. package/examples/example_arduino_uno.cst +0 -1146
  126. package/examples/example_garden_pump.cst +0 -567
  127. package/examples/lib.cst +0 -185
  128. package/jest.config.js +0 -23
  129. package/refresh.html +0 -42
  130. package/server.cjs +0 -50
  131. package/src/antlr/CircuitScript.g4 +0 -209
  132. package/src/antlr/CircuitScriptLexer.ts +0 -317
  133. package/src/antlr/CircuitScriptParser.ts +0 -4979
  134. package/src/antlr/CircuitScriptVisitor.ts +0 -420
  135. package/src/draw_symbols.ts +0 -1085
  136. package/src/execute.ts +0 -1227
  137. package/src/fonts.ts +0 -1
  138. package/src/geometry.ts +0 -638
  139. package/src/globals.ts +0 -67
  140. package/src/helpers.ts +0 -114
  141. package/src/lexer.ts +0 -151
  142. package/src/logger.ts +0 -17
  143. package/src/objects/ClassComponent.ts +0 -223
  144. package/src/objects/ExecutionScope.ts +0 -201
  145. package/src/objects/Frame.ts +0 -20
  146. package/src/objects/ParamDefinition.ts +0 -49
  147. package/src/objects/PinDefinition.ts +0 -49
  148. package/src/objects/PinTypes.ts +0 -7
  149. package/src/objects/Wire.ts +0 -19
  150. package/src/objects/types.ts +0 -66
  151. package/src/parser.ts +0 -106
  152. package/src/regenerate-tests.ts +0 -25
  153. package/src/render.ts +0 -260
  154. package/src/sizing.ts +0 -96
  155. package/src/visitor.ts +0 -1691
  156. package/tsconfig.json +0 -27
  157. package/tsconfig.release.json +0 -8
  158. /package/{build/src/fonts.js → dist/esm/fonts.mjs} +0 -0
  159. /package/{build/src/globals.js → dist/esm/globals.mjs} +0 -0
  160. /package/{build/src/logger.js → dist/esm/logger.mjs} +0 -0
  161. /package/{build/src/objects/Frame.js → dist/esm/objects/Frame.mjs} +0 -0
  162. /package/{build/src/objects/Net.js → dist/esm/objects/Net.mjs} +0 -0
  163. /package/{build/src/objects/ParamDefinition.js → dist/esm/objects/ParamDefinition.mjs} +0 -0
  164. /package/{build/src/objects/PinTypes.js → dist/esm/objects/PinTypes.mjs} +0 -0
  165. /package/{build/src/objects/Wire.js → dist/esm/objects/Wire.mjs} +0 -0
  166. /package/{build/src/server.js → dist/esm/server.mjs} +0 -0
  167. /package/{build/src/utils.js → dist/esm/utils.mjs} +0 -0
  168. /package/{build/src → dist/types}/export.d.ts +0 -0
  169. /package/{build/src → dist/types}/fonts.d.ts +0 -0
  170. /package/{build/src → dist/types}/globals.d.ts +0 -0
  171. /package/{build/src → dist/types}/logger.d.ts +0 -0
  172. /package/{build/src → dist/types}/main.d.ts +0 -0
  173. /package/{build/src → dist/types}/objects/Frame.d.ts +0 -0
  174. /package/{build/src → dist/types}/objects/Net.d.ts +0 -0
  175. /package/{build/src → dist/types}/objects/ParamDefinition.d.ts +0 -0
  176. /package/{build/src → dist/types}/objects/PinTypes.d.ts +0 -0
  177. /package/{build/src → dist/types}/objects/Wire.d.ts +0 -0
  178. /package/{build/src → dist/types}/regenerate-tests.d.ts +0 -0
  179. /package/{build/src → dist/types}/server.d.ts +0 -0
  180. /package/{build/src → dist/types}/utils.d.ts +0 -0
@@ -0,0 +1,222 @@
1
+ import { BaseVisitor } from "./BaseVisitor.mjs";
2
+ import { ParseSymbolType } from "./objects/types.mjs";
3
+ export class SymbolValidatorVisitor extends BaseVisitor {
4
+ symbolTable = new SymbolTable();
5
+ addSymbolVariable(name, value, executor = null) {
6
+ const useExecutor = executor === null ? this.getExecutor() : executor;
7
+ this.symbolTable.addVariable(useExecutor, name, value);
8
+ this.log2('add symbol variable: ' + name);
9
+ }
10
+ addSymbolFunction(functionName, funcDefinedParameters) {
11
+ if (!this.symbolTable.exists(this.getExecutor(), functionName)) {
12
+ this.symbolTable.addFunction(this.getExecutor(), functionName, funcDefinedParameters);
13
+ this.log2('add symbol function: ' + functionName);
14
+ }
15
+ }
16
+ handleAtomSymbol(atom) {
17
+ const atomId = atom.getText();
18
+ const executor = this.getExecutor();
19
+ let tmpSymbol;
20
+ if (this.symbolTable.exists(executor, atomId)) {
21
+ tmpSymbol = this.symbolTable.get(executor, atomId);
22
+ }
23
+ else {
24
+ const foundContext = this.symbolTable.searchParentContext(executor, atomId);
25
+ if (foundContext === null) {
26
+ tmpSymbol = this.symbolTable.addUndefined(executor, atomId, atom);
27
+ this.log2('symbol not found: ' + atomId);
28
+ }
29
+ else {
30
+ tmpSymbol = this.symbolTable.get(foundContext, atomId);
31
+ }
32
+ }
33
+ return tmpSymbol;
34
+ }
35
+ setSymbols(symbolTable) {
36
+ this.symbolTable = symbolTable;
37
+ }
38
+ visitImport_expr = (ctx) => {
39
+ const ID = ctx.ID().toString();
40
+ const { pathExists } = this.handleImportFile(ID, false);
41
+ if (!pathExists) {
42
+ this.symbolTable.addUndefined(this.getExecutor(), ID, ctx.ID());
43
+ }
44
+ };
45
+ visitAssignment_expr = (ctx) => {
46
+ const atomStr = ctx.atom_expr().getText();
47
+ const ctxDataExpr = ctx.data_expr();
48
+ this.visit(ctxDataExpr);
49
+ const value = this.getResult(ctxDataExpr);
50
+ this.addSymbolVariable(atomStr, value);
51
+ return null;
52
+ };
53
+ visitAtom_expr = (ctx) => {
54
+ const tmpSymbol = this.handleAtomSymbol(ctx.ID(0));
55
+ this.setResult(ctx, tmpSymbol);
56
+ };
57
+ visitFunction_call_expr = (ctx) => {
58
+ this.handleAtomSymbol(ctx.ID());
59
+ if (ctx.trailer_expr().length > 0) {
60
+ ctx.trailer_expr().forEach(item => {
61
+ if (item.OPEN_PAREN() && item.CLOSE_PAREN()) {
62
+ const params = item.parameters();
63
+ if (params) {
64
+ this.visit(params);
65
+ }
66
+ }
67
+ });
68
+ }
69
+ };
70
+ visitValueAtomExpr = (ctx) => {
71
+ let value = null;
72
+ const ctxValueExpr = ctx.value_expr();
73
+ const cxtAtomExpr = ctx.atom_expr();
74
+ if (ctxValueExpr) {
75
+ this.visit(ctxValueExpr);
76
+ value = this.getResult(ctxValueExpr);
77
+ }
78
+ else if (cxtAtomExpr) {
79
+ this.visit(cxtAtomExpr);
80
+ value = this.getResult(cxtAtomExpr);
81
+ }
82
+ this.setResult(ctx, value);
83
+ };
84
+ visitUnaryOperatorExpr = (ctx) => {
85
+ this.visit(ctx.data_expr());
86
+ };
87
+ visitMultiplyExpr = (ctx) => {
88
+ this.visit(ctx.data_expr(0));
89
+ this.visit(ctx.data_expr(1));
90
+ };
91
+ visitAdditionExpr = (ctx) => {
92
+ this.visit(ctx.data_expr(0));
93
+ this.visit(ctx.data_expr(1));
94
+ };
95
+ visitBinaryOperatorExpr = (ctx) => {
96
+ this.visit(ctx.data_expr(0));
97
+ this.visit(ctx.data_expr(1));
98
+ };
99
+ visitDataExpr = (ctx) => {
100
+ return;
101
+ };
102
+ visitFunction_def_expr = (ctx) => {
103
+ const functionName = ctx.ID().getText();
104
+ let funcDefinedParameters = [];
105
+ const ctxFunctionArgsExpr = ctx.function_args_expr();
106
+ if (ctxFunctionArgsExpr) {
107
+ this.visit(ctxFunctionArgsExpr);
108
+ funcDefinedParameters = this.getResult(ctxFunctionArgsExpr);
109
+ }
110
+ this.addSymbolFunction(functionName, funcDefinedParameters);
111
+ const executionContextName = functionName + '_validate';
112
+ const passedInParamsNull = funcDefinedParameters.map((param, index) => {
113
+ return ['position', index, null];
114
+ });
115
+ const newExecutor = this.enterNewChildContext(this.executionStack, this.getExecutor(), executionContextName, { netNamespace: "" }, funcDefinedParameters, passedInParamsNull);
116
+ funcDefinedParameters.forEach(param => {
117
+ this.addSymbolVariable(param[0], null, newExecutor);
118
+ });
119
+ this.runExpressions(newExecutor, ctx.function_expr());
120
+ this.executionStack.pop();
121
+ };
122
+ getSymbols() {
123
+ return this.symbolTable;
124
+ }
125
+ dumpSymbols() {
126
+ this.symbolTable.dumpSymbols();
127
+ }
128
+ }
129
+ export class SymbolValidatorResolveVisitor extends SymbolValidatorVisitor {
130
+ addSymbolVariable(name, value) {
131
+ }
132
+ addSymbolFunction(functionName, funcDefinedParameters) {
133
+ if (this.symbolTable.exists(this.getExecutor(), functionName)) {
134
+ this.symbolTable.addFunction(this.getExecutor(), functionName, funcDefinedParameters);
135
+ }
136
+ }
137
+ }
138
+ export class SymbolTable {
139
+ symbols = new Map();
140
+ executonContextsNamespaces = [];
141
+ getSymbols() {
142
+ return this.symbols;
143
+ }
144
+ addFunction(executionContext, id, funcDefinedParameters) {
145
+ return this.add(executionContext, id, ParseSymbolType.Function, {
146
+ funcDefinedParameters
147
+ });
148
+ }
149
+ addVariable(executionContext, id, variableValue) {
150
+ return this.add(executionContext, id, ParseSymbolType.Variable, {
151
+ variableValue
152
+ });
153
+ }
154
+ addUndefined(executionContext, id, node) {
155
+ return this.add(executionContext, id, ParseSymbolType.Undefined, {
156
+ node
157
+ });
158
+ }
159
+ add(executionContext, id, type, extra) {
160
+ if (this.executonContextsNamespaces.indexOf(executionContext.namespace) === -1) {
161
+ this.executonContextsNamespaces.push(executionContext.namespace);
162
+ }
163
+ const item = {
164
+ id,
165
+ type,
166
+ context: executionContext,
167
+ extra
168
+ };
169
+ this.symbols.set(this.idName(executionContext, id), item);
170
+ return item;
171
+ }
172
+ idName(executionContext, id) {
173
+ return executionContext.namespace + id;
174
+ }
175
+ dumpSymbols() {
176
+ for (const [key, value] of this.symbols) {
177
+ console.log(value.type.padEnd(10, " "), key);
178
+ }
179
+ }
180
+ exists(executionContext, id) {
181
+ const name = this.idName(executionContext, id);
182
+ return this.symbols.has(name);
183
+ }
184
+ existsAny(executionContext, id) {
185
+ if (this.exists(executionContext, id)) {
186
+ return true;
187
+ }
188
+ else {
189
+ return this.searchParentContext(executionContext, id) !== null;
190
+ }
191
+ }
192
+ get(executionContext, id) {
193
+ const name = this.idName(executionContext, id);
194
+ return this.symbols.get(name);
195
+ }
196
+ getParentContexts(executionContext, contextsNamespace) {
197
+ if (executionContext.parentContext !== null) {
198
+ contextsNamespace.push(executionContext.parentContext.namespace);
199
+ this.getParentContexts(executionContext.parentContext, contextsNamespace);
200
+ }
201
+ return contextsNamespace;
202
+ }
203
+ searchParentContext(executionContext, id) {
204
+ const contextNames = this.getParentContexts(executionContext, []);
205
+ for (const [key,] of this.symbols) {
206
+ if (key.endsWith(`.${id}`)) {
207
+ const { context } = this.symbols.get(key);
208
+ if (contextNames.indexOf(context.namespace) !== -1) {
209
+ return context;
210
+ }
211
+ }
212
+ }
213
+ return null;
214
+ }
215
+ clearUndefined() {
216
+ for (const [key, value] of this.symbols) {
217
+ if (value.type === ParseSymbolType.Undefined) {
218
+ this.symbols.delete(key);
219
+ }
220
+ }
221
+ }
222
+ }
@@ -0,0 +1,276 @@
1
+ import * as antlr from "antlr4ng";
2
+ export class CircuitScriptLexer extends antlr.Lexer {
3
+ static T__0 = 1;
4
+ static T__1 = 2;
5
+ static T__2 = 3;
6
+ static T__3 = 4;
7
+ static T__4 = 5;
8
+ static T__5 = 6;
9
+ static T__6 = 7;
10
+ static Break = 8;
11
+ static Branch = 9;
12
+ static Create = 10;
13
+ static Component = 11;
14
+ static Graphic = 12;
15
+ static Wire = 13;
16
+ static Pin = 14;
17
+ static Add = 15;
18
+ static At = 16;
19
+ static To = 17;
20
+ static Point = 18;
21
+ static Join = 19;
22
+ static Parallel = 20;
23
+ static Return = 21;
24
+ static Define = 22;
25
+ static Import = 23;
26
+ static If = 24;
27
+ static Not = 25;
28
+ static Frame = 26;
29
+ static Equals = 27;
30
+ static NotEquals = 28;
31
+ static Addition = 29;
32
+ static Minus = 30;
33
+ static Divide = 31;
34
+ static Multiply = 32;
35
+ static OPEN_PAREN = 33;
36
+ static CLOSE_PAREN = 34;
37
+ static NOT_CONNECTED = 35;
38
+ static BOOLEAN_VALUE = 36;
39
+ static ID = 37;
40
+ static INTEGER_VALUE = 38;
41
+ static DECIMAL_VALUE = 39;
42
+ static NUMERIC_VALUE = 40;
43
+ static STRING_VALUE = 41;
44
+ static PERCENTAGE_VALUE = 42;
45
+ static ALPHA_NUMERIC = 43;
46
+ static WS = 44;
47
+ static NEWLINE = 45;
48
+ static COMMENT = 46;
49
+ static channelNames = [
50
+ "DEFAULT_TOKEN_CHANNEL", "HIDDEN"
51
+ ];
52
+ static literalNames = [
53
+ null, "':'", "','", "'='", "'..'", "'.'", "'['", "']'", "'break'",
54
+ "'branch'", "'create'", "'component'", "'graphic'", "'wire'", "'pin'",
55
+ "'add'", "'at'", "'to'", "'point'", "'join'", "'parallel'", "'return'",
56
+ "'def'", "'import'", "'if'", "'!'", "'frame'", "'=='", "'!='", "'+'",
57
+ "'-'", "'/'", "'*'", "'('", "')'"
58
+ ];
59
+ static symbolicNames = [
60
+ null, null, null, null, null, null, null, null, "Break", "Branch",
61
+ "Create", "Component", "Graphic", "Wire", "Pin", "Add", "At", "To",
62
+ "Point", "Join", "Parallel", "Return", "Define", "Import", "If",
63
+ "Not", "Frame", "Equals", "NotEquals", "Addition", "Minus", "Divide",
64
+ "Multiply", "OPEN_PAREN", "CLOSE_PAREN", "NOT_CONNECTED", "BOOLEAN_VALUE",
65
+ "ID", "INTEGER_VALUE", "DECIMAL_VALUE", "NUMERIC_VALUE", "STRING_VALUE",
66
+ "PERCENTAGE_VALUE", "ALPHA_NUMERIC", "WS", "NEWLINE", "COMMENT"
67
+ ];
68
+ static modeNames = [
69
+ "DEFAULT_MODE",
70
+ ];
71
+ static ruleNames = [
72
+ "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "Break",
73
+ "Branch", "Create", "Component", "Graphic", "Wire", "Pin", "Add",
74
+ "At", "To", "Point", "Join", "Parallel", "Return", "Define", "Import",
75
+ "If", "Not", "Frame", "Equals", "NotEquals", "Addition", "Minus",
76
+ "Divide", "Multiply", "OPEN_PAREN", "CLOSE_PAREN", "NOT_CONNECTED",
77
+ "BOOLEAN_VALUE", "ID", "DecimalIntegerLiteral", "INTEGER_VALUE",
78
+ "DECIMAL_VALUE", "NUMERIC_VALUE", "STRING_VALUE", "PERCENTAGE_VALUE",
79
+ "ALPHA_NUMERIC", "WS", "NEWLINE", "SPACES", "COMMENT_FRAGMENT",
80
+ "COMMENT",
81
+ ];
82
+ constructor(input) {
83
+ super(input);
84
+ this.interpreter = new antlr.LexerATNSimulator(this, CircuitScriptLexer._ATN, CircuitScriptLexer.decisionsToDFA, new antlr.PredictionContextCache());
85
+ }
86
+ get grammarFileName() { return "CircuitScript.g4"; }
87
+ get literalNames() { return CircuitScriptLexer.literalNames; }
88
+ get symbolicNames() { return CircuitScriptLexer.symbolicNames; }
89
+ get ruleNames() { return CircuitScriptLexer.ruleNames; }
90
+ get serializedATN() { return CircuitScriptLexer._serializedATN; }
91
+ get channelNames() { return CircuitScriptLexer.channelNames; }
92
+ get modeNames() { return CircuitScriptLexer.modeNames; }
93
+ action(localContext, ruleIndex, actionIndex) {
94
+ switch (ruleIndex) {
95
+ case 32:
96
+ this.OPEN_PAREN_action(localContext, actionIndex);
97
+ break;
98
+ case 33:
99
+ this.CLOSE_PAREN_action(localContext, actionIndex);
100
+ break;
101
+ case 45:
102
+ this.NEWLINE_action(localContext, actionIndex);
103
+ break;
104
+ }
105
+ }
106
+ OPEN_PAREN_action(localContext, actionIndex) {
107
+ switch (actionIndex) {
108
+ case 0:
109
+ this.openBrace();
110
+ break;
111
+ }
112
+ }
113
+ CLOSE_PAREN_action(localContext, actionIndex) {
114
+ switch (actionIndex) {
115
+ case 1:
116
+ this.closeBrace();
117
+ break;
118
+ }
119
+ }
120
+ NEWLINE_action(localContext, actionIndex) {
121
+ switch (actionIndex) {
122
+ case 2:
123
+ this.onNewLine();
124
+ break;
125
+ }
126
+ }
127
+ static _serializedATN = [
128
+ 4, 0, 46, 368, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5,
129
+ 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2,
130
+ 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7,
131
+ 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2,
132
+ 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7,
133
+ 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 2, 38, 7, 38, 2,
134
+ 39, 7, 39, 2, 40, 7, 40, 2, 41, 7, 41, 2, 42, 7, 42, 2, 43, 7, 43, 2, 44, 7, 44, 2, 45, 7,
135
+ 45, 2, 46, 7, 46, 2, 47, 7, 47, 2, 48, 7, 48, 1, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 3,
136
+ 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8,
137
+ 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10,
138
+ 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11,
139
+ 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14,
140
+ 1, 14, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17,
141
+ 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19,
142
+ 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22,
143
+ 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 1, 23, 1, 23, 1, 24, 1, 24, 1, 25, 1, 25,
144
+ 1, 25, 1, 25, 1, 25, 1, 25, 1, 26, 1, 26, 1, 26, 1, 27, 1, 27, 1, 27, 1, 28, 1, 28, 1, 29,
145
+ 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 32, 1, 33, 1, 33, 1, 33, 1, 34, 1, 34,
146
+ 1, 34, 1, 34, 3, 34, 245, 8, 34, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35, 1, 35,
147
+ 1, 35, 3, 35, 256, 8, 35, 1, 36, 1, 36, 5, 36, 260, 8, 36, 10, 36, 12, 36, 263, 9, 36,
148
+ 1, 37, 1, 37, 1, 37, 5, 37, 268, 8, 37, 10, 37, 12, 37, 271, 9, 37, 3, 37, 273, 8, 37,
149
+ 1, 38, 4, 38, 276, 8, 38, 11, 38, 12, 38, 277, 1, 38, 5, 38, 281, 8, 38, 10, 38, 12, 38,
150
+ 284, 9, 38, 1, 38, 3, 38, 287, 8, 38, 1, 39, 1, 39, 1, 39, 1, 39, 5, 39, 293, 8, 39, 10,
151
+ 39, 12, 39, 296, 9, 39, 1, 40, 1, 40, 3, 40, 300, 8, 40, 1, 40, 3, 40, 303, 8, 40, 1, 41,
152
+ 1, 41, 5, 41, 307, 8, 41, 10, 41, 12, 41, 310, 9, 41, 1, 41, 1, 41, 1, 42, 4, 42, 315,
153
+ 8, 42, 11, 42, 12, 42, 316, 1, 42, 5, 42, 320, 8, 42, 10, 42, 12, 42, 323, 9, 42, 1, 42,
154
+ 1, 42, 1, 43, 4, 43, 328, 8, 43, 11, 43, 12, 43, 329, 1, 44, 4, 44, 333, 8, 44, 11, 44,
155
+ 12, 44, 334, 1, 44, 1, 44, 1, 45, 3, 45, 340, 8, 45, 1, 45, 1, 45, 3, 45, 344, 8, 45, 1,
156
+ 45, 3, 45, 347, 8, 45, 1, 45, 1, 45, 1, 46, 4, 46, 352, 8, 46, 11, 46, 12, 46, 353, 1,
157
+ 47, 1, 47, 5, 47, 358, 8, 47, 10, 47, 12, 47, 361, 9, 47, 1, 48, 1, 48, 3, 48, 365, 8,
158
+ 48, 1, 48, 1, 48, 1, 308, 0, 49, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9,
159
+ 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20,
160
+ 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31,
161
+ 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 0, 77, 38, 79, 39, 81, 40, 83, 41,
162
+ 85, 42, 87, 43, 89, 44, 91, 45, 93, 0, 95, 0, 97, 46, 1, 0, 10, 3, 0, 65, 90, 95, 95, 97,
163
+ 122, 4, 0, 48, 57, 65, 90, 95, 95, 97, 122, 1, 0, 49, 57, 2, 0, 48, 57, 95, 95, 1, 0, 48,
164
+ 57, 1, 0, 48, 48, 5, 0, 77, 77, 107, 107, 109, 110, 112, 112, 117, 117, 3, 0, 48, 57,
165
+ 65, 90, 97, 122, 2, 0, 9, 9, 32, 32, 2, 0, 10, 10, 12, 13, 386, 0, 1, 1, 0, 0, 0, 0, 3, 1,
166
+ 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0,
167
+ 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0,
168
+ 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0,
169
+ 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0,
170
+ 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0,
171
+ 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0,
172
+ 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0,
173
+ 0, 0, 0, 77, 1, 0, 0, 0, 0, 79, 1, 0, 0, 0, 0, 81, 1, 0, 0, 0, 0, 83, 1, 0, 0, 0, 0, 85, 1, 0,
174
+ 0, 0, 0, 87, 1, 0, 0, 0, 0, 89, 1, 0, 0, 0, 0, 91, 1, 0, 0, 0, 0, 97, 1, 0, 0, 0, 1, 99, 1, 0,
175
+ 0, 0, 3, 101, 1, 0, 0, 0, 5, 103, 1, 0, 0, 0, 7, 105, 1, 0, 0, 0, 9, 108, 1, 0, 0, 0, 11, 110,
176
+ 1, 0, 0, 0, 13, 112, 1, 0, 0, 0, 15, 114, 1, 0, 0, 0, 17, 120, 1, 0, 0, 0, 19, 127, 1, 0,
177
+ 0, 0, 21, 134, 1, 0, 0, 0, 23, 144, 1, 0, 0, 0, 25, 152, 1, 0, 0, 0, 27, 157, 1, 0, 0, 0,
178
+ 29, 161, 1, 0, 0, 0, 31, 165, 1, 0, 0, 0, 33, 168, 1, 0, 0, 0, 35, 171, 1, 0, 0, 0, 37, 177,
179
+ 1, 0, 0, 0, 39, 182, 1, 0, 0, 0, 41, 191, 1, 0, 0, 0, 43, 198, 1, 0, 0, 0, 45, 202, 1, 0,
180
+ 0, 0, 47, 209, 1, 0, 0, 0, 49, 212, 1, 0, 0, 0, 51, 214, 1, 0, 0, 0, 53, 220, 1, 0, 0, 0,
181
+ 55, 223, 1, 0, 0, 0, 57, 226, 1, 0, 0, 0, 59, 228, 1, 0, 0, 0, 61, 230, 1, 0, 0, 0, 63, 232,
182
+ 1, 0, 0, 0, 65, 234, 1, 0, 0, 0, 67, 237, 1, 0, 0, 0, 69, 244, 1, 0, 0, 0, 71, 255, 1, 0,
183
+ 0, 0, 73, 257, 1, 0, 0, 0, 75, 272, 1, 0, 0, 0, 77, 286, 1, 0, 0, 0, 79, 288, 1, 0, 0, 0,
184
+ 81, 299, 1, 0, 0, 0, 83, 304, 1, 0, 0, 0, 85, 314, 1, 0, 0, 0, 87, 327, 1, 0, 0, 0, 89, 332,
185
+ 1, 0, 0, 0, 91, 343, 1, 0, 0, 0, 93, 351, 1, 0, 0, 0, 95, 355, 1, 0, 0, 0, 97, 364, 1, 0,
186
+ 0, 0, 99, 100, 5, 58, 0, 0, 100, 2, 1, 0, 0, 0, 101, 102, 5, 44, 0, 0, 102, 4, 1, 0, 0, 0,
187
+ 103, 104, 5, 61, 0, 0, 104, 6, 1, 0, 0, 0, 105, 106, 5, 46, 0, 0, 106, 107, 5, 46, 0, 0,
188
+ 107, 8, 1, 0, 0, 0, 108, 109, 5, 46, 0, 0, 109, 10, 1, 0, 0, 0, 110, 111, 5, 91, 0, 0, 111,
189
+ 12, 1, 0, 0, 0, 112, 113, 5, 93, 0, 0, 113, 14, 1, 0, 0, 0, 114, 115, 5, 98, 0, 0, 115,
190
+ 116, 5, 114, 0, 0, 116, 117, 5, 101, 0, 0, 117, 118, 5, 97, 0, 0, 118, 119, 5, 107, 0,
191
+ 0, 119, 16, 1, 0, 0, 0, 120, 121, 5, 98, 0, 0, 121, 122, 5, 114, 0, 0, 122, 123, 5, 97,
192
+ 0, 0, 123, 124, 5, 110, 0, 0, 124, 125, 5, 99, 0, 0, 125, 126, 5, 104, 0, 0, 126, 18,
193
+ 1, 0, 0, 0, 127, 128, 5, 99, 0, 0, 128, 129, 5, 114, 0, 0, 129, 130, 5, 101, 0, 0, 130,
194
+ 131, 5, 97, 0, 0, 131, 132, 5, 116, 0, 0, 132, 133, 5, 101, 0, 0, 133, 20, 1, 0, 0, 0,
195
+ 134, 135, 5, 99, 0, 0, 135, 136, 5, 111, 0, 0, 136, 137, 5, 109, 0, 0, 137, 138, 5, 112,
196
+ 0, 0, 138, 139, 5, 111, 0, 0, 139, 140, 5, 110, 0, 0, 140, 141, 5, 101, 0, 0, 141, 142,
197
+ 5, 110, 0, 0, 142, 143, 5, 116, 0, 0, 143, 22, 1, 0, 0, 0, 144, 145, 5, 103, 0, 0, 145,
198
+ 146, 5, 114, 0, 0, 146, 147, 5, 97, 0, 0, 147, 148, 5, 112, 0, 0, 148, 149, 5, 104, 0,
199
+ 0, 149, 150, 5, 105, 0, 0, 150, 151, 5, 99, 0, 0, 151, 24, 1, 0, 0, 0, 152, 153, 5, 119,
200
+ 0, 0, 153, 154, 5, 105, 0, 0, 154, 155, 5, 114, 0, 0, 155, 156, 5, 101, 0, 0, 156, 26,
201
+ 1, 0, 0, 0, 157, 158, 5, 112, 0, 0, 158, 159, 5, 105, 0, 0, 159, 160, 5, 110, 0, 0, 160,
202
+ 28, 1, 0, 0, 0, 161, 162, 5, 97, 0, 0, 162, 163, 5, 100, 0, 0, 163, 164, 5, 100, 0, 0,
203
+ 164, 30, 1, 0, 0, 0, 165, 166, 5, 97, 0, 0, 166, 167, 5, 116, 0, 0, 167, 32, 1, 0, 0, 0,
204
+ 168, 169, 5, 116, 0, 0, 169, 170, 5, 111, 0, 0, 170, 34, 1, 0, 0, 0, 171, 172, 5, 112,
205
+ 0, 0, 172, 173, 5, 111, 0, 0, 173, 174, 5, 105, 0, 0, 174, 175, 5, 110, 0, 0, 175, 176,
206
+ 5, 116, 0, 0, 176, 36, 1, 0, 0, 0, 177, 178, 5, 106, 0, 0, 178, 179, 5, 111, 0, 0, 179,
207
+ 180, 5, 105, 0, 0, 180, 181, 5, 110, 0, 0, 181, 38, 1, 0, 0, 0, 182, 183, 5, 112, 0, 0,
208
+ 183, 184, 5, 97, 0, 0, 184, 185, 5, 114, 0, 0, 185, 186, 5, 97, 0, 0, 186, 187, 5, 108,
209
+ 0, 0, 187, 188, 5, 108, 0, 0, 188, 189, 5, 101, 0, 0, 189, 190, 5, 108, 0, 0, 190, 40,
210
+ 1, 0, 0, 0, 191, 192, 5, 114, 0, 0, 192, 193, 5, 101, 0, 0, 193, 194, 5, 116, 0, 0, 194,
211
+ 195, 5, 117, 0, 0, 195, 196, 5, 114, 0, 0, 196, 197, 5, 110, 0, 0, 197, 42, 1, 0, 0, 0,
212
+ 198, 199, 5, 100, 0, 0, 199, 200, 5, 101, 0, 0, 200, 201, 5, 102, 0, 0, 201, 44, 1, 0,
213
+ 0, 0, 202, 203, 5, 105, 0, 0, 203, 204, 5, 109, 0, 0, 204, 205, 5, 112, 0, 0, 205, 206,
214
+ 5, 111, 0, 0, 206, 207, 5, 114, 0, 0, 207, 208, 5, 116, 0, 0, 208, 46, 1, 0, 0, 0, 209,
215
+ 210, 5, 105, 0, 0, 210, 211, 5, 102, 0, 0, 211, 48, 1, 0, 0, 0, 212, 213, 5, 33, 0, 0,
216
+ 213, 50, 1, 0, 0, 0, 214, 215, 5, 102, 0, 0, 215, 216, 5, 114, 0, 0, 216, 217, 5, 97,
217
+ 0, 0, 217, 218, 5, 109, 0, 0, 218, 219, 5, 101, 0, 0, 219, 52, 1, 0, 0, 0, 220, 221, 5,
218
+ 61, 0, 0, 221, 222, 5, 61, 0, 0, 222, 54, 1, 0, 0, 0, 223, 224, 5, 33, 0, 0, 224, 225,
219
+ 5, 61, 0, 0, 225, 56, 1, 0, 0, 0, 226, 227, 5, 43, 0, 0, 227, 58, 1, 0, 0, 0, 228, 229,
220
+ 5, 45, 0, 0, 229, 60, 1, 0, 0, 0, 230, 231, 5, 47, 0, 0, 231, 62, 1, 0, 0, 0, 232, 233,
221
+ 5, 42, 0, 0, 233, 64, 1, 0, 0, 0, 234, 235, 5, 40, 0, 0, 235, 236, 6, 32, 0, 0, 236, 66,
222
+ 1, 0, 0, 0, 237, 238, 5, 41, 0, 0, 238, 239, 6, 33, 1, 0, 239, 68, 1, 0, 0, 0, 240, 241,
223
+ 5, 110, 0, 0, 241, 245, 5, 99, 0, 0, 242, 243, 5, 78, 0, 0, 243, 245, 5, 67, 0, 0, 244,
224
+ 240, 1, 0, 0, 0, 244, 242, 1, 0, 0, 0, 245, 70, 1, 0, 0, 0, 246, 247, 5, 116, 0, 0, 247,
225
+ 248, 5, 114, 0, 0, 248, 249, 5, 117, 0, 0, 249, 256, 5, 101, 0, 0, 250, 251, 5, 102,
226
+ 0, 0, 251, 252, 5, 97, 0, 0, 252, 253, 5, 108, 0, 0, 253, 254, 5, 115, 0, 0, 254, 256,
227
+ 5, 101, 0, 0, 255, 246, 1, 0, 0, 0, 255, 250, 1, 0, 0, 0, 256, 72, 1, 0, 0, 0, 257, 261,
228
+ 7, 0, 0, 0, 258, 260, 7, 1, 0, 0, 259, 258, 1, 0, 0, 0, 260, 263, 1, 0, 0, 0, 261, 259,
229
+ 1, 0, 0, 0, 261, 262, 1, 0, 0, 0, 262, 74, 1, 0, 0, 0, 263, 261, 1, 0, 0, 0, 264, 273, 5,
230
+ 48, 0, 0, 265, 269, 7, 2, 0, 0, 266, 268, 7, 3, 0, 0, 267, 266, 1, 0, 0, 0, 268, 271, 1,
231
+ 0, 0, 0, 269, 267, 1, 0, 0, 0, 269, 270, 1, 0, 0, 0, 270, 273, 1, 0, 0, 0, 271, 269, 1,
232
+ 0, 0, 0, 272, 264, 1, 0, 0, 0, 272, 265, 1, 0, 0, 0, 273, 76, 1, 0, 0, 0, 274, 276, 7, 2,
233
+ 0, 0, 275, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0,
234
+ 0, 0, 278, 282, 1, 0, 0, 0, 279, 281, 7, 4, 0, 0, 280, 279, 1, 0, 0, 0, 281, 284, 1, 0,
235
+ 0, 0, 282, 280, 1, 0, 0, 0, 282, 283, 1, 0, 0, 0, 283, 287, 1, 0, 0, 0, 284, 282, 1, 0,
236
+ 0, 0, 285, 287, 7, 5, 0, 0, 286, 275, 1, 0, 0, 0, 286, 285, 1, 0, 0, 0, 287, 78, 1, 0, 0,
237
+ 0, 288, 289, 3, 75, 37, 0, 289, 290, 5, 46, 0, 0, 290, 294, 7, 4, 0, 0, 291, 293, 7, 3,
238
+ 0, 0, 292, 291, 1, 0, 0, 0, 293, 296, 1, 0, 0, 0, 294, 292, 1, 0, 0, 0, 294, 295, 1, 0,
239
+ 0, 0, 295, 80, 1, 0, 0, 0, 296, 294, 1, 0, 0, 0, 297, 300, 3, 77, 38, 0, 298, 300, 3, 79,
240
+ 39, 0, 299, 297, 1, 0, 0, 0, 299, 298, 1, 0, 0, 0, 300, 302, 1, 0, 0, 0, 301, 303, 7, 6,
241
+ 0, 0, 302, 301, 1, 0, 0, 0, 302, 303, 1, 0, 0, 0, 303, 82, 1, 0, 0, 0, 304, 308, 5, 34,
242
+ 0, 0, 305, 307, 9, 0, 0, 0, 306, 305, 1, 0, 0, 0, 307, 310, 1, 0, 0, 0, 308, 309, 1, 0,
243
+ 0, 0, 308, 306, 1, 0, 0, 0, 309, 311, 1, 0, 0, 0, 310, 308, 1, 0, 0, 0, 311, 312, 5, 34,
244
+ 0, 0, 312, 84, 1, 0, 0, 0, 313, 315, 7, 2, 0, 0, 314, 313, 1, 0, 0, 0, 315, 316, 1, 0, 0,
245
+ 0, 316, 314, 1, 0, 0, 0, 316, 317, 1, 0, 0, 0, 317, 321, 1, 0, 0, 0, 318, 320, 7, 4, 0,
246
+ 0, 319, 318, 1, 0, 0, 0, 320, 323, 1, 0, 0, 0, 321, 319, 1, 0, 0, 0, 321, 322, 1, 0, 0,
247
+ 0, 322, 324, 1, 0, 0, 0, 323, 321, 1, 0, 0, 0, 324, 325, 5, 37, 0, 0, 325, 86, 1, 0, 0,
248
+ 0, 326, 328, 7, 7, 0, 0, 327, 326, 1, 0, 0, 0, 328, 329, 1, 0, 0, 0, 329, 327, 1, 0, 0,
249
+ 0, 329, 330, 1, 0, 0, 0, 330, 88, 1, 0, 0, 0, 331, 333, 7, 8, 0, 0, 332, 331, 1, 0, 0, 0,
250
+ 333, 334, 1, 0, 0, 0, 334, 332, 1, 0, 0, 0, 334, 335, 1, 0, 0, 0, 335, 336, 1, 0, 0, 0,
251
+ 336, 337, 6, 44, 2, 0, 337, 90, 1, 0, 0, 0, 338, 340, 5, 13, 0, 0, 339, 338, 1, 0, 0, 0,
252
+ 339, 340, 1, 0, 0, 0, 340, 341, 1, 0, 0, 0, 341, 344, 5, 10, 0, 0, 342, 344, 2, 12, 13,
253
+ 0, 343, 339, 1, 0, 0, 0, 343, 342, 1, 0, 0, 0, 344, 346, 1, 0, 0, 0, 345, 347, 3, 93, 46,
254
+ 0, 346, 345, 1, 0, 0, 0, 346, 347, 1, 0, 0, 0, 347, 348, 1, 0, 0, 0, 348, 349, 6, 45, 3,
255
+ 0, 349, 92, 1, 0, 0, 0, 350, 352, 7, 8, 0, 0, 351, 350, 1, 0, 0, 0, 352, 353, 1, 0, 0, 0,
256
+ 353, 351, 1, 0, 0, 0, 353, 354, 1, 0, 0, 0, 354, 94, 1, 0, 0, 0, 355, 359, 5, 35, 0, 0,
257
+ 356, 358, 8, 9, 0, 0, 357, 356, 1, 0, 0, 0, 358, 361, 1, 0, 0, 0, 359, 357, 1, 0, 0, 0,
258
+ 359, 360, 1, 0, 0, 0, 360, 96, 1, 0, 0, 0, 361, 359, 1, 0, 0, 0, 362, 365, 3, 89, 44, 0,
259
+ 363, 365, 3, 95, 47, 0, 364, 362, 1, 0, 0, 0, 364, 363, 1, 0, 0, 0, 365, 366, 1, 0, 0,
260
+ 0, 366, 367, 6, 48, 4, 0, 367, 98, 1, 0, 0, 0, 23, 0, 244, 255, 261, 269, 272, 277, 282,
261
+ 286, 294, 299, 302, 308, 316, 321, 329, 334, 339, 343, 346, 353, 359, 364, 5, 1,
262
+ 32, 0, 1, 33, 1, 6, 0, 0, 1, 45, 2, 0, 2, 0
263
+ ];
264
+ static __ATN;
265
+ static get _ATN() {
266
+ if (!CircuitScriptLexer.__ATN) {
267
+ CircuitScriptLexer.__ATN = new antlr.ATNDeserializer().deserialize(CircuitScriptLexer._serializedATN);
268
+ }
269
+ return CircuitScriptLexer.__ATN;
270
+ }
271
+ static vocabulary = new antlr.Vocabulary(CircuitScriptLexer.literalNames, CircuitScriptLexer.symbolicNames, []);
272
+ get vocabulary() {
273
+ return CircuitScriptLexer.vocabulary;
274
+ }
275
+ static decisionsToDFA = CircuitScriptLexer._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
276
+ }