ifc-expressions 2.3.0 → 3.0.0-beta.2

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 (185) hide show
  1. package/README.md +255 -30
  2. package/dist/IfcExpression.d.ts +24 -26
  3. package/dist/IfcExpressionErrorListener.d.ts +3 -3
  4. package/dist/IfcExpressionOptions.d.ts +4 -0
  5. package/dist/autocomplete/CompletionItem.d.ts +24 -0
  6. package/dist/autocomplete/IfcExpressionAutocomplete.d.ts +11 -0
  7. package/dist/builtin/BuiltinRuntimeValueConverter.d.ts +7 -0
  8. package/dist/builtin/BuiltinVariableRegistry.d.ts +50 -0
  9. package/dist/cjs/IfcExpression.js +112 -37
  10. package/dist/cjs/IfcExpression.js.map +1 -1
  11. package/dist/cjs/IfcExpressionErrorListener.js +3 -8
  12. package/dist/cjs/IfcExpressionErrorListener.js.map +1 -1
  13. package/dist/cjs/IfcExpressionOptions.js +3 -0
  14. package/dist/cjs/IfcExpressionOptions.js.map +1 -0
  15. package/dist/cjs/autocomplete/CompletionItem.js +3 -0
  16. package/dist/cjs/autocomplete/CompletionItem.js.map +1 -0
  17. package/dist/cjs/autocomplete/IfcExpressionAutocomplete.js +654 -0
  18. package/dist/cjs/autocomplete/IfcExpressionAutocomplete.js.map +1 -0
  19. package/dist/cjs/builtin/BuiltinRuntimeValueConverter.js +124 -0
  20. package/dist/cjs/builtin/BuiltinRuntimeValueConverter.js.map +1 -0
  21. package/dist/cjs/builtin/BuiltinVariableRegistry.js +405 -0
  22. package/dist/cjs/builtin/BuiltinVariableRegistry.js.map +1 -0
  23. package/dist/cjs/compiler/ExprCompiler.js +44 -41
  24. package/dist/cjs/compiler/ExprCompiler.js.map +1 -1
  25. package/dist/cjs/compiler/ExprManager.js.map +1 -1
  26. package/dist/cjs/compiler/IfcExpressionValidationListener.js +85 -25
  27. package/dist/cjs/compiler/IfcExpressionValidationListener.js.map +1 -1
  28. package/dist/cjs/compiler/TypeManager.js.map +1 -1
  29. package/dist/cjs/context/IfcExpressionContext.js.map +1 -1
  30. package/dist/cjs/context/NopContext.js +3 -0
  31. package/dist/cjs/context/NopContext.js.map +1 -1
  32. package/dist/cjs/documentation/Documentation.js +11 -0
  33. package/dist/cjs/documentation/Documentation.js.map +1 -0
  34. package/dist/cjs/error/ExpressionTypeError.js.map +1 -1
  35. package/dist/cjs/error/IfcExpressionBuiltinConfigException.js +10 -0
  36. package/dist/cjs/error/IfcExpressionBuiltinConfigException.js.map +1 -0
  37. package/dist/cjs/error/InvalidSyntaxException.js.map +1 -1
  38. package/dist/cjs/error/NoSuchFunctionException.js.map +1 -1
  39. package/dist/cjs/error/NoSuchMemberException.js +13 -0
  40. package/dist/cjs/error/NoSuchMemberException.js.map +1 -0
  41. package/dist/cjs/error/ValidationException.js.map +1 -1
  42. package/dist/cjs/error/WrongFunctionArgumentTypeException.js.map +1 -1
  43. package/dist/cjs/expression/ExprKind.js +3 -0
  44. package/dist/cjs/expression/ExprKind.js.map +1 -1
  45. package/dist/cjs/expression/function/Func.js +18 -14
  46. package/dist/cjs/expression/function/Func.js.map +1 -1
  47. package/dist/cjs/expression/function/FuncArg.js +11 -5
  48. package/dist/cjs/expression/function/FuncArg.js.map +1 -1
  49. package/dist/cjs/expression/function/IfcExpressionFunctions.js +198 -42
  50. package/dist/cjs/expression/function/IfcExpressionFunctions.js.map +1 -1
  51. package/dist/cjs/expression/function/impl/CHOOSE.js.map +1 -1
  52. package/dist/cjs/expression/function/impl/IF.js.map +1 -1
  53. package/dist/cjs/expression/function/impl/MAP.js.map +1 -1
  54. package/dist/cjs/expression/function/impl/ReplacePattern.js +20 -2
  55. package/dist/cjs/expression/function/impl/ReplacePattern.js.map +1 -1
  56. package/dist/cjs/expression/reference/BuiltinFunctionCallExpr.js +59 -0
  57. package/dist/cjs/expression/reference/BuiltinFunctionCallExpr.js.map +1 -0
  58. package/dist/cjs/expression/reference/BuiltinPropertyAccessExpr.js +34 -0
  59. package/dist/cjs/expression/reference/BuiltinPropertyAccessExpr.js.map +1 -0
  60. package/dist/cjs/expression/reference/BuiltinRootReferenceExpr.js +29 -0
  61. package/dist/cjs/expression/reference/BuiltinRootReferenceExpr.js.map +1 -0
  62. package/dist/cjs/gen/parser/IfcExpressionLexer.js +126 -104
  63. package/dist/cjs/gen/parser/IfcExpressionLexer.js.map +1 -1
  64. package/dist/cjs/gen/parser/IfcExpressionListener.js +7 -4
  65. package/dist/cjs/gen/parser/IfcExpressionListener.js.map +1 -1
  66. package/dist/cjs/gen/parser/IfcExpressionParser.js +739 -682
  67. package/dist/cjs/gen/parser/IfcExpressionParser.js.map +1 -1
  68. package/dist/cjs/gen/parser/IfcExpressionVisitor.js +4 -4
  69. package/dist/cjs/gen/parser/IfcExpressionVisitor.js.map +1 -1
  70. package/dist/cjs/index.js +4 -1
  71. package/dist/cjs/index.js.map +1 -1
  72. package/dist/cjs/type/ContextObjectType.js +45 -0
  73. package/dist/cjs/type/ContextObjectType.js.map +1 -0
  74. package/dist/cjs/type/Types.js +4 -6
  75. package/dist/cjs/type/Types.js.map +1 -1
  76. package/dist/cjs/value/ContextObjectValue.js +23 -0
  77. package/dist/cjs/value/ContextObjectValue.js.map +1 -0
  78. package/dist/cjs/value/ExpressionValue.js.map +1 -1
  79. package/dist/cjs/value/Value.js.map +1 -1
  80. package/dist/compiler/ExprCompiler.d.ts +8 -3
  81. package/dist/compiler/ExprManager.d.ts +1 -1
  82. package/dist/compiler/IfcExpressionValidationListener.d.ts +9 -3
  83. package/dist/compiler/TypeManager.d.ts +1 -1
  84. package/dist/context/IfcExpressionContext.d.ts +3 -4
  85. package/dist/context/NopContext.d.ts +1 -0
  86. package/dist/documentation/Documentation.d.ts +12 -0
  87. package/dist/error/ExpressionTypeError.d.ts +1 -1
  88. package/dist/error/IfcExpressionBuiltinConfigException.d.ts +3 -0
  89. package/dist/error/InvalidSyntaxException.d.ts +1 -1
  90. package/dist/error/NoSuchFunctionException.d.ts +1 -1
  91. package/dist/error/NoSuchMemberException.d.ts +6 -0
  92. package/dist/error/ValidationException.d.ts +1 -1
  93. package/dist/error/WrongFunctionArgumentTypeException.d.ts +1 -1
  94. package/dist/expression/ExprKind.d.ts +3 -0
  95. package/dist/expression/function/Func.d.ts +7 -21
  96. package/dist/expression/function/FuncArg.d.ts +6 -5
  97. package/dist/expression/function/IfcExpressionFunctions.d.ts +1 -0
  98. package/dist/expression/function/impl/CHOOSE.d.ts +1 -1
  99. package/dist/expression/function/impl/IF.d.ts +1 -1
  100. package/dist/expression/function/impl/MAP.d.ts +1 -1
  101. package/dist/expression/reference/BuiltinFunctionCallExpr.d.ts +19 -0
  102. package/dist/expression/reference/BuiltinPropertyAccessExpr.d.ts +15 -0
  103. package/dist/expression/reference/BuiltinRootReferenceExpr.d.ts +14 -0
  104. package/dist/gen/parser/IfcExpressionLexer.d.ts +9 -8
  105. package/dist/gen/parser/IfcExpressionListener.d.ts +89 -59
  106. package/dist/gen/parser/IfcExpressionParser.d.ts +192 -169
  107. package/dist/gen/parser/IfcExpressionVisitor.d.ts +51 -35
  108. package/dist/index.d.ts +2 -2
  109. package/dist/mjs/IfcExpression.js +104 -32
  110. package/dist/mjs/IfcExpression.js.map +1 -1
  111. package/dist/mjs/IfcExpressionErrorListener.js +3 -8
  112. package/dist/mjs/IfcExpressionErrorListener.js.map +1 -1
  113. package/dist/mjs/IfcExpressionOptions.js +2 -0
  114. package/dist/mjs/IfcExpressionOptions.js.map +1 -0
  115. package/dist/mjs/autocomplete/CompletionItem.js +2 -0
  116. package/dist/mjs/autocomplete/CompletionItem.js.map +1 -0
  117. package/dist/mjs/autocomplete/IfcExpressionAutocomplete.js +650 -0
  118. package/dist/mjs/autocomplete/IfcExpressionAutocomplete.js.map +1 -0
  119. package/dist/mjs/builtin/BuiltinRuntimeValueConverter.js +117 -0
  120. package/dist/mjs/builtin/BuiltinRuntimeValueConverter.js.map +1 -0
  121. package/dist/mjs/builtin/BuiltinVariableRegistry.js +399 -0
  122. package/dist/mjs/builtin/BuiltinVariableRegistry.js.map +1 -0
  123. package/dist/mjs/compiler/ExprCompiler.js +43 -40
  124. package/dist/mjs/compiler/ExprCompiler.js.map +1 -1
  125. package/dist/mjs/compiler/ExprManager.js.map +1 -1
  126. package/dist/mjs/compiler/IfcExpressionValidationListener.js +85 -22
  127. package/dist/mjs/compiler/IfcExpressionValidationListener.js.map +1 -1
  128. package/dist/mjs/compiler/TypeManager.js.map +1 -1
  129. package/dist/mjs/context/IfcExpressionContext.js.map +1 -1
  130. package/dist/mjs/context/NopContext.js +3 -0
  131. package/dist/mjs/context/NopContext.js.map +1 -1
  132. package/dist/mjs/documentation/Documentation.js +7 -0
  133. package/dist/mjs/documentation/Documentation.js.map +1 -0
  134. package/dist/mjs/error/ExpressionTypeError.js.map +1 -1
  135. package/dist/mjs/error/IfcExpressionBuiltinConfigException.js +6 -0
  136. package/dist/mjs/error/IfcExpressionBuiltinConfigException.js.map +1 -0
  137. package/dist/mjs/error/InvalidSyntaxException.js.map +1 -1
  138. package/dist/mjs/error/NoSuchFunctionException.js.map +1 -1
  139. package/dist/mjs/error/NoSuchMemberException.js +9 -0
  140. package/dist/mjs/error/NoSuchMemberException.js.map +1 -0
  141. package/dist/mjs/error/ValidationException.js.map +1 -1
  142. package/dist/mjs/error/WrongFunctionArgumentTypeException.js.map +1 -1
  143. package/dist/mjs/expression/ExprKind.js +3 -0
  144. package/dist/mjs/expression/ExprKind.js.map +1 -1
  145. package/dist/mjs/expression/function/Func.js +18 -14
  146. package/dist/mjs/expression/function/Func.js.map +1 -1
  147. package/dist/mjs/expression/function/FuncArg.js +11 -5
  148. package/dist/mjs/expression/function/FuncArg.js.map +1 -1
  149. package/dist/mjs/expression/function/IfcExpressionFunctions.js +198 -42
  150. package/dist/mjs/expression/function/IfcExpressionFunctions.js.map +1 -1
  151. package/dist/mjs/expression/function/impl/CHOOSE.js.map +1 -1
  152. package/dist/mjs/expression/function/impl/IF.js.map +1 -1
  153. package/dist/mjs/expression/function/impl/MAP.js.map +1 -1
  154. package/dist/mjs/expression/function/impl/ReplacePattern.js +20 -2
  155. package/dist/mjs/expression/function/impl/ReplacePattern.js.map +1 -1
  156. package/dist/mjs/expression/reference/BuiltinFunctionCallExpr.js +55 -0
  157. package/dist/mjs/expression/reference/BuiltinFunctionCallExpr.js.map +1 -0
  158. package/dist/mjs/expression/reference/BuiltinPropertyAccessExpr.js +30 -0
  159. package/dist/mjs/expression/reference/BuiltinPropertyAccessExpr.js.map +1 -0
  160. package/dist/mjs/expression/reference/BuiltinRootReferenceExpr.js +25 -0
  161. package/dist/mjs/expression/reference/BuiltinRootReferenceExpr.js.map +1 -0
  162. package/dist/mjs/gen/parser/IfcExpressionLexer.js +101 -104
  163. package/dist/mjs/gen/parser/IfcExpressionLexer.js.map +1 -1
  164. package/dist/mjs/gen/parser/IfcExpressionListener.js +5 -3
  165. package/dist/mjs/gen/parser/IfcExpressionListener.js.map +1 -1
  166. package/dist/mjs/gen/parser/IfcExpressionParser.js +700 -670
  167. package/dist/mjs/gen/parser/IfcExpressionParser.js.map +1 -1
  168. package/dist/mjs/gen/parser/IfcExpressionVisitor.js +2 -3
  169. package/dist/mjs/gen/parser/IfcExpressionVisitor.js.map +1 -1
  170. package/dist/mjs/index.js +1 -1
  171. package/dist/mjs/index.js.map +1 -1
  172. package/dist/mjs/type/ContextObjectType.js +41 -0
  173. package/dist/mjs/type/ContextObjectType.js.map +1 -0
  174. package/dist/mjs/type/Types.js +4 -6
  175. package/dist/mjs/type/Types.js.map +1 -1
  176. package/dist/mjs/value/ContextObjectValue.js +19 -0
  177. package/dist/mjs/value/ContextObjectValue.js.map +1 -0
  178. package/dist/mjs/value/ExpressionValue.js.map +1 -1
  179. package/dist/mjs/value/Value.js.map +1 -1
  180. package/dist/type/ContextObjectType.d.ts +17 -0
  181. package/dist/type/Types.d.ts +2 -6
  182. package/dist/value/ContextObjectValue.d.ts +11 -0
  183. package/dist/value/ExpressionValue.d.ts +2 -1
  184. package/dist/value/Value.d.ts +1 -1
  185. package/package.json +5 -3
@@ -1,37 +1,33 @@
1
- // Generated from IfcExpression.g4 by ANTLR 4.13.0
2
- // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols
3
- import { ATN, ATNDeserializer, DFA, FailedPredicateException, RecognitionException, NoViableAltException, Parser, ParserATNSimulator, ParserRuleContext, PredictionContextCache, Token } from 'antlr4';
4
- class IfcExpressionParser extends Parser {
1
+ import * as antlr from "antlr4ng";
2
+ export class IfcExpressionParser extends antlr.Parser {
5
3
  get grammarFileName() { return "IfcExpression.g4"; }
6
4
  get literalNames() { return IfcExpressionParser.literalNames; }
7
5
  get symbolicNames() { return IfcExpressionParser.symbolicNames; }
8
6
  get ruleNames() { return IfcExpressionParser.ruleNames; }
9
7
  get serializedATN() { return IfcExpressionParser._serializedATN; }
10
8
  createFailedPredicateException(predicate, message) {
11
- return new FailedPredicateException(this, predicate, message);
9
+ return new antlr.FailedPredicateException(this, predicate, message);
12
10
  }
13
11
  constructor(input) {
14
12
  super(input);
15
- this._interp = new ParserATNSimulator(this, IfcExpressionParser._ATN, IfcExpressionParser.DecisionsToDFA, new PredictionContextCache());
13
+ this.interpreter = new antlr.ParserATNSimulator(this, IfcExpressionParser._ATN, IfcExpressionParser.decisionsToDFA, new antlr.PredictionContextCache());
16
14
  }
17
- // @RuleVersion(0)
18
15
  expr() {
19
- let localctx = new ExprContext(this, this._ctx, this.state);
20
- this.enterRule(localctx, 0, IfcExpressionParser.RULE_expr);
16
+ let localContext = new ExprContext(this.context, this.state);
17
+ this.enterRule(localContext, 0, IfcExpressionParser.RULE_expr);
21
18
  try {
22
- this.enterOuterAlt(localctx, 1);
19
+ this.enterOuterAlt(localContext, 1);
23
20
  {
24
- this.state = 26;
21
+ this.state = 28;
25
22
  this.singleExpr(0);
26
- this.state = 27;
23
+ this.state = 29;
27
24
  this.match(IfcExpressionParser.EOF);
28
25
  }
29
26
  }
30
27
  catch (re) {
31
- if (re instanceof RecognitionException) {
32
- localctx.exception = re;
33
- this._errHandler.reportError(this, re);
34
- this._errHandler.recover(this, re);
28
+ if (re instanceof antlr.RecognitionException) {
29
+ this.errorHandler.reportError(this, re);
30
+ this.errorHandler.recover(this, re);
35
31
  }
36
32
  else {
37
33
  throw re;
@@ -40,295 +36,330 @@ class IfcExpressionParser extends Parser {
40
36
  finally {
41
37
  this.exitRule();
42
38
  }
43
- return localctx;
39
+ return localContext;
44
40
  }
45
- // @RuleVersion(0)
46
41
  singleExpr(_p) {
47
42
  if (_p === undefined) {
48
43
  _p = 0;
49
44
  }
50
- let _parentctx = this._ctx;
51
- let _parentState = this.state;
52
- let localctx = new SingleExprContext(this, this._ctx, _parentState);
53
- let _prevctx = localctx;
45
+ let parentContext = this.context;
46
+ let parentState = this.state;
47
+ let localContext = new SingleExprContext(this.context, parentState);
48
+ let previousContext = localContext;
54
49
  let _startState = 2;
55
- this.enterRecursionRule(localctx, 2, IfcExpressionParser.RULE_singleExpr, _p);
50
+ this.enterRecursionRule(localContext, 2, IfcExpressionParser.RULE_singleExpr, _p);
56
51
  let _la;
57
52
  try {
58
- let _alt;
59
- this.enterOuterAlt(localctx, 1);
53
+ let alternative;
54
+ this.enterOuterAlt(localContext, 1);
60
55
  {
61
- this.state = 44;
62
- this._errHandler.sync(this);
63
- switch (this._input.LA(1)) {
64
- case 1:
56
+ this.state = 46;
57
+ this.errorHandler.sync(this);
58
+ switch (this.tokenStream.LA(1)) {
59
+ case IfcExpressionParser.T__0:
65
60
  {
66
- localctx = new SEUnaryMultipleMinusContext(this, localctx);
67
- this._ctx = localctx;
68
- _prevctx = localctx;
69
- this.state = 30;
61
+ localContext = new SEUnaryMultipleMinusContext(localContext);
62
+ this.context = localContext;
63
+ previousContext = localContext;
64
+ this.state = 32;
70
65
  this.match(IfcExpressionParser.T__0);
71
- this.state = 31;
72
- localctx._sub = this.singleExpr(14);
66
+ this.state = 33;
67
+ localContext._sub = this.singleExpr(14);
73
68
  }
74
69
  break;
75
- case 2:
70
+ case IfcExpressionParser.T__1:
76
71
  {
77
- localctx = new SEParenthesisContext(this, localctx);
78
- this._ctx = localctx;
79
- _prevctx = localctx;
80
- this.state = 32;
81
- this.match(IfcExpressionParser.T__1);
82
- this.state = 33;
83
- localctx._sub = this.singleExpr(0);
72
+ localContext = new SEParenthesisContext(localContext);
73
+ this.context = localContext;
74
+ previousContext = localContext;
84
75
  this.state = 34;
76
+ this.match(IfcExpressionParser.T__1);
77
+ this.state = 35;
78
+ localContext._sub = this.singleExpr(0);
79
+ this.state = 36;
85
80
  this.match(IfcExpressionParser.T__2);
86
81
  }
87
82
  break;
88
- case 4:
83
+ case IfcExpressionParser.T__3:
89
84
  {
90
- localctx = new SEUnaryMinusContext(this, localctx);
91
- this._ctx = localctx;
92
- _prevctx = localctx;
93
- this.state = 36;
85
+ localContext = new SEUnaryMinusContext(localContext);
86
+ this.context = localContext;
87
+ previousContext = localContext;
88
+ this.state = 38;
94
89
  this.match(IfcExpressionParser.T__3);
95
- this.state = 37;
96
- localctx._sub = this.singleExpr(12);
90
+ this.state = 39;
91
+ localContext._sub = this.singleExpr(12);
97
92
  }
98
93
  break;
99
- case 9:
94
+ case IfcExpressionParser.T__8:
100
95
  {
101
- localctx = new SENotContext(this, localctx);
102
- this._ctx = localctx;
103
- _prevctx = localctx;
104
- this.state = 38;
96
+ localContext = new SENotContext(localContext);
97
+ this.context = localContext;
98
+ previousContext = localContext;
99
+ this.state = 40;
105
100
  this.match(IfcExpressionParser.T__8);
106
- this.state = 39;
107
- localctx._sub = this.singleExpr(6);
101
+ this.state = 41;
102
+ localContext._sub = this.singleExpr(6);
108
103
  }
109
104
  break;
110
- case 13:
105
+ case IfcExpressionParser.T__12:
111
106
  {
112
- localctx = new SEVariableRefContext(this, localctx);
113
- this._ctx = localctx;
114
- _prevctx = localctx;
115
- this.state = 40;
116
- localctx._sub = this.variableRef();
107
+ localContext = new SEVariableRefContext(localContext);
108
+ this.context = localContext;
109
+ previousContext = localContext;
110
+ this.state = 42;
111
+ localContext._sub = this.variableRef();
117
112
  }
118
113
  break;
119
- case 20:
114
+ case IfcExpressionParser.IDENTIFIER:
120
115
  {
121
- localctx = new SEFunctionCallContext(this, localctx);
122
- this._ctx = localctx;
123
- _prevctx = localctx;
124
- this.state = 41;
125
- localctx._sub = this.functionCall();
116
+ localContext = new SEFunctionCallContext(localContext);
117
+ this.context = localContext;
118
+ previousContext = localContext;
119
+ this.state = 43;
120
+ localContext._sub = this.functionCall();
126
121
  }
127
122
  break;
128
- case 14:
129
- case 15:
130
- case 16:
131
- case 17:
132
- case 19:
123
+ case IfcExpressionParser.INT:
124
+ case IfcExpressionParser.FLOAT:
125
+ case IfcExpressionParser.BOOLEAN:
126
+ case IfcExpressionParser.LOGICAL_UNKNOWN:
127
+ case IfcExpressionParser.QUOTED_STRING:
133
128
  {
134
- localctx = new SELiteralContext(this, localctx);
135
- this._ctx = localctx;
136
- _prevctx = localctx;
137
- this.state = 42;
138
- localctx._sub = this.literal();
129
+ localContext = new SELiteralContext(localContext);
130
+ this.context = localContext;
131
+ previousContext = localContext;
132
+ this.state = 44;
133
+ localContext._sub = this.literal();
139
134
  }
140
135
  break;
141
- case 11:
136
+ case IfcExpressionParser.T__10:
142
137
  {
143
- localctx = new SEArrayExprContext(this, localctx);
144
- this._ctx = localctx;
145
- _prevctx = localctx;
146
- this.state = 43;
147
- localctx._sub = this.arrayExpr();
138
+ localContext = new SEArrayExprContext(localContext);
139
+ this.context = localContext;
140
+ previousContext = localContext;
141
+ this.state = 45;
142
+ localContext._sub = this.arrayExpr();
148
143
  }
149
144
  break;
150
145
  default:
151
- throw new NoViableAltException(this);
146
+ throw new antlr.NoViableAltException(this);
152
147
  }
153
- this._ctx.stop = this._input.LT(-1);
154
- this.state = 65;
155
- this._errHandler.sync(this);
156
- _alt = this._interp.adaptivePredict(this._input, 2, this._ctx);
157
- while (_alt !== 2 && _alt !== ATN.INVALID_ALT_NUMBER) {
158
- if (_alt === 1) {
159
- if (this._parseListeners != null) {
148
+ this.context.stop = this.tokenStream.LT(-1);
149
+ this.state = 67;
150
+ this.errorHandler.sync(this);
151
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 2, this.context);
152
+ while (alternative !== 2 && alternative !== antlr.ATN.INVALID_ALT_NUMBER) {
153
+ if (alternative === 1) {
154
+ if (this.parseListeners != null) {
160
155
  this.triggerExitRuleEvent();
161
156
  }
162
- _prevctx = localctx;
157
+ previousContext = localContext;
163
158
  {
164
- this.state = 63;
165
- this._errHandler.sync(this);
166
- switch (this._interp.adaptivePredict(this._input, 1, this._ctx)) {
159
+ this.state = 65;
160
+ this.errorHandler.sync(this);
161
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 1, this.context)) {
167
162
  case 1:
168
163
  {
169
- localctx = new SEPowerContext(this, new SingleExprContext(this, _parentctx, _parentState));
170
- localctx._left = _prevctx;
171
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
172
- this.state = 46;
173
- if (!(this.precpred(this._ctx, 11))) {
174
- throw this.createFailedPredicateException("this.precpred(this._ctx, 11)");
175
- }
176
- this.state = 47;
177
- localctx._op = this.match(IfcExpressionParser.T__4);
164
+ localContext = new SEPowerContext(new SingleExprContext(parentContext, parentState));
165
+ localContext._left = previousContext;
166
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
178
167
  this.state = 48;
179
- localctx._right = this.singleExpr(11);
168
+ if (!(this.precpred(this.context, 11))) {
169
+ throw this.createFailedPredicateException("this.precpred(this.context, 11)");
170
+ }
171
+ this.state = 49;
172
+ localContext._op = this.match(IfcExpressionParser.T__4);
173
+ this.state = 50;
174
+ localContext._right = this.singleExpr(11);
180
175
  }
181
176
  break;
182
177
  case 2:
183
178
  {
184
- localctx = new SEMulDivContext(this, new SingleExprContext(this, _parentctx, _parentState));
185
- localctx._left = _prevctx;
186
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
187
- this.state = 49;
188
- if (!(this.precpred(this._ctx, 9))) {
189
- throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");
179
+ localContext = new SEMulDivContext(new SingleExprContext(parentContext, parentState));
180
+ localContext._left = previousContext;
181
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
182
+ this.state = 51;
183
+ if (!(this.precpred(this.context, 9))) {
184
+ throw this.createFailedPredicateException("this.precpred(this.context, 9)");
190
185
  }
191
- this.state = 50;
192
- localctx._op = this._input.LT(1);
193
- _la = this._input.LA(1);
186
+ this.state = 52;
187
+ localContext._op = this.tokenStream.LT(1);
188
+ _la = this.tokenStream.LA(1);
194
189
  if (!(_la === 6 || _la === 7)) {
195
- localctx._op = this._errHandler.recoverInline(this);
190
+ localContext._op = this.errorHandler.recoverInline(this);
196
191
  }
197
192
  else {
198
- this._errHandler.reportMatch(this);
193
+ this.errorHandler.reportMatch(this);
199
194
  this.consume();
200
195
  }
201
- this.state = 51;
202
- localctx._right = this.singleExpr(10);
196
+ this.state = 53;
197
+ localContext._right = this.singleExpr(10);
203
198
  }
204
199
  break;
205
200
  case 3:
206
201
  {
207
- localctx = new SEAddSubContext(this, new SingleExprContext(this, _parentctx, _parentState));
208
- localctx._left = _prevctx;
209
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
210
- this.state = 52;
211
- if (!(this.precpred(this._ctx, 8))) {
212
- throw this.createFailedPredicateException("this.precpred(this._ctx, 8)");
202
+ localContext = new SEAddSubContext(new SingleExprContext(parentContext, parentState));
203
+ localContext._left = previousContext;
204
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
205
+ this.state = 54;
206
+ if (!(this.precpred(this.context, 8))) {
207
+ throw this.createFailedPredicateException("this.precpred(this.context, 8)");
213
208
  }
214
- this.state = 53;
215
- localctx._op = this._input.LT(1);
216
- _la = this._input.LA(1);
209
+ this.state = 55;
210
+ localContext._op = this.tokenStream.LT(1);
211
+ _la = this.tokenStream.LA(1);
217
212
  if (!(_la === 4 || _la === 8)) {
218
- localctx._op = this._errHandler.recoverInline(this);
213
+ localContext._op = this.errorHandler.recoverInline(this);
219
214
  }
220
215
  else {
221
- this._errHandler.reportMatch(this);
216
+ this.errorHandler.reportMatch(this);
222
217
  this.consume();
223
218
  }
224
- this.state = 54;
225
- localctx._right = this.singleExpr(9);
219
+ this.state = 56;
220
+ localContext._right = this.singleExpr(9);
226
221
  }
227
222
  break;
228
223
  case 4:
229
224
  {
230
- localctx = new SEComparisonContext(this, new SingleExprContext(this, _parentctx, _parentState));
231
- localctx._left = _prevctx;
232
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
233
- this.state = 55;
234
- if (!(this.precpred(this._ctx, 7))) {
235
- throw this.createFailedPredicateException("this.precpred(this._ctx, 7)");
225
+ localContext = new SEComparisonContext(new SingleExprContext(parentContext, parentState));
226
+ localContext._left = previousContext;
227
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
228
+ this.state = 57;
229
+ if (!(this.precpred(this.context, 7))) {
230
+ throw this.createFailedPredicateException("this.precpred(this.context, 7)");
236
231
  }
237
- this.state = 56;
232
+ this.state = 58;
238
233
  this.match(IfcExpressionParser.CMP_OP);
239
- this.state = 57;
240
- localctx._right = this.singleExpr(8);
234
+ this.state = 59;
235
+ localContext._right = this.singleExpr(8);
241
236
  }
242
237
  break;
243
238
  case 5:
244
239
  {
245
- localctx = new SEBooleanBinaryOpContext(this, new SingleExprContext(this, _parentctx, _parentState));
246
- localctx._left = _prevctx;
247
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
248
- this.state = 58;
249
- if (!(this.precpred(this._ctx, 5))) {
250
- throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");
251
- }
252
- this.state = 59;
253
- localctx._op = this.match(IfcExpressionParser.BOOLEAN_BINARY_OP);
240
+ localContext = new SEBooleanBinaryOpContext(new SingleExprContext(parentContext, parentState));
241
+ localContext._left = previousContext;
242
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
254
243
  this.state = 60;
255
- localctx._right = this.singleExpr(6);
244
+ if (!(this.precpred(this.context, 5))) {
245
+ throw this.createFailedPredicateException("this.precpred(this.context, 5)");
246
+ }
247
+ this.state = 61;
248
+ localContext._op = this.match(IfcExpressionParser.BOOLEAN_BINARY_OP);
249
+ this.state = 62;
250
+ localContext._right = this.singleExpr(6);
256
251
  }
257
252
  break;
258
253
  case 6:
259
254
  {
260
- localctx = new SEMethodCallContext(this, new SingleExprContext(this, _parentctx, _parentState));
261
- localctx._target = _prevctx;
262
- this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr);
263
- this.state = 61;
264
- if (!(this.precpred(this._ctx, 10))) {
265
- throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");
255
+ localContext = new SEMethodCallContext(new SingleExprContext(parentContext, parentState));
256
+ localContext._target = previousContext;
257
+ this.pushNewRecursionContext(localContext, _startState, IfcExpressionParser.RULE_singleExpr);
258
+ this.state = 63;
259
+ if (!(this.precpred(this.context, 10))) {
260
+ throw this.createFailedPredicateException("this.precpred(this.context, 10)");
266
261
  }
267
- this.state = 62;
268
- localctx._call = this.methodCallChain();
262
+ this.state = 64;
263
+ localContext._call = this.methodCallChain();
269
264
  }
270
265
  break;
271
266
  }
272
267
  }
273
268
  }
274
- this.state = 67;
275
- this._errHandler.sync(this);
276
- _alt = this._interp.adaptivePredict(this._input, 2, this._ctx);
269
+ this.state = 69;
270
+ this.errorHandler.sync(this);
271
+ alternative = this.interpreter.adaptivePredict(this.tokenStream, 2, this.context);
277
272
  }
278
273
  }
279
274
  }
280
275
  catch (re) {
281
- if (re instanceof RecognitionException) {
282
- localctx.exception = re;
283
- this._errHandler.reportError(this, re);
284
- this._errHandler.recover(this, re);
276
+ if (re instanceof antlr.RecognitionException) {
277
+ this.errorHandler.reportError(this, re);
278
+ this.errorHandler.recover(this, re);
285
279
  }
286
280
  else {
287
281
  throw re;
288
282
  }
289
283
  }
290
284
  finally {
291
- this.unrollRecursionContexts(_parentctx);
285
+ this.unrollRecursionContexts(parentContext);
292
286
  }
293
- return localctx;
287
+ return localContext;
294
288
  }
295
- // @RuleVersion(0)
296
289
  methodCallChain() {
297
- let localctx = new MethodCallChainContext(this, this._ctx, this.state);
298
- this.enterRule(localctx, 4, IfcExpressionParser.RULE_methodCallChain);
290
+ let localContext = new MethodCallChainContext(this.context, this.state);
291
+ this.enterRule(localContext, 4, IfcExpressionParser.RULE_methodCallChain);
299
292
  try {
300
- this.state = 74;
301
- this._errHandler.sync(this);
302
- switch (this._interp.adaptivePredict(this._input, 3, this._ctx)) {
293
+ this.state = 76;
294
+ this.errorHandler.sync(this);
295
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 3, this.context)) {
303
296
  case 1:
304
- localctx = new MethodCallChainInnerContext(this, localctx);
305
- this.enterOuterAlt(localctx, 1);
297
+ localContext = new MethodCallChainInnerContext(localContext);
298
+ this.enterOuterAlt(localContext, 1);
306
299
  {
307
- this.state = 68;
308
- this.match(IfcExpressionParser.DOT);
309
- this.state = 69;
310
- localctx._target = this.functionCall();
311
300
  this.state = 70;
312
- localctx._call = this.methodCallChain();
301
+ this.match(IfcExpressionParser.DOT);
302
+ this.state = 71;
303
+ localContext._target = this.methodAccessor();
304
+ this.state = 72;
305
+ localContext._call = this.methodCallChain();
313
306
  }
314
307
  break;
315
308
  case 2:
316
- localctx = new MethodCallChainEndContext(this, localctx);
317
- this.enterOuterAlt(localctx, 2);
309
+ localContext = new MethodCallChainEndContext(localContext);
310
+ this.enterOuterAlt(localContext, 2);
318
311
  {
319
- this.state = 72;
312
+ this.state = 74;
320
313
  this.match(IfcExpressionParser.DOT);
321
- this.state = 73;
322
- localctx._call = this.functionCall();
314
+ this.state = 75;
315
+ localContext._call = this.methodAccessor();
316
+ }
317
+ break;
318
+ }
319
+ }
320
+ catch (re) {
321
+ if (re instanceof antlr.RecognitionException) {
322
+ this.errorHandler.reportError(this, re);
323
+ this.errorHandler.recover(this, re);
324
+ }
325
+ else {
326
+ throw re;
327
+ }
328
+ }
329
+ finally {
330
+ this.exitRule();
331
+ }
332
+ return localContext;
333
+ }
334
+ methodAccessor() {
335
+ let localContext = new MethodAccessorContext(this.context, this.state);
336
+ this.enterRule(localContext, 6, IfcExpressionParser.RULE_methodAccessor);
337
+ try {
338
+ this.state = 80;
339
+ this.errorHandler.sync(this);
340
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 4, this.context)) {
341
+ case 1:
342
+ localContext = new MethodFunctionCallContext(localContext);
343
+ this.enterOuterAlt(localContext, 1);
344
+ {
345
+ this.state = 78;
346
+ this.functionCall();
347
+ }
348
+ break;
349
+ case 2:
350
+ localContext = new MethodPropertyAccessContext(localContext);
351
+ this.enterOuterAlt(localContext, 2);
352
+ {
353
+ this.state = 79;
354
+ this.match(IfcExpressionParser.IDENTIFIER);
323
355
  }
324
356
  break;
325
357
  }
326
358
  }
327
359
  catch (re) {
328
- if (re instanceof RecognitionException) {
329
- localctx.exception = re;
330
- this._errHandler.reportError(this, re);
331
- this._errHandler.recover(this, re);
360
+ if (re instanceof antlr.RecognitionException) {
361
+ this.errorHandler.reportError(this, re);
362
+ this.errorHandler.recover(this, re);
332
363
  }
333
364
  else {
334
365
  throw re;
@@ -337,38 +368,36 @@ class IfcExpressionParser extends Parser {
337
368
  finally {
338
369
  this.exitRule();
339
370
  }
340
- return localctx;
371
+ return localContext;
341
372
  }
342
- // @RuleVersion(0)
343
373
  functionCall() {
344
- let localctx = new FunctionCallContext(this, this._ctx, this.state);
345
- this.enterRule(localctx, 6, IfcExpressionParser.RULE_functionCall);
374
+ let localContext = new FunctionCallContext(this.context, this.state);
375
+ this.enterRule(localContext, 8, IfcExpressionParser.RULE_functionCall);
346
376
  let _la;
347
377
  try {
348
- this.enterOuterAlt(localctx, 1);
378
+ this.enterOuterAlt(localContext, 1);
349
379
  {
350
- this.state = 76;
380
+ this.state = 82;
351
381
  this.match(IfcExpressionParser.IDENTIFIER);
352
- this.state = 77;
382
+ this.state = 83;
353
383
  this.match(IfcExpressionParser.T__1);
354
- this.state = 79;
355
- this._errHandler.sync(this);
356
- _la = this._input.LA(1);
384
+ this.state = 85;
385
+ this.errorHandler.sync(this);
386
+ _la = this.tokenStream.LA(1);
357
387
  if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1829398) !== 0)) {
358
388
  {
359
- this.state = 78;
360
- localctx._sub = this.exprList();
389
+ this.state = 84;
390
+ localContext._sub = this.exprList();
361
391
  }
362
392
  }
363
- this.state = 81;
393
+ this.state = 87;
364
394
  this.match(IfcExpressionParser.T__2);
365
395
  }
366
396
  }
367
397
  catch (re) {
368
- if (re instanceof RecognitionException) {
369
- localctx.exception = re;
370
- this._errHandler.reportError(this, re);
371
- this._errHandler.recover(this, re);
398
+ if (re instanceof antlr.RecognitionException) {
399
+ this.errorHandler.reportError(this, re);
400
+ this.errorHandler.recover(this, re);
372
401
  }
373
402
  else {
374
403
  throw re;
@@ -377,41 +406,39 @@ class IfcExpressionParser extends Parser {
377
406
  finally {
378
407
  this.exitRule();
379
408
  }
380
- return localctx;
409
+ return localContext;
381
410
  }
382
- // @RuleVersion(0)
383
411
  exprList() {
384
- let localctx = new ExprListContext(this, this._ctx, this.state);
385
- this.enterRule(localctx, 8, IfcExpressionParser.RULE_exprList);
412
+ let localContext = new ExprListContext(this.context, this.state);
413
+ this.enterRule(localContext, 10, IfcExpressionParser.RULE_exprList);
386
414
  try {
387
- this.state = 88;
388
- this._errHandler.sync(this);
389
- switch (this._interp.adaptivePredict(this._input, 5, this._ctx)) {
415
+ this.state = 94;
416
+ this.errorHandler.sync(this);
417
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 6, this.context)) {
390
418
  case 1:
391
- this.enterOuterAlt(localctx, 1);
419
+ this.enterOuterAlt(localContext, 1);
392
420
  {
393
- this.state = 83;
421
+ this.state = 89;
394
422
  this.singleExpr(0);
395
423
  }
396
424
  break;
397
425
  case 2:
398
- this.enterOuterAlt(localctx, 2);
426
+ this.enterOuterAlt(localContext, 2);
399
427
  {
400
- this.state = 84;
428
+ this.state = 90;
401
429
  this.singleExpr(0);
402
- this.state = 85;
430
+ this.state = 91;
403
431
  this.match(IfcExpressionParser.T__9);
404
- this.state = 86;
432
+ this.state = 92;
405
433
  this.exprList();
406
434
  }
407
435
  break;
408
436
  }
409
437
  }
410
438
  catch (re) {
411
- if (re instanceof RecognitionException) {
412
- localctx.exception = re;
413
- this._errHandler.reportError(this, re);
414
- this._errHandler.recover(this, re);
439
+ if (re instanceof antlr.RecognitionException) {
440
+ this.errorHandler.reportError(this, re);
441
+ this.errorHandler.recover(this, re);
415
442
  }
416
443
  else {
417
444
  throw re;
@@ -420,36 +447,34 @@ class IfcExpressionParser extends Parser {
420
447
  finally {
421
448
  this.exitRule();
422
449
  }
423
- return localctx;
450
+ return localContext;
424
451
  }
425
- // @RuleVersion(0)
426
452
  arrayExpr() {
427
- let localctx = new ArrayExprContext(this, this._ctx, this.state);
428
- this.enterRule(localctx, 10, IfcExpressionParser.RULE_arrayExpr);
453
+ let localContext = new ArrayExprContext(this.context, this.state);
454
+ this.enterRule(localContext, 12, IfcExpressionParser.RULE_arrayExpr);
429
455
  let _la;
430
456
  try {
431
- this.enterOuterAlt(localctx, 1);
457
+ this.enterOuterAlt(localContext, 1);
432
458
  {
433
- this.state = 90;
459
+ this.state = 96;
434
460
  this.match(IfcExpressionParser.T__10);
435
- this.state = 92;
436
- this._errHandler.sync(this);
437
- _la = this._input.LA(1);
461
+ this.state = 98;
462
+ this.errorHandler.sync(this);
463
+ _la = this.tokenStream.LA(1);
438
464
  if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1829398) !== 0)) {
439
465
  {
440
- this.state = 91;
441
- localctx._sub = this.arrayElementList();
466
+ this.state = 97;
467
+ localContext._sub = this.arrayElementList();
442
468
  }
443
469
  }
444
- this.state = 94;
470
+ this.state = 100;
445
471
  this.match(IfcExpressionParser.T__11);
446
472
  }
447
473
  }
448
474
  catch (re) {
449
- if (re instanceof RecognitionException) {
450
- localctx.exception = re;
451
- this._errHandler.reportError(this, re);
452
- this._errHandler.recover(this, re);
475
+ if (re instanceof antlr.RecognitionException) {
476
+ this.errorHandler.reportError(this, re);
477
+ this.errorHandler.recover(this, re);
453
478
  }
454
479
  else {
455
480
  throw re;
@@ -458,41 +483,39 @@ class IfcExpressionParser extends Parser {
458
483
  finally {
459
484
  this.exitRule();
460
485
  }
461
- return localctx;
486
+ return localContext;
462
487
  }
463
- // @RuleVersion(0)
464
488
  arrayElementList() {
465
- let localctx = new ArrayElementListContext(this, this._ctx, this.state);
466
- this.enterRule(localctx, 12, IfcExpressionParser.RULE_arrayElementList);
489
+ let localContext = new ArrayElementListContext(this.context, this.state);
490
+ this.enterRule(localContext, 14, IfcExpressionParser.RULE_arrayElementList);
467
491
  try {
468
- this.state = 101;
469
- this._errHandler.sync(this);
470
- switch (this._interp.adaptivePredict(this._input, 7, this._ctx)) {
492
+ this.state = 107;
493
+ this.errorHandler.sync(this);
494
+ switch (this.interpreter.adaptivePredict(this.tokenStream, 8, this.context)) {
471
495
  case 1:
472
- this.enterOuterAlt(localctx, 1);
496
+ this.enterOuterAlt(localContext, 1);
473
497
  {
474
- this.state = 96;
498
+ this.state = 102;
475
499
  this.singleExpr(0);
476
500
  }
477
501
  break;
478
502
  case 2:
479
- this.enterOuterAlt(localctx, 2);
503
+ this.enterOuterAlt(localContext, 2);
480
504
  {
481
- this.state = 97;
505
+ this.state = 103;
482
506
  this.singleExpr(0);
483
- this.state = 98;
507
+ this.state = 104;
484
508
  this.match(IfcExpressionParser.T__9);
485
- this.state = 99;
509
+ this.state = 105;
486
510
  this.arrayElementList();
487
511
  }
488
512
  break;
489
513
  }
490
514
  }
491
515
  catch (re) {
492
- if (re instanceof RecognitionException) {
493
- localctx.exception = re;
494
- this._errHandler.reportError(this, re);
495
- this._errHandler.recover(this, re);
516
+ if (re instanceof antlr.RecognitionException) {
517
+ this.errorHandler.reportError(this, re);
518
+ this.errorHandler.recover(this, re);
496
519
  }
497
520
  else {
498
521
  throw re;
@@ -501,54 +524,52 @@ class IfcExpressionParser extends Parser {
501
524
  finally {
502
525
  this.exitRule();
503
526
  }
504
- return localctx;
527
+ return localContext;
505
528
  }
506
- // @RuleVersion(0)
507
529
  literal() {
508
- let localctx = new LiteralContext(this, this._ctx, this.state);
509
- this.enterRule(localctx, 14, IfcExpressionParser.RULE_literal);
530
+ let localContext = new LiteralContext(this.context, this.state);
531
+ this.enterRule(localContext, 16, IfcExpressionParser.RULE_literal);
510
532
  try {
511
- this.state = 107;
512
- this._errHandler.sync(this);
513
- switch (this._input.LA(1)) {
514
- case 14:
515
- case 15:
516
- this.enterOuterAlt(localctx, 1);
533
+ this.state = 113;
534
+ this.errorHandler.sync(this);
535
+ switch (this.tokenStream.LA(1)) {
536
+ case IfcExpressionParser.INT:
537
+ case IfcExpressionParser.FLOAT:
538
+ this.enterOuterAlt(localContext, 1);
517
539
  {
518
- this.state = 103;
540
+ this.state = 109;
519
541
  this.numLiteral();
520
542
  }
521
543
  break;
522
- case 19:
523
- this.enterOuterAlt(localctx, 2);
544
+ case IfcExpressionParser.QUOTED_STRING:
545
+ this.enterOuterAlt(localContext, 2);
524
546
  {
525
- this.state = 104;
547
+ this.state = 110;
526
548
  this.stringLiteral();
527
549
  }
528
550
  break;
529
- case 16:
530
- this.enterOuterAlt(localctx, 3);
551
+ case IfcExpressionParser.BOOLEAN:
552
+ this.enterOuterAlt(localContext, 3);
531
553
  {
532
- this.state = 105;
554
+ this.state = 111;
533
555
  this.booleanLiteral();
534
556
  }
535
557
  break;
536
- case 17:
537
- this.enterOuterAlt(localctx, 4);
558
+ case IfcExpressionParser.LOGICAL_UNKNOWN:
559
+ this.enterOuterAlt(localContext, 4);
538
560
  {
539
- this.state = 106;
561
+ this.state = 112;
540
562
  this.logicalLiteral();
541
563
  }
542
564
  break;
543
565
  default:
544
- throw new NoViableAltException(this);
566
+ throw new antlr.NoViableAltException(this);
545
567
  }
546
568
  }
547
569
  catch (re) {
548
- if (re instanceof RecognitionException) {
549
- localctx.exception = re;
550
- this._errHandler.reportError(this, re);
551
- this._errHandler.recover(this, re);
570
+ if (re instanceof antlr.RecognitionException) {
571
+ this.errorHandler.reportError(this, re);
572
+ this.errorHandler.recover(this, re);
552
573
  }
553
574
  else {
554
575
  throw re;
@@ -557,32 +578,30 @@ class IfcExpressionParser extends Parser {
557
578
  finally {
558
579
  this.exitRule();
559
580
  }
560
- return localctx;
581
+ return localContext;
561
582
  }
562
- // @RuleVersion(0)
563
583
  numLiteral() {
564
- let localctx = new NumLiteralContext(this, this._ctx, this.state);
565
- this.enterRule(localctx, 16, IfcExpressionParser.RULE_numLiteral);
584
+ let localContext = new NumLiteralContext(this.context, this.state);
585
+ this.enterRule(localContext, 18, IfcExpressionParser.RULE_numLiteral);
566
586
  let _la;
567
587
  try {
568
- this.enterOuterAlt(localctx, 1);
588
+ this.enterOuterAlt(localContext, 1);
569
589
  {
570
- this.state = 109;
571
- _la = this._input.LA(1);
590
+ this.state = 115;
591
+ _la = this.tokenStream.LA(1);
572
592
  if (!(_la === 14 || _la === 15)) {
573
- this._errHandler.recoverInline(this);
593
+ this.errorHandler.recoverInline(this);
574
594
  }
575
595
  else {
576
- this._errHandler.reportMatch(this);
596
+ this.errorHandler.reportMatch(this);
577
597
  this.consume();
578
598
  }
579
599
  }
580
600
  }
581
601
  catch (re) {
582
- if (re instanceof RecognitionException) {
583
- localctx.exception = re;
584
- this._errHandler.reportError(this, re);
585
- this._errHandler.recover(this, re);
602
+ if (re instanceof antlr.RecognitionException) {
603
+ this.errorHandler.reportError(this, re);
604
+ this.errorHandler.recover(this, re);
586
605
  }
587
606
  else {
588
607
  throw re;
@@ -591,24 +610,22 @@ class IfcExpressionParser extends Parser {
591
610
  finally {
592
611
  this.exitRule();
593
612
  }
594
- return localctx;
613
+ return localContext;
595
614
  }
596
- // @RuleVersion(0)
597
615
  stringLiteral() {
598
- let localctx = new StringLiteralContext(this, this._ctx, this.state);
599
- this.enterRule(localctx, 18, IfcExpressionParser.RULE_stringLiteral);
616
+ let localContext = new StringLiteralContext(this.context, this.state);
617
+ this.enterRule(localContext, 20, IfcExpressionParser.RULE_stringLiteral);
600
618
  try {
601
- this.enterOuterAlt(localctx, 1);
619
+ this.enterOuterAlt(localContext, 1);
602
620
  {
603
- this.state = 111;
621
+ this.state = 117;
604
622
  this.match(IfcExpressionParser.QUOTED_STRING);
605
623
  }
606
624
  }
607
625
  catch (re) {
608
- if (re instanceof RecognitionException) {
609
- localctx.exception = re;
610
- this._errHandler.reportError(this, re);
611
- this._errHandler.recover(this, re);
626
+ if (re instanceof antlr.RecognitionException) {
627
+ this.errorHandler.reportError(this, re);
628
+ this.errorHandler.recover(this, re);
612
629
  }
613
630
  else {
614
631
  throw re;
@@ -617,24 +634,22 @@ class IfcExpressionParser extends Parser {
617
634
  finally {
618
635
  this.exitRule();
619
636
  }
620
- return localctx;
637
+ return localContext;
621
638
  }
622
- // @RuleVersion(0)
623
639
  booleanLiteral() {
624
- let localctx = new BooleanLiteralContext(this, this._ctx, this.state);
625
- this.enterRule(localctx, 20, IfcExpressionParser.RULE_booleanLiteral);
640
+ let localContext = new BooleanLiteralContext(this.context, this.state);
641
+ this.enterRule(localContext, 22, IfcExpressionParser.RULE_booleanLiteral);
626
642
  try {
627
- this.enterOuterAlt(localctx, 1);
643
+ this.enterOuterAlt(localContext, 1);
628
644
  {
629
- this.state = 113;
645
+ this.state = 119;
630
646
  this.match(IfcExpressionParser.BOOLEAN);
631
647
  }
632
648
  }
633
649
  catch (re) {
634
- if (re instanceof RecognitionException) {
635
- localctx.exception = re;
636
- this._errHandler.reportError(this, re);
637
- this._errHandler.recover(this, re);
650
+ if (re instanceof antlr.RecognitionException) {
651
+ this.errorHandler.reportError(this, re);
652
+ this.errorHandler.recover(this, re);
638
653
  }
639
654
  else {
640
655
  throw re;
@@ -643,24 +658,22 @@ class IfcExpressionParser extends Parser {
643
658
  finally {
644
659
  this.exitRule();
645
660
  }
646
- return localctx;
661
+ return localContext;
647
662
  }
648
- // @RuleVersion(0)
649
663
  logicalLiteral() {
650
- let localctx = new LogicalLiteralContext(this, this._ctx, this.state);
651
- this.enterRule(localctx, 22, IfcExpressionParser.RULE_logicalLiteral);
664
+ let localContext = new LogicalLiteralContext(this.context, this.state);
665
+ this.enterRule(localContext, 24, IfcExpressionParser.RULE_logicalLiteral);
652
666
  try {
653
- this.enterOuterAlt(localctx, 1);
667
+ this.enterOuterAlt(localContext, 1);
654
668
  {
655
- this.state = 115;
669
+ this.state = 121;
656
670
  this.match(IfcExpressionParser.LOGICAL_UNKNOWN);
657
671
  }
658
672
  }
659
673
  catch (re) {
660
- if (re instanceof RecognitionException) {
661
- localctx.exception = re;
662
- this._errHandler.reportError(this, re);
663
- this._errHandler.recover(this, re);
674
+ if (re instanceof antlr.RecognitionException) {
675
+ this.errorHandler.reportError(this, re);
676
+ this.errorHandler.recover(this, re);
664
677
  }
665
678
  else {
666
679
  throw re;
@@ -669,26 +682,24 @@ class IfcExpressionParser extends Parser {
669
682
  finally {
670
683
  this.exitRule();
671
684
  }
672
- return localctx;
685
+ return localContext;
673
686
  }
674
- // @RuleVersion(0)
675
687
  variableRef() {
676
- let localctx = new VariableRefContext(this, this._ctx, this.state);
677
- this.enterRule(localctx, 24, IfcExpressionParser.RULE_variableRef);
688
+ let localContext = new VariableRefContext(this.context, this.state);
689
+ this.enterRule(localContext, 26, IfcExpressionParser.RULE_variableRef);
678
690
  try {
679
- this.enterOuterAlt(localctx, 1);
691
+ this.enterOuterAlt(localContext, 1);
680
692
  {
681
- this.state = 117;
693
+ this.state = 123;
682
694
  this.match(IfcExpressionParser.T__12);
683
- this.state = 118;
695
+ this.state = 124;
684
696
  this.match(IfcExpressionParser.IDENTIFIER);
685
697
  }
686
698
  }
687
699
  catch (re) {
688
- if (re instanceof RecognitionException) {
689
- localctx.exception = re;
690
- this._errHandler.reportError(this, re);
691
- this._errHandler.recover(this, re);
700
+ if (re instanceof antlr.RecognitionException) {
701
+ this.errorHandler.reportError(this, re);
702
+ this.errorHandler.recover(this, re);
692
703
  }
693
704
  else {
694
705
  throw re;
@@ -697,38 +708,41 @@ class IfcExpressionParser extends Parser {
697
708
  finally {
698
709
  this.exitRule();
699
710
  }
700
- return localctx;
711
+ return localContext;
701
712
  }
702
- sempred(localctx, ruleIndex, predIndex) {
713
+ sempred(localContext, ruleIndex, predIndex) {
703
714
  switch (ruleIndex) {
704
715
  case 1:
705
- return this.singleExpr_sempred(localctx, predIndex);
716
+ return this.singleExpr_sempred(localContext, predIndex);
706
717
  }
707
718
  return true;
708
719
  }
709
- singleExpr_sempred(localctx, predIndex) {
720
+ singleExpr_sempred(localContext, predIndex) {
710
721
  switch (predIndex) {
711
722
  case 0:
712
- return this.precpred(this._ctx, 11);
723
+ return this.precpred(this.context, 11);
713
724
  case 1:
714
- return this.precpred(this._ctx, 9);
725
+ return this.precpred(this.context, 9);
715
726
  case 2:
716
- return this.precpred(this._ctx, 8);
727
+ return this.precpred(this.context, 8);
717
728
  case 3:
718
- return this.precpred(this._ctx, 7);
729
+ return this.precpred(this.context, 7);
719
730
  case 4:
720
- return this.precpred(this._ctx, 5);
731
+ return this.precpred(this.context, 5);
721
732
  case 5:
722
- return this.precpred(this._ctx, 10);
733
+ return this.precpred(this.context, 10);
723
734
  }
724
735
  return true;
725
736
  }
726
737
  static get _ATN() {
727
738
  if (!IfcExpressionParser.__ATN) {
728
- IfcExpressionParser.__ATN = new ATNDeserializer().deserialize(IfcExpressionParser._serializedATN);
739
+ IfcExpressionParser.__ATN = new antlr.ATNDeserializer().deserialize(IfcExpressionParser._serializedATN);
729
740
  }
730
741
  return IfcExpressionParser.__ATN;
731
742
  }
743
+ get vocabulary() {
744
+ return IfcExpressionParser.vocabulary;
745
+ }
732
746
  }
733
747
  IfcExpressionParser.T__0 = 1;
734
748
  IfcExpressionParser.T__1 = 2;
@@ -754,96 +768,86 @@ IfcExpressionParser.WS = 21;
754
768
  IfcExpressionParser.NEWLINE = 22;
755
769
  IfcExpressionParser.BOOLEAN_BINARY_OP = 23;
756
770
  IfcExpressionParser.CMP_OP = 24;
757
- IfcExpressionParser.EOF = Token.EOF;
758
771
  IfcExpressionParser.RULE_expr = 0;
759
772
  IfcExpressionParser.RULE_singleExpr = 1;
760
773
  IfcExpressionParser.RULE_methodCallChain = 2;
761
- IfcExpressionParser.RULE_functionCall = 3;
762
- IfcExpressionParser.RULE_exprList = 4;
763
- IfcExpressionParser.RULE_arrayExpr = 5;
764
- IfcExpressionParser.RULE_arrayElementList = 6;
765
- IfcExpressionParser.RULE_literal = 7;
766
- IfcExpressionParser.RULE_numLiteral = 8;
767
- IfcExpressionParser.RULE_stringLiteral = 9;
768
- IfcExpressionParser.RULE_booleanLiteral = 10;
769
- IfcExpressionParser.RULE_logicalLiteral = 11;
770
- IfcExpressionParser.RULE_variableRef = 12;
771
- IfcExpressionParser.literalNames = [null, "'--'",
772
- "'('", "')'",
773
- "'-'", "'^'",
774
- "'*'", "'/'",
775
- "'+'", "'!'",
776
- "','", "'['",
777
- "']'", "'$'",
778
- null, null,
779
- null, null,
780
- "'.'"];
781
- IfcExpressionParser.symbolicNames = [null, null,
782
- null, null,
783
- null, null,
784
- null, null,
785
- null, null,
786
- null, null,
787
- null, null,
788
- "INT", "FLOAT",
789
- "BOOLEAN",
790
- "LOGICAL_UNKNOWN",
791
- "DOT", "QUOTED_STRING",
792
- "IDENTIFIER",
793
- "WS", "NEWLINE",
794
- "BOOLEAN_BINARY_OP",
795
- "CMP_OP"];
796
- // tslint:disable:no-trailing-whitespace
774
+ IfcExpressionParser.RULE_methodAccessor = 3;
775
+ IfcExpressionParser.RULE_functionCall = 4;
776
+ IfcExpressionParser.RULE_exprList = 5;
777
+ IfcExpressionParser.RULE_arrayExpr = 6;
778
+ IfcExpressionParser.RULE_arrayElementList = 7;
779
+ IfcExpressionParser.RULE_literal = 8;
780
+ IfcExpressionParser.RULE_numLiteral = 9;
781
+ IfcExpressionParser.RULE_stringLiteral = 10;
782
+ IfcExpressionParser.RULE_booleanLiteral = 11;
783
+ IfcExpressionParser.RULE_logicalLiteral = 12;
784
+ IfcExpressionParser.RULE_variableRef = 13;
785
+ IfcExpressionParser.literalNames = [
786
+ null, "'--'", "'('", "')'", "'-'", "'^'", "'*'", "'/'", "'+'", "'!'",
787
+ "','", "'['", "']'", "'$'", null, null, null, null, "'.'"
788
+ ];
789
+ IfcExpressionParser.symbolicNames = [
790
+ null, null, null, null, null, null, null, null, null, null, null,
791
+ null, null, null, "INT", "FLOAT", "BOOLEAN", "LOGICAL_UNKNOWN",
792
+ "DOT", "QUOTED_STRING", "IDENTIFIER", "WS", "NEWLINE", "BOOLEAN_BINARY_OP",
793
+ "CMP_OP"
794
+ ];
797
795
  IfcExpressionParser.ruleNames = [
798
- "expr", "singleExpr", "methodCallChain", "functionCall", "exprList", "arrayExpr",
799
- "arrayElementList", "literal", "numLiteral", "stringLiteral", "booleanLiteral",
800
- "logicalLiteral", "variableRef",
796
+ "expr", "singleExpr", "methodCallChain", "methodAccessor", "functionCall",
797
+ "exprList", "arrayExpr", "arrayElementList", "literal", "numLiteral",
798
+ "stringLiteral", "booleanLiteral", "logicalLiteral", "variableRef",
801
799
  ];
802
- IfcExpressionParser._serializedATN = [4, 1, 24, 121, 2, 0, 7, 0, 2,
803
- 1, 7, 1, 2, 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,
804
- 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
805
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 45, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
806
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 64, 8, 1, 10, 1, 12, 1, 67, 9, 1, 1, 2, 1, 2,
807
- 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 75, 8, 2, 1, 3, 1, 3, 1, 3, 3, 3, 80, 8, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 4, 1,
808
- 4, 1, 4, 3, 4, 89, 8, 4, 1, 5, 1, 5, 3, 5, 93, 8, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 6, 3, 6, 102,
809
- 8, 6, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 108, 8, 7, 1, 8, 1, 8, 1, 9, 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12,
810
- 1, 12, 1, 12, 1, 12, 0, 1, 2, 13, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 0, 3, 1, 0, 6, 7, 2,
811
- 0, 4, 4, 8, 8, 1, 0, 14, 15, 128, 0, 26, 1, 0, 0, 0, 2, 44, 1, 0, 0, 0, 4, 74, 1, 0, 0, 0, 6, 76, 1, 0,
812
- 0, 0, 8, 88, 1, 0, 0, 0, 10, 90, 1, 0, 0, 0, 12, 101, 1, 0, 0, 0, 14, 107, 1, 0, 0, 0, 16, 109, 1, 0,
813
- 0, 0, 18, 111, 1, 0, 0, 0, 20, 113, 1, 0, 0, 0, 22, 115, 1, 0, 0, 0, 24, 117, 1, 0, 0, 0, 26, 27, 3,
814
- 2, 1, 0, 27, 28, 5, 0, 0, 1, 28, 1, 1, 0, 0, 0, 29, 30, 6, 1, -1, 0, 30, 31, 5, 1, 0, 0, 31, 45, 3, 2,
815
- 1, 14, 32, 33, 5, 2, 0, 0, 33, 34, 3, 2, 1, 0, 34, 35, 5, 3, 0, 0, 35, 45, 1, 0, 0, 0, 36, 37, 5, 4,
816
- 0, 0, 37, 45, 3, 2, 1, 12, 38, 39, 5, 9, 0, 0, 39, 45, 3, 2, 1, 6, 40, 45, 3, 24, 12, 0, 41, 45, 3,
817
- 6, 3, 0, 42, 45, 3, 14, 7, 0, 43, 45, 3, 10, 5, 0, 44, 29, 1, 0, 0, 0, 44, 32, 1, 0, 0, 0, 44, 36, 1,
818
- 0, 0, 0, 44, 38, 1, 0, 0, 0, 44, 40, 1, 0, 0, 0, 44, 41, 1, 0, 0, 0, 44, 42, 1, 0, 0, 0, 44, 43, 1, 0,
819
- 0, 0, 45, 65, 1, 0, 0, 0, 46, 47, 10, 11, 0, 0, 47, 48, 5, 5, 0, 0, 48, 64, 3, 2, 1, 11, 49, 50, 10,
820
- 9, 0, 0, 50, 51, 7, 0, 0, 0, 51, 64, 3, 2, 1, 10, 52, 53, 10, 8, 0, 0, 53, 54, 7, 1, 0, 0, 54, 64, 3,
821
- 2, 1, 9, 55, 56, 10, 7, 0, 0, 56, 57, 5, 24, 0, 0, 57, 64, 3, 2, 1, 8, 58, 59, 10, 5, 0, 0, 59, 60,
822
- 5, 23, 0, 0, 60, 64, 3, 2, 1, 6, 61, 62, 10, 10, 0, 0, 62, 64, 3, 4, 2, 0, 63, 46, 1, 0, 0, 0, 63, 49,
823
- 1, 0, 0, 0, 63, 52, 1, 0, 0, 0, 63, 55, 1, 0, 0, 0, 63, 58, 1, 0, 0, 0, 63, 61, 1, 0, 0, 0, 64, 67, 1,
824
- 0, 0, 0, 65, 63, 1, 0, 0, 0, 65, 66, 1, 0, 0, 0, 66, 3, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 68, 69, 5, 18,
825
- 0, 0, 69, 70, 3, 6, 3, 0, 70, 71, 3, 4, 2, 0, 71, 75, 1, 0, 0, 0, 72, 73, 5, 18, 0, 0, 73, 75, 3, 6,
826
- 3, 0, 74, 68, 1, 0, 0, 0, 74, 72, 1, 0, 0, 0, 75, 5, 1, 0, 0, 0, 76, 77, 5, 20, 0, 0, 77, 79, 5, 2, 0,
827
- 0, 78, 80, 3, 8, 4, 0, 79, 78, 1, 0, 0, 0, 79, 80, 1, 0, 0, 0, 80, 81, 1, 0, 0, 0, 81, 82, 5, 3, 0, 0,
828
- 82, 7, 1, 0, 0, 0, 83, 89, 3, 2, 1, 0, 84, 85, 3, 2, 1, 0, 85, 86, 5, 10, 0, 0, 86, 87, 3, 8, 4, 0, 87,
829
- 89, 1, 0, 0, 0, 88, 83, 1, 0, 0, 0, 88, 84, 1, 0, 0, 0, 89, 9, 1, 0, 0, 0, 90, 92, 5, 11, 0, 0, 91, 93,
830
- 3, 12, 6, 0, 92, 91, 1, 0, 0, 0, 92, 93, 1, 0, 0, 0, 93, 94, 1, 0, 0, 0, 94, 95, 5, 12, 0, 0, 95, 11,
831
- 1, 0, 0, 0, 96, 102, 3, 2, 1, 0, 97, 98, 3, 2, 1, 0, 98, 99, 5, 10, 0, 0, 99, 100, 3, 12, 6, 0, 100,
832
- 102, 1, 0, 0, 0, 101, 96, 1, 0, 0, 0, 101, 97, 1, 0, 0, 0, 102, 13, 1, 0, 0, 0, 103, 108, 3, 16, 8,
833
- 0, 104, 108, 3, 18, 9, 0, 105, 108, 3, 20, 10, 0, 106, 108, 3, 22, 11, 0, 107, 103, 1, 0, 0, 0,
834
- 107, 104, 1, 0, 0, 0, 107, 105, 1, 0, 0, 0, 107, 106, 1, 0, 0, 0, 108, 15, 1, 0, 0, 0, 109, 110,
835
- 7, 2, 0, 0, 110, 17, 1, 0, 0, 0, 111, 112, 5, 19, 0, 0, 112, 19, 1, 0, 0, 0, 113, 114, 5, 16, 0, 0,
836
- 114, 21, 1, 0, 0, 0, 115, 116, 5, 17, 0, 0, 116, 23, 1, 0, 0, 0, 117, 118, 5, 13, 0, 0, 118, 119,
837
- 5, 20, 0, 0, 119, 25, 1, 0, 0, 0, 9, 44, 63, 65, 74, 79, 88, 92, 101, 107];
838
- IfcExpressionParser.DecisionsToDFA = IfcExpressionParser._ATN.decisionToState.map((ds, index) => new DFA(ds, index));
839
- export default IfcExpressionParser;
840
- export class ExprContext extends ParserRuleContext {
841
- constructor(parser, parent, invokingState) {
800
+ IfcExpressionParser._serializedATN = [
801
+ 4, 1, 24, 127, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7,
802
+ 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, 13, 7, 13,
803
+ 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
804
+ 1, 1, 1, 1, 3, 1, 47, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
805
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 66, 8, 1, 10, 1, 12, 1, 69, 9, 1, 1, 2, 1, 2, 1, 2, 1,
806
+ 2, 1, 2, 1, 2, 3, 2, 77, 8, 2, 1, 3, 1, 3, 3, 3, 81, 8, 3, 1, 4, 1, 4, 1, 4, 3, 4, 86, 8, 4, 1,
807
+ 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 3, 5, 95, 8, 5, 1, 6, 1, 6, 3, 6, 99, 8, 6, 1, 6, 1, 6,
808
+ 1, 7, 1, 7, 1, 7, 1, 7, 1, 7, 3, 7, 108, 8, 7, 1, 8, 1, 8, 1, 8, 1, 8, 3, 8, 114, 8, 8, 1, 9,
809
+ 1, 9, 1, 10, 1, 10, 1, 11, 1, 11, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 0, 1, 2, 14, 0,
810
+ 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 0, 3, 1, 0, 6, 7, 2, 0, 4, 4, 8, 8, 1, 0, 14,
811
+ 15, 134, 0, 28, 1, 0, 0, 0, 2, 46, 1, 0, 0, 0, 4, 76, 1, 0, 0, 0, 6, 80, 1, 0, 0, 0, 8, 82,
812
+ 1, 0, 0, 0, 10, 94, 1, 0, 0, 0, 12, 96, 1, 0, 0, 0, 14, 107, 1, 0, 0, 0, 16, 113, 1, 0, 0,
813
+ 0, 18, 115, 1, 0, 0, 0, 20, 117, 1, 0, 0, 0, 22, 119, 1, 0, 0, 0, 24, 121, 1, 0, 0, 0, 26,
814
+ 123, 1, 0, 0, 0, 28, 29, 3, 2, 1, 0, 29, 30, 5, 0, 0, 1, 30, 1, 1, 0, 0, 0, 31, 32, 6, 1, -1,
815
+ 0, 32, 33, 5, 1, 0, 0, 33, 47, 3, 2, 1, 14, 34, 35, 5, 2, 0, 0, 35, 36, 3, 2, 1, 0, 36, 37,
816
+ 5, 3, 0, 0, 37, 47, 1, 0, 0, 0, 38, 39, 5, 4, 0, 0, 39, 47, 3, 2, 1, 12, 40, 41, 5, 9, 0, 0,
817
+ 41, 47, 3, 2, 1, 6, 42, 47, 3, 26, 13, 0, 43, 47, 3, 8, 4, 0, 44, 47, 3, 16, 8, 0, 45, 47,
818
+ 3, 12, 6, 0, 46, 31, 1, 0, 0, 0, 46, 34, 1, 0, 0, 0, 46, 38, 1, 0, 0, 0, 46, 40, 1, 0, 0, 0,
819
+ 46, 42, 1, 0, 0, 0, 46, 43, 1, 0, 0, 0, 46, 44, 1, 0, 0, 0, 46, 45, 1, 0, 0, 0, 47, 67, 1,
820
+ 0, 0, 0, 48, 49, 10, 11, 0, 0, 49, 50, 5, 5, 0, 0, 50, 66, 3, 2, 1, 11, 51, 52, 10, 9, 0,
821
+ 0, 52, 53, 7, 0, 0, 0, 53, 66, 3, 2, 1, 10, 54, 55, 10, 8, 0, 0, 55, 56, 7, 1, 0, 0, 56, 66,
822
+ 3, 2, 1, 9, 57, 58, 10, 7, 0, 0, 58, 59, 5, 24, 0, 0, 59, 66, 3, 2, 1, 8, 60, 61, 10, 5, 0,
823
+ 0, 61, 62, 5, 23, 0, 0, 62, 66, 3, 2, 1, 6, 63, 64, 10, 10, 0, 0, 64, 66, 3, 4, 2, 0, 65,
824
+ 48, 1, 0, 0, 0, 65, 51, 1, 0, 0, 0, 65, 54, 1, 0, 0, 0, 65, 57, 1, 0, 0, 0, 65, 60, 1, 0, 0,
825
+ 0, 65, 63, 1, 0, 0, 0, 66, 69, 1, 0, 0, 0, 67, 65, 1, 0, 0, 0, 67, 68, 1, 0, 0, 0, 68, 3, 1,
826
+ 0, 0, 0, 69, 67, 1, 0, 0, 0, 70, 71, 5, 18, 0, 0, 71, 72, 3, 6, 3, 0, 72, 73, 3, 4, 2, 0, 73,
827
+ 77, 1, 0, 0, 0, 74, 75, 5, 18, 0, 0, 75, 77, 3, 6, 3, 0, 76, 70, 1, 0, 0, 0, 76, 74, 1, 0,
828
+ 0, 0, 77, 5, 1, 0, 0, 0, 78, 81, 3, 8, 4, 0, 79, 81, 5, 20, 0, 0, 80, 78, 1, 0, 0, 0, 80, 79,
829
+ 1, 0, 0, 0, 81, 7, 1, 0, 0, 0, 82, 83, 5, 20, 0, 0, 83, 85, 5, 2, 0, 0, 84, 86, 3, 10, 5, 0,
830
+ 85, 84, 1, 0, 0, 0, 85, 86, 1, 0, 0, 0, 86, 87, 1, 0, 0, 0, 87, 88, 5, 3, 0, 0, 88, 9, 1, 0,
831
+ 0, 0, 89, 95, 3, 2, 1, 0, 90, 91, 3, 2, 1, 0, 91, 92, 5, 10, 0, 0, 92, 93, 3, 10, 5, 0, 93,
832
+ 95, 1, 0, 0, 0, 94, 89, 1, 0, 0, 0, 94, 90, 1, 0, 0, 0, 95, 11, 1, 0, 0, 0, 96, 98, 5, 11,
833
+ 0, 0, 97, 99, 3, 14, 7, 0, 98, 97, 1, 0, 0, 0, 98, 99, 1, 0, 0, 0, 99, 100, 1, 0, 0, 0, 100,
834
+ 101, 5, 12, 0, 0, 101, 13, 1, 0, 0, 0, 102, 108, 3, 2, 1, 0, 103, 104, 3, 2, 1, 0, 104,
835
+ 105, 5, 10, 0, 0, 105, 106, 3, 14, 7, 0, 106, 108, 1, 0, 0, 0, 107, 102, 1, 0, 0, 0, 107,
836
+ 103, 1, 0, 0, 0, 108, 15, 1, 0, 0, 0, 109, 114, 3, 18, 9, 0, 110, 114, 3, 20, 10, 0, 111,
837
+ 114, 3, 22, 11, 0, 112, 114, 3, 24, 12, 0, 113, 109, 1, 0, 0, 0, 113, 110, 1, 0, 0, 0,
838
+ 113, 111, 1, 0, 0, 0, 113, 112, 1, 0, 0, 0, 114, 17, 1, 0, 0, 0, 115, 116, 7, 2, 0, 0, 116,
839
+ 19, 1, 0, 0, 0, 117, 118, 5, 19, 0, 0, 118, 21, 1, 0, 0, 0, 119, 120, 5, 16, 0, 0, 120,
840
+ 23, 1, 0, 0, 0, 121, 122, 5, 17, 0, 0, 122, 25, 1, 0, 0, 0, 123, 124, 5, 13, 0, 0, 124,
841
+ 125, 5, 20, 0, 0, 125, 27, 1, 0, 0, 0, 10, 46, 65, 67, 76, 80, 85, 94, 98, 107, 113
842
+ ];
843
+ IfcExpressionParser.vocabulary = new antlr.Vocabulary(IfcExpressionParser.literalNames, IfcExpressionParser.symbolicNames, []);
844
+ IfcExpressionParser.decisionsToDFA = IfcExpressionParser._ATN.decisionToState.map((ds, index) => new antlr.DFA(ds, index));
845
+ export class ExprContext extends antlr.ParserRuleContext {
846
+ constructor(parent, invokingState) {
842
847
  super(parent, invokingState);
843
- this.parser = parser;
844
848
  }
845
849
  singleExpr() {
846
- return this.getTypedRuleContext(SingleExprContext, 0);
850
+ return this.getRuleContext(0, SingleExprContext);
847
851
  }
848
852
  EOF() {
849
853
  return this.getToken(IfcExpressionParser.EOF, 0);
@@ -861,7 +865,6 @@ export class ExprContext extends ParserRuleContext {
861
865
  listener.exitExpr(this);
862
866
  }
863
867
  }
864
- // @Override
865
868
  accept(visitor) {
866
869
  if (visitor.visitExpr) {
867
870
  return visitor.visitExpr(this);
@@ -871,10 +874,9 @@ export class ExprContext extends ParserRuleContext {
871
874
  }
872
875
  }
873
876
  }
874
- export class SingleExprContext extends ParserRuleContext {
875
- constructor(parser, parent, invokingState) {
877
+ export class SingleExprContext extends antlr.ParserRuleContext {
878
+ constructor(parent, invokingState) {
876
879
  super(parent, invokingState);
877
- this.parser = parser;
878
880
  }
879
881
  get ruleIndex() {
880
882
  return IfcExpressionParser.RULE_singleExpr;
@@ -883,214 +885,189 @@ export class SingleExprContext extends ParserRuleContext {
883
885
  super.copyFrom(ctx);
884
886
  }
885
887
  }
886
- export class SEComparisonContext extends SingleExprContext {
887
- constructor(parser, ctx) {
888
- super(parser, ctx.parentCtx, ctx.invokingState);
888
+ export class SEUnaryMultipleMinusContext extends SingleExprContext {
889
+ constructor(ctx) {
890
+ super(ctx.parent, ctx.invokingState);
889
891
  super.copyFrom(ctx);
890
892
  }
891
- CMP_OP() {
892
- return this.getToken(IfcExpressionParser.CMP_OP, 0);
893
- }
894
- singleExpr_list() {
895
- return this.getTypedRuleContexts(SingleExprContext);
896
- }
897
- singleExpr(i) {
898
- return this.getTypedRuleContext(SingleExprContext, i);
893
+ singleExpr() {
894
+ return this.getRuleContext(0, SingleExprContext);
899
895
  }
900
896
  enterRule(listener) {
901
- if (listener.enterSEComparison) {
902
- listener.enterSEComparison(this);
897
+ if (listener.enterSEUnaryMultipleMinus) {
898
+ listener.enterSEUnaryMultipleMinus(this);
903
899
  }
904
900
  }
905
901
  exitRule(listener) {
906
- if (listener.exitSEComparison) {
907
- listener.exitSEComparison(this);
902
+ if (listener.exitSEUnaryMultipleMinus) {
903
+ listener.exitSEUnaryMultipleMinus(this);
908
904
  }
909
905
  }
910
- // @Override
911
906
  accept(visitor) {
912
- if (visitor.visitSEComparison) {
913
- return visitor.visitSEComparison(this);
907
+ if (visitor.visitSEUnaryMultipleMinus) {
908
+ return visitor.visitSEUnaryMultipleMinus(this);
914
909
  }
915
910
  else {
916
911
  return visitor.visitChildren(this);
917
912
  }
918
913
  }
919
914
  }
920
- export class SELiteralContext extends SingleExprContext {
921
- constructor(parser, ctx) {
922
- super(parser, ctx.parentCtx, ctx.invokingState);
915
+ export class SEParenthesisContext extends SingleExprContext {
916
+ constructor(ctx) {
917
+ super(ctx.parent, ctx.invokingState);
923
918
  super.copyFrom(ctx);
924
919
  }
925
- literal() {
926
- return this.getTypedRuleContext(LiteralContext, 0);
920
+ singleExpr() {
921
+ return this.getRuleContext(0, SingleExprContext);
927
922
  }
928
923
  enterRule(listener) {
929
- if (listener.enterSELiteral) {
930
- listener.enterSELiteral(this);
924
+ if (listener.enterSEParenthesis) {
925
+ listener.enterSEParenthesis(this);
931
926
  }
932
927
  }
933
928
  exitRule(listener) {
934
- if (listener.exitSELiteral) {
935
- listener.exitSELiteral(this);
929
+ if (listener.exitSEParenthesis) {
930
+ listener.exitSEParenthesis(this);
936
931
  }
937
932
  }
938
- // @Override
939
933
  accept(visitor) {
940
- if (visitor.visitSELiteral) {
941
- return visitor.visitSELiteral(this);
934
+ if (visitor.visitSEParenthesis) {
935
+ return visitor.visitSEParenthesis(this);
942
936
  }
943
937
  else {
944
938
  return visitor.visitChildren(this);
945
939
  }
946
940
  }
947
941
  }
948
- export class SEParenthesisContext extends SingleExprContext {
949
- constructor(parser, ctx) {
950
- super(parser, ctx.parentCtx, ctx.invokingState);
942
+ export class SEUnaryMinusContext extends SingleExprContext {
943
+ constructor(ctx) {
944
+ super(ctx.parent, ctx.invokingState);
951
945
  super.copyFrom(ctx);
952
946
  }
953
947
  singleExpr() {
954
- return this.getTypedRuleContext(SingleExprContext, 0);
948
+ return this.getRuleContext(0, SingleExprContext);
955
949
  }
956
950
  enterRule(listener) {
957
- if (listener.enterSEParenthesis) {
958
- listener.enterSEParenthesis(this);
951
+ if (listener.enterSEUnaryMinus) {
952
+ listener.enterSEUnaryMinus(this);
959
953
  }
960
954
  }
961
955
  exitRule(listener) {
962
- if (listener.exitSEParenthesis) {
963
- listener.exitSEParenthesis(this);
956
+ if (listener.exitSEUnaryMinus) {
957
+ listener.exitSEUnaryMinus(this);
964
958
  }
965
959
  }
966
- // @Override
967
960
  accept(visitor) {
968
- if (visitor.visitSEParenthesis) {
969
- return visitor.visitSEParenthesis(this);
961
+ if (visitor.visitSEUnaryMinus) {
962
+ return visitor.visitSEUnaryMinus(this);
970
963
  }
971
964
  else {
972
965
  return visitor.visitChildren(this);
973
966
  }
974
967
  }
975
968
  }
976
- export class SEMulDivContext extends SingleExprContext {
977
- constructor(parser, ctx) {
978
- super(parser, ctx.parentCtx, ctx.invokingState);
969
+ export class SENotContext extends SingleExprContext {
970
+ constructor(ctx) {
971
+ super(ctx.parent, ctx.invokingState);
979
972
  super.copyFrom(ctx);
980
973
  }
981
- singleExpr_list() {
982
- return this.getTypedRuleContexts(SingleExprContext);
983
- }
984
- singleExpr(i) {
985
- return this.getTypedRuleContext(SingleExprContext, i);
974
+ singleExpr() {
975
+ return this.getRuleContext(0, SingleExprContext);
986
976
  }
987
977
  enterRule(listener) {
988
- if (listener.enterSEMulDiv) {
989
- listener.enterSEMulDiv(this);
978
+ if (listener.enterSENot) {
979
+ listener.enterSENot(this);
990
980
  }
991
981
  }
992
982
  exitRule(listener) {
993
- if (listener.exitSEMulDiv) {
994
- listener.exitSEMulDiv(this);
983
+ if (listener.exitSENot) {
984
+ listener.exitSENot(this);
995
985
  }
996
986
  }
997
- // @Override
998
987
  accept(visitor) {
999
- if (visitor.visitSEMulDiv) {
1000
- return visitor.visitSEMulDiv(this);
988
+ if (visitor.visitSENot) {
989
+ return visitor.visitSENot(this);
1001
990
  }
1002
991
  else {
1003
992
  return visitor.visitChildren(this);
1004
993
  }
1005
994
  }
1006
995
  }
1007
- export class SEPowerContext extends SingleExprContext {
1008
- constructor(parser, ctx) {
1009
- super(parser, ctx.parentCtx, ctx.invokingState);
996
+ export class SEVariableRefContext extends SingleExprContext {
997
+ constructor(ctx) {
998
+ super(ctx.parent, ctx.invokingState);
1010
999
  super.copyFrom(ctx);
1011
1000
  }
1012
- singleExpr_list() {
1013
- return this.getTypedRuleContexts(SingleExprContext);
1014
- }
1015
- singleExpr(i) {
1016
- return this.getTypedRuleContext(SingleExprContext, i);
1001
+ variableRef() {
1002
+ return this.getRuleContext(0, VariableRefContext);
1017
1003
  }
1018
1004
  enterRule(listener) {
1019
- if (listener.enterSEPower) {
1020
- listener.enterSEPower(this);
1005
+ if (listener.enterSEVariableRef) {
1006
+ listener.enterSEVariableRef(this);
1021
1007
  }
1022
1008
  }
1023
1009
  exitRule(listener) {
1024
- if (listener.exitSEPower) {
1025
- listener.exitSEPower(this);
1010
+ if (listener.exitSEVariableRef) {
1011
+ listener.exitSEVariableRef(this);
1026
1012
  }
1027
1013
  }
1028
- // @Override
1029
1014
  accept(visitor) {
1030
- if (visitor.visitSEPower) {
1031
- return visitor.visitSEPower(this);
1015
+ if (visitor.visitSEVariableRef) {
1016
+ return visitor.visitSEVariableRef(this);
1032
1017
  }
1033
1018
  else {
1034
1019
  return visitor.visitChildren(this);
1035
1020
  }
1036
1021
  }
1037
1022
  }
1038
- export class SEBooleanBinaryOpContext extends SingleExprContext {
1039
- constructor(parser, ctx) {
1040
- super(parser, ctx.parentCtx, ctx.invokingState);
1023
+ export class SEFunctionCallContext extends SingleExprContext {
1024
+ constructor(ctx) {
1025
+ super(ctx.parent, ctx.invokingState);
1041
1026
  super.copyFrom(ctx);
1042
1027
  }
1043
- singleExpr_list() {
1044
- return this.getTypedRuleContexts(SingleExprContext);
1045
- }
1046
- singleExpr(i) {
1047
- return this.getTypedRuleContext(SingleExprContext, i);
1048
- }
1049
- BOOLEAN_BINARY_OP() {
1050
- return this.getToken(IfcExpressionParser.BOOLEAN_BINARY_OP, 0);
1028
+ functionCall() {
1029
+ return this.getRuleContext(0, FunctionCallContext);
1051
1030
  }
1052
1031
  enterRule(listener) {
1053
- if (listener.enterSEBooleanBinaryOp) {
1054
- listener.enterSEBooleanBinaryOp(this);
1032
+ if (listener.enterSEFunctionCall) {
1033
+ listener.enterSEFunctionCall(this);
1055
1034
  }
1056
1035
  }
1057
1036
  exitRule(listener) {
1058
- if (listener.exitSEBooleanBinaryOp) {
1059
- listener.exitSEBooleanBinaryOp(this);
1037
+ if (listener.exitSEFunctionCall) {
1038
+ listener.exitSEFunctionCall(this);
1060
1039
  }
1061
1040
  }
1062
- // @Override
1063
1041
  accept(visitor) {
1064
- if (visitor.visitSEBooleanBinaryOp) {
1065
- return visitor.visitSEBooleanBinaryOp(this);
1042
+ if (visitor.visitSEFunctionCall) {
1043
+ return visitor.visitSEFunctionCall(this);
1066
1044
  }
1067
1045
  else {
1068
1046
  return visitor.visitChildren(this);
1069
1047
  }
1070
1048
  }
1071
1049
  }
1072
- export class SEFunctionCallContext extends SingleExprContext {
1073
- constructor(parser, ctx) {
1074
- super(parser, ctx.parentCtx, ctx.invokingState);
1050
+ export class SELiteralContext extends SingleExprContext {
1051
+ constructor(ctx) {
1052
+ super(ctx.parent, ctx.invokingState);
1075
1053
  super.copyFrom(ctx);
1076
1054
  }
1077
- functionCall() {
1078
- return this.getTypedRuleContext(FunctionCallContext, 0);
1055
+ literal() {
1056
+ return this.getRuleContext(0, LiteralContext);
1079
1057
  }
1080
1058
  enterRule(listener) {
1081
- if (listener.enterSEFunctionCall) {
1082
- listener.enterSEFunctionCall(this);
1059
+ if (listener.enterSELiteral) {
1060
+ listener.enterSELiteral(this);
1083
1061
  }
1084
1062
  }
1085
1063
  exitRule(listener) {
1086
- if (listener.exitSEFunctionCall) {
1087
- listener.exitSEFunctionCall(this);
1064
+ if (listener.exitSELiteral) {
1065
+ listener.exitSELiteral(this);
1088
1066
  }
1089
1067
  }
1090
- // @Override
1091
1068
  accept(visitor) {
1092
- if (visitor.visitSEFunctionCall) {
1093
- return visitor.visitSEFunctionCall(this);
1069
+ if (visitor.visitSELiteral) {
1070
+ return visitor.visitSELiteral(this);
1094
1071
  }
1095
1072
  else {
1096
1073
  return visitor.visitChildren(this);
@@ -1098,12 +1075,12 @@ export class SEFunctionCallContext extends SingleExprContext {
1098
1075
  }
1099
1076
  }
1100
1077
  export class SEArrayExprContext extends SingleExprContext {
1101
- constructor(parser, ctx) {
1102
- super(parser, ctx.parentCtx, ctx.invokingState);
1078
+ constructor(ctx) {
1079
+ super(ctx.parent, ctx.invokingState);
1103
1080
  super.copyFrom(ctx);
1104
1081
  }
1105
1082
  arrayExpr() {
1106
- return this.getTypedRuleContext(ArrayExprContext, 0);
1083
+ return this.getRuleContext(0, ArrayExprContext);
1107
1084
  }
1108
1085
  enterRule(listener) {
1109
1086
  if (listener.enterSEArrayExpr) {
@@ -1115,7 +1092,6 @@ export class SEArrayExprContext extends SingleExprContext {
1115
1092
  listener.exitSEArrayExpr(this);
1116
1093
  }
1117
1094
  }
1118
- // @Override
1119
1095
  accept(visitor) {
1120
1096
  if (visitor.visitSEArrayExpr) {
1121
1097
  return visitor.visitSEArrayExpr(this);
@@ -1125,143 +1101,156 @@ export class SEArrayExprContext extends SingleExprContext {
1125
1101
  }
1126
1102
  }
1127
1103
  }
1128
- export class SENotContext extends SingleExprContext {
1129
- constructor(parser, ctx) {
1130
- super(parser, ctx.parentCtx, ctx.invokingState);
1104
+ export class SEPowerContext extends SingleExprContext {
1105
+ constructor(ctx) {
1106
+ super(ctx.parent, ctx.invokingState);
1131
1107
  super.copyFrom(ctx);
1132
1108
  }
1133
- singleExpr() {
1134
- return this.getTypedRuleContext(SingleExprContext, 0);
1109
+ singleExpr(i) {
1110
+ if (i === undefined) {
1111
+ return this.getRuleContexts(SingleExprContext);
1112
+ }
1113
+ return this.getRuleContext(i, SingleExprContext);
1135
1114
  }
1136
1115
  enterRule(listener) {
1137
- if (listener.enterSENot) {
1138
- listener.enterSENot(this);
1116
+ if (listener.enterSEPower) {
1117
+ listener.enterSEPower(this);
1139
1118
  }
1140
1119
  }
1141
1120
  exitRule(listener) {
1142
- if (listener.exitSENot) {
1143
- listener.exitSENot(this);
1121
+ if (listener.exitSEPower) {
1122
+ listener.exitSEPower(this);
1144
1123
  }
1145
1124
  }
1146
- // @Override
1147
1125
  accept(visitor) {
1148
- if (visitor.visitSENot) {
1149
- return visitor.visitSENot(this);
1126
+ if (visitor.visitSEPower) {
1127
+ return visitor.visitSEPower(this);
1150
1128
  }
1151
1129
  else {
1152
1130
  return visitor.visitChildren(this);
1153
1131
  }
1154
1132
  }
1155
1133
  }
1156
- export class SEVariableRefContext extends SingleExprContext {
1157
- constructor(parser, ctx) {
1158
- super(parser, ctx.parentCtx, ctx.invokingState);
1134
+ export class SEMulDivContext extends SingleExprContext {
1135
+ constructor(ctx) {
1136
+ super(ctx.parent, ctx.invokingState);
1159
1137
  super.copyFrom(ctx);
1160
1138
  }
1161
- variableRef() {
1162
- return this.getTypedRuleContext(VariableRefContext, 0);
1139
+ singleExpr(i) {
1140
+ if (i === undefined) {
1141
+ return this.getRuleContexts(SingleExprContext);
1142
+ }
1143
+ return this.getRuleContext(i, SingleExprContext);
1163
1144
  }
1164
1145
  enterRule(listener) {
1165
- if (listener.enterSEVariableRef) {
1166
- listener.enterSEVariableRef(this);
1146
+ if (listener.enterSEMulDiv) {
1147
+ listener.enterSEMulDiv(this);
1167
1148
  }
1168
1149
  }
1169
1150
  exitRule(listener) {
1170
- if (listener.exitSEVariableRef) {
1171
- listener.exitSEVariableRef(this);
1151
+ if (listener.exitSEMulDiv) {
1152
+ listener.exitSEMulDiv(this);
1172
1153
  }
1173
1154
  }
1174
- // @Override
1175
1155
  accept(visitor) {
1176
- if (visitor.visitSEVariableRef) {
1177
- return visitor.visitSEVariableRef(this);
1156
+ if (visitor.visitSEMulDiv) {
1157
+ return visitor.visitSEMulDiv(this);
1178
1158
  }
1179
1159
  else {
1180
1160
  return visitor.visitChildren(this);
1181
1161
  }
1182
1162
  }
1183
1163
  }
1184
- export class SEUnaryMultipleMinusContext extends SingleExprContext {
1185
- constructor(parser, ctx) {
1186
- super(parser, ctx.parentCtx, ctx.invokingState);
1164
+ export class SEAddSubContext extends SingleExprContext {
1165
+ constructor(ctx) {
1166
+ super(ctx.parent, ctx.invokingState);
1187
1167
  super.copyFrom(ctx);
1188
1168
  }
1189
- singleExpr() {
1190
- return this.getTypedRuleContext(SingleExprContext, 0);
1169
+ singleExpr(i) {
1170
+ if (i === undefined) {
1171
+ return this.getRuleContexts(SingleExprContext);
1172
+ }
1173
+ return this.getRuleContext(i, SingleExprContext);
1191
1174
  }
1192
1175
  enterRule(listener) {
1193
- if (listener.enterSEUnaryMultipleMinus) {
1194
- listener.enterSEUnaryMultipleMinus(this);
1176
+ if (listener.enterSEAddSub) {
1177
+ listener.enterSEAddSub(this);
1195
1178
  }
1196
1179
  }
1197
1180
  exitRule(listener) {
1198
- if (listener.exitSEUnaryMultipleMinus) {
1199
- listener.exitSEUnaryMultipleMinus(this);
1181
+ if (listener.exitSEAddSub) {
1182
+ listener.exitSEAddSub(this);
1200
1183
  }
1201
1184
  }
1202
- // @Override
1203
1185
  accept(visitor) {
1204
- if (visitor.visitSEUnaryMultipleMinus) {
1205
- return visitor.visitSEUnaryMultipleMinus(this);
1186
+ if (visitor.visitSEAddSub) {
1187
+ return visitor.visitSEAddSub(this);
1206
1188
  }
1207
1189
  else {
1208
1190
  return visitor.visitChildren(this);
1209
1191
  }
1210
1192
  }
1211
1193
  }
1212
- export class SEUnaryMinusContext extends SingleExprContext {
1213
- constructor(parser, ctx) {
1214
- super(parser, ctx.parentCtx, ctx.invokingState);
1194
+ export class SEComparisonContext extends SingleExprContext {
1195
+ constructor(ctx) {
1196
+ super(ctx.parent, ctx.invokingState);
1215
1197
  super.copyFrom(ctx);
1216
1198
  }
1217
- singleExpr() {
1218
- return this.getTypedRuleContext(SingleExprContext, 0);
1199
+ CMP_OP() {
1200
+ return this.getToken(IfcExpressionParser.CMP_OP, 0);
1201
+ }
1202
+ singleExpr(i) {
1203
+ if (i === undefined) {
1204
+ return this.getRuleContexts(SingleExprContext);
1205
+ }
1206
+ return this.getRuleContext(i, SingleExprContext);
1219
1207
  }
1220
1208
  enterRule(listener) {
1221
- if (listener.enterSEUnaryMinus) {
1222
- listener.enterSEUnaryMinus(this);
1209
+ if (listener.enterSEComparison) {
1210
+ listener.enterSEComparison(this);
1223
1211
  }
1224
1212
  }
1225
1213
  exitRule(listener) {
1226
- if (listener.exitSEUnaryMinus) {
1227
- listener.exitSEUnaryMinus(this);
1214
+ if (listener.exitSEComparison) {
1215
+ listener.exitSEComparison(this);
1228
1216
  }
1229
1217
  }
1230
- // @Override
1231
1218
  accept(visitor) {
1232
- if (visitor.visitSEUnaryMinus) {
1233
- return visitor.visitSEUnaryMinus(this);
1219
+ if (visitor.visitSEComparison) {
1220
+ return visitor.visitSEComparison(this);
1234
1221
  }
1235
1222
  else {
1236
1223
  return visitor.visitChildren(this);
1237
1224
  }
1238
1225
  }
1239
1226
  }
1240
- export class SEAddSubContext extends SingleExprContext {
1241
- constructor(parser, ctx) {
1242
- super(parser, ctx.parentCtx, ctx.invokingState);
1227
+ export class SEBooleanBinaryOpContext extends SingleExprContext {
1228
+ constructor(ctx) {
1229
+ super(ctx.parent, ctx.invokingState);
1243
1230
  super.copyFrom(ctx);
1244
1231
  }
1245
- singleExpr_list() {
1246
- return this.getTypedRuleContexts(SingleExprContext);
1247
- }
1248
1232
  singleExpr(i) {
1249
- return this.getTypedRuleContext(SingleExprContext, i);
1233
+ if (i === undefined) {
1234
+ return this.getRuleContexts(SingleExprContext);
1235
+ }
1236
+ return this.getRuleContext(i, SingleExprContext);
1237
+ }
1238
+ BOOLEAN_BINARY_OP() {
1239
+ return this.getToken(IfcExpressionParser.BOOLEAN_BINARY_OP, 0);
1250
1240
  }
1251
1241
  enterRule(listener) {
1252
- if (listener.enterSEAddSub) {
1253
- listener.enterSEAddSub(this);
1242
+ if (listener.enterSEBooleanBinaryOp) {
1243
+ listener.enterSEBooleanBinaryOp(this);
1254
1244
  }
1255
1245
  }
1256
1246
  exitRule(listener) {
1257
- if (listener.exitSEAddSub) {
1258
- listener.exitSEAddSub(this);
1247
+ if (listener.exitSEBooleanBinaryOp) {
1248
+ listener.exitSEBooleanBinaryOp(this);
1259
1249
  }
1260
1250
  }
1261
- // @Override
1262
1251
  accept(visitor) {
1263
- if (visitor.visitSEAddSub) {
1264
- return visitor.visitSEAddSub(this);
1252
+ if (visitor.visitSEBooleanBinaryOp) {
1253
+ return visitor.visitSEBooleanBinaryOp(this);
1265
1254
  }
1266
1255
  else {
1267
1256
  return visitor.visitChildren(this);
@@ -1269,15 +1258,15 @@ export class SEAddSubContext extends SingleExprContext {
1269
1258
  }
1270
1259
  }
1271
1260
  export class SEMethodCallContext extends SingleExprContext {
1272
- constructor(parser, ctx) {
1273
- super(parser, ctx.parentCtx, ctx.invokingState);
1261
+ constructor(ctx) {
1262
+ super(ctx.parent, ctx.invokingState);
1274
1263
  super.copyFrom(ctx);
1275
1264
  }
1276
1265
  singleExpr() {
1277
- return this.getTypedRuleContext(SingleExprContext, 0);
1266
+ return this.getRuleContext(0, SingleExprContext);
1278
1267
  }
1279
1268
  methodCallChain() {
1280
- return this.getTypedRuleContext(MethodCallChainContext, 0);
1269
+ return this.getRuleContext(0, MethodCallChainContext);
1281
1270
  }
1282
1271
  enterRule(listener) {
1283
1272
  if (listener.enterSEMethodCall) {
@@ -1289,7 +1278,6 @@ export class SEMethodCallContext extends SingleExprContext {
1289
1278
  listener.exitSEMethodCall(this);
1290
1279
  }
1291
1280
  }
1292
- // @Override
1293
1281
  accept(visitor) {
1294
1282
  if (visitor.visitSEMethodCall) {
1295
1283
  return visitor.visitSEMethodCall(this);
@@ -1299,10 +1287,9 @@ export class SEMethodCallContext extends SingleExprContext {
1299
1287
  }
1300
1288
  }
1301
1289
  }
1302
- export class MethodCallChainContext extends ParserRuleContext {
1303
- constructor(parser, parent, invokingState) {
1290
+ export class MethodCallChainContext extends antlr.ParserRuleContext {
1291
+ constructor(parent, invokingState) {
1304
1292
  super(parent, invokingState);
1305
- this.parser = parser;
1306
1293
  }
1307
1294
  get ruleIndex() {
1308
1295
  return IfcExpressionParser.RULE_methodCallChain;
@@ -1312,18 +1299,18 @@ export class MethodCallChainContext extends ParserRuleContext {
1312
1299
  }
1313
1300
  }
1314
1301
  export class MethodCallChainInnerContext extends MethodCallChainContext {
1315
- constructor(parser, ctx) {
1316
- super(parser, ctx.parentCtx, ctx.invokingState);
1302
+ constructor(ctx) {
1303
+ super(ctx.parent, ctx.invokingState);
1317
1304
  super.copyFrom(ctx);
1318
1305
  }
1319
1306
  DOT() {
1320
1307
  return this.getToken(IfcExpressionParser.DOT, 0);
1321
1308
  }
1322
- functionCall() {
1323
- return this.getTypedRuleContext(FunctionCallContext, 0);
1309
+ methodAccessor() {
1310
+ return this.getRuleContext(0, MethodAccessorContext);
1324
1311
  }
1325
1312
  methodCallChain() {
1326
- return this.getTypedRuleContext(MethodCallChainContext, 0);
1313
+ return this.getRuleContext(0, MethodCallChainContext);
1327
1314
  }
1328
1315
  enterRule(listener) {
1329
1316
  if (listener.enterMethodCallChainInner) {
@@ -1335,7 +1322,6 @@ export class MethodCallChainInnerContext extends MethodCallChainContext {
1335
1322
  listener.exitMethodCallChainInner(this);
1336
1323
  }
1337
1324
  }
1338
- // @Override
1339
1325
  accept(visitor) {
1340
1326
  if (visitor.visitMethodCallChainInner) {
1341
1327
  return visitor.visitMethodCallChainInner(this);
@@ -1346,15 +1332,15 @@ export class MethodCallChainInnerContext extends MethodCallChainContext {
1346
1332
  }
1347
1333
  }
1348
1334
  export class MethodCallChainEndContext extends MethodCallChainContext {
1349
- constructor(parser, ctx) {
1350
- super(parser, ctx.parentCtx, ctx.invokingState);
1335
+ constructor(ctx) {
1336
+ super(ctx.parent, ctx.invokingState);
1351
1337
  super.copyFrom(ctx);
1352
1338
  }
1353
1339
  DOT() {
1354
1340
  return this.getToken(IfcExpressionParser.DOT, 0);
1355
1341
  }
1356
- functionCall() {
1357
- return this.getTypedRuleContext(FunctionCallContext, 0);
1342
+ methodAccessor() {
1343
+ return this.getRuleContext(0, MethodAccessorContext);
1358
1344
  }
1359
1345
  enterRule(listener) {
1360
1346
  if (listener.enterMethodCallChainEnd) {
@@ -1366,7 +1352,6 @@ export class MethodCallChainEndContext extends MethodCallChainContext {
1366
1352
  listener.exitMethodCallChainEnd(this);
1367
1353
  }
1368
1354
  }
1369
- // @Override
1370
1355
  accept(visitor) {
1371
1356
  if (visitor.visitMethodCallChainEnd) {
1372
1357
  return visitor.visitMethodCallChainEnd(this);
@@ -1376,16 +1361,80 @@ export class MethodCallChainEndContext extends MethodCallChainContext {
1376
1361
  }
1377
1362
  }
1378
1363
  }
1379
- export class FunctionCallContext extends ParserRuleContext {
1380
- constructor(parser, parent, invokingState) {
1364
+ export class MethodAccessorContext extends antlr.ParserRuleContext {
1365
+ constructor(parent, invokingState) {
1366
+ super(parent, invokingState);
1367
+ }
1368
+ get ruleIndex() {
1369
+ return IfcExpressionParser.RULE_methodAccessor;
1370
+ }
1371
+ copyFrom(ctx) {
1372
+ super.copyFrom(ctx);
1373
+ }
1374
+ }
1375
+ export class MethodFunctionCallContext extends MethodAccessorContext {
1376
+ constructor(ctx) {
1377
+ super(ctx.parent, ctx.invokingState);
1378
+ super.copyFrom(ctx);
1379
+ }
1380
+ functionCall() {
1381
+ return this.getRuleContext(0, FunctionCallContext);
1382
+ }
1383
+ enterRule(listener) {
1384
+ if (listener.enterMethodFunctionCall) {
1385
+ listener.enterMethodFunctionCall(this);
1386
+ }
1387
+ }
1388
+ exitRule(listener) {
1389
+ if (listener.exitMethodFunctionCall) {
1390
+ listener.exitMethodFunctionCall(this);
1391
+ }
1392
+ }
1393
+ accept(visitor) {
1394
+ if (visitor.visitMethodFunctionCall) {
1395
+ return visitor.visitMethodFunctionCall(this);
1396
+ }
1397
+ else {
1398
+ return visitor.visitChildren(this);
1399
+ }
1400
+ }
1401
+ }
1402
+ export class MethodPropertyAccessContext extends MethodAccessorContext {
1403
+ constructor(ctx) {
1404
+ super(ctx.parent, ctx.invokingState);
1405
+ super.copyFrom(ctx);
1406
+ }
1407
+ IDENTIFIER() {
1408
+ return this.getToken(IfcExpressionParser.IDENTIFIER, 0);
1409
+ }
1410
+ enterRule(listener) {
1411
+ if (listener.enterMethodPropertyAccess) {
1412
+ listener.enterMethodPropertyAccess(this);
1413
+ }
1414
+ }
1415
+ exitRule(listener) {
1416
+ if (listener.exitMethodPropertyAccess) {
1417
+ listener.exitMethodPropertyAccess(this);
1418
+ }
1419
+ }
1420
+ accept(visitor) {
1421
+ if (visitor.visitMethodPropertyAccess) {
1422
+ return visitor.visitMethodPropertyAccess(this);
1423
+ }
1424
+ else {
1425
+ return visitor.visitChildren(this);
1426
+ }
1427
+ }
1428
+ }
1429
+ export class FunctionCallContext extends antlr.ParserRuleContext {
1430
+ constructor(parent, invokingState) {
1381
1431
  super(parent, invokingState);
1382
- this.parser = parser;
1383
1432
  }
1384
1433
  IDENTIFIER() {
1385
1434
  return this.getToken(IfcExpressionParser.IDENTIFIER, 0);
1386
1435
  }
1387
1436
  exprList() {
1388
- return this.getTypedRuleContext(ExprListContext, 0);
1437
+ return this.getRuleContext(0, ExprListContext);
1389
1438
  }
1390
1439
  get ruleIndex() {
1391
1440
  return IfcExpressionParser.RULE_functionCall;
@@ -1400,7 +1449,6 @@ export class FunctionCallContext extends ParserRuleContext {
1400
1449
  listener.exitFunctionCall(this);
1401
1450
  }
1402
1451
  }
1403
- // @Override
1404
1452
  accept(visitor) {
1405
1453
  if (visitor.visitFunctionCall) {
1406
1454
  return visitor.visitFunctionCall(this);
@@ -1410,16 +1458,15 @@ export class FunctionCallContext extends ParserRuleContext {
1410
1458
  }
1411
1459
  }
1412
1460
  }
1413
- export class ExprListContext extends ParserRuleContext {
1414
- constructor(parser, parent, invokingState) {
1461
+ export class ExprListContext extends antlr.ParserRuleContext {
1462
+ constructor(parent, invokingState) {
1415
1463
  super(parent, invokingState);
1416
- this.parser = parser;
1417
1464
  }
1418
1465
  singleExpr() {
1419
- return this.getTypedRuleContext(SingleExprContext, 0);
1466
+ return this.getRuleContext(0, SingleExprContext);
1420
1467
  }
1421
1468
  exprList() {
1422
- return this.getTypedRuleContext(ExprListContext, 0);
1469
+ return this.getRuleContext(0, ExprListContext);
1423
1470
  }
1424
1471
  get ruleIndex() {
1425
1472
  return IfcExpressionParser.RULE_exprList;
@@ -1434,7 +1481,6 @@ export class ExprListContext extends ParserRuleContext {
1434
1481
  listener.exitExprList(this);
1435
1482
  }
1436
1483
  }
1437
- // @Override
1438
1484
  accept(visitor) {
1439
1485
  if (visitor.visitExprList) {
1440
1486
  return visitor.visitExprList(this);
@@ -1444,13 +1490,12 @@ export class ExprListContext extends ParserRuleContext {
1444
1490
  }
1445
1491
  }
1446
1492
  }
1447
- export class ArrayExprContext extends ParserRuleContext {
1448
- constructor(parser, parent, invokingState) {
1493
+ export class ArrayExprContext extends antlr.ParserRuleContext {
1494
+ constructor(parent, invokingState) {
1449
1495
  super(parent, invokingState);
1450
- this.parser = parser;
1451
1496
  }
1452
1497
  arrayElementList() {
1453
- return this.getTypedRuleContext(ArrayElementListContext, 0);
1498
+ return this.getRuleContext(0, ArrayElementListContext);
1454
1499
  }
1455
1500
  get ruleIndex() {
1456
1501
  return IfcExpressionParser.RULE_arrayExpr;
@@ -1465,7 +1510,6 @@ export class ArrayExprContext extends ParserRuleContext {
1465
1510
  listener.exitArrayExpr(this);
1466
1511
  }
1467
1512
  }
1468
- // @Override
1469
1513
  accept(visitor) {
1470
1514
  if (visitor.visitArrayExpr) {
1471
1515
  return visitor.visitArrayExpr(this);
@@ -1475,16 +1519,15 @@ export class ArrayExprContext extends ParserRuleContext {
1475
1519
  }
1476
1520
  }
1477
1521
  }
1478
- export class ArrayElementListContext extends ParserRuleContext {
1479
- constructor(parser, parent, invokingState) {
1522
+ export class ArrayElementListContext extends antlr.ParserRuleContext {
1523
+ constructor(parent, invokingState) {
1480
1524
  super(parent, invokingState);
1481
- this.parser = parser;
1482
1525
  }
1483
1526
  singleExpr() {
1484
- return this.getTypedRuleContext(SingleExprContext, 0);
1527
+ return this.getRuleContext(0, SingleExprContext);
1485
1528
  }
1486
1529
  arrayElementList() {
1487
- return this.getTypedRuleContext(ArrayElementListContext, 0);
1530
+ return this.getRuleContext(0, ArrayElementListContext);
1488
1531
  }
1489
1532
  get ruleIndex() {
1490
1533
  return IfcExpressionParser.RULE_arrayElementList;
@@ -1499,7 +1542,6 @@ export class ArrayElementListContext extends ParserRuleContext {
1499
1542
  listener.exitArrayElementList(this);
1500
1543
  }
1501
1544
  }
1502
- // @Override
1503
1545
  accept(visitor) {
1504
1546
  if (visitor.visitArrayElementList) {
1505
1547
  return visitor.visitArrayElementList(this);
@@ -1509,22 +1551,21 @@ export class ArrayElementListContext extends ParserRuleContext {
1509
1551
  }
1510
1552
  }
1511
1553
  }
1512
- export class LiteralContext extends ParserRuleContext {
1513
- constructor(parser, parent, invokingState) {
1554
+ export class LiteralContext extends antlr.ParserRuleContext {
1555
+ constructor(parent, invokingState) {
1514
1556
  super(parent, invokingState);
1515
- this.parser = parser;
1516
1557
  }
1517
1558
  numLiteral() {
1518
- return this.getTypedRuleContext(NumLiteralContext, 0);
1559
+ return this.getRuleContext(0, NumLiteralContext);
1519
1560
  }
1520
1561
  stringLiteral() {
1521
- return this.getTypedRuleContext(StringLiteralContext, 0);
1562
+ return this.getRuleContext(0, StringLiteralContext);
1522
1563
  }
1523
1564
  booleanLiteral() {
1524
- return this.getTypedRuleContext(BooleanLiteralContext, 0);
1565
+ return this.getRuleContext(0, BooleanLiteralContext);
1525
1566
  }
1526
1567
  logicalLiteral() {
1527
- return this.getTypedRuleContext(LogicalLiteralContext, 0);
1568
+ return this.getRuleContext(0, LogicalLiteralContext);
1528
1569
  }
1529
1570
  get ruleIndex() {
1530
1571
  return IfcExpressionParser.RULE_literal;
@@ -1539,7 +1580,6 @@ export class LiteralContext extends ParserRuleContext {
1539
1580
  listener.exitLiteral(this);
1540
1581
  }
1541
1582
  }
1542
- // @Override
1543
1583
  accept(visitor) {
1544
1584
  if (visitor.visitLiteral) {
1545
1585
  return visitor.visitLiteral(this);
@@ -1549,10 +1589,9 @@ export class LiteralContext extends ParserRuleContext {
1549
1589
  }
1550
1590
  }
1551
1591
  }
1552
- export class NumLiteralContext extends ParserRuleContext {
1553
- constructor(parser, parent, invokingState) {
1592
+ export class NumLiteralContext extends antlr.ParserRuleContext {
1593
+ constructor(parent, invokingState) {
1554
1594
  super(parent, invokingState);
1555
- this.parser = parser;
1556
1595
  }
1557
1596
  INT() {
1558
1597
  return this.getToken(IfcExpressionParser.INT, 0);
@@ -1573,7 +1612,6 @@ export class NumLiteralContext extends ParserRuleContext {
1573
1612
  listener.exitNumLiteral(this);
1574
1613
  }
1575
1614
  }
1576
- // @Override
1577
1615
  accept(visitor) {
1578
1616
  if (visitor.visitNumLiteral) {
1579
1617
  return visitor.visitNumLiteral(this);
@@ -1583,10 +1621,9 @@ export class NumLiteralContext extends ParserRuleContext {
1583
1621
  }
1584
1622
  }
1585
1623
  }
1586
- export class StringLiteralContext extends ParserRuleContext {
1587
- constructor(parser, parent, invokingState) {
1624
+ export class StringLiteralContext extends antlr.ParserRuleContext {
1625
+ constructor(parent, invokingState) {
1588
1626
  super(parent, invokingState);
1589
- this.parser = parser;
1590
1627
  }
1591
1628
  QUOTED_STRING() {
1592
1629
  return this.getToken(IfcExpressionParser.QUOTED_STRING, 0);
@@ -1604,7 +1641,6 @@ export class StringLiteralContext extends ParserRuleContext {
1604
1641
  listener.exitStringLiteral(this);
1605
1642
  }
1606
1643
  }
1607
- // @Override
1608
1644
  accept(visitor) {
1609
1645
  if (visitor.visitStringLiteral) {
1610
1646
  return visitor.visitStringLiteral(this);
@@ -1614,10 +1650,9 @@ export class StringLiteralContext extends ParserRuleContext {
1614
1650
  }
1615
1651
  }
1616
1652
  }
1617
- export class BooleanLiteralContext extends ParserRuleContext {
1618
- constructor(parser, parent, invokingState) {
1653
+ export class BooleanLiteralContext extends antlr.ParserRuleContext {
1654
+ constructor(parent, invokingState) {
1619
1655
  super(parent, invokingState);
1620
- this.parser = parser;
1621
1656
  }
1622
1657
  BOOLEAN() {
1623
1658
  return this.getToken(IfcExpressionParser.BOOLEAN, 0);
@@ -1635,7 +1670,6 @@ export class BooleanLiteralContext extends ParserRuleContext {
1635
1670
  listener.exitBooleanLiteral(this);
1636
1671
  }
1637
1672
  }
1638
- // @Override
1639
1673
  accept(visitor) {
1640
1674
  if (visitor.visitBooleanLiteral) {
1641
1675
  return visitor.visitBooleanLiteral(this);
@@ -1645,10 +1679,9 @@ export class BooleanLiteralContext extends ParserRuleContext {
1645
1679
  }
1646
1680
  }
1647
1681
  }
1648
- export class LogicalLiteralContext extends ParserRuleContext {
1649
- constructor(parser, parent, invokingState) {
1682
+ export class LogicalLiteralContext extends antlr.ParserRuleContext {
1683
+ constructor(parent, invokingState) {
1650
1684
  super(parent, invokingState);
1651
- this.parser = parser;
1652
1685
  }
1653
1686
  LOGICAL_UNKNOWN() {
1654
1687
  return this.getToken(IfcExpressionParser.LOGICAL_UNKNOWN, 0);
@@ -1666,7 +1699,6 @@ export class LogicalLiteralContext extends ParserRuleContext {
1666
1699
  listener.exitLogicalLiteral(this);
1667
1700
  }
1668
1701
  }
1669
- // @Override
1670
1702
  accept(visitor) {
1671
1703
  if (visitor.visitLogicalLiteral) {
1672
1704
  return visitor.visitLogicalLiteral(this);
@@ -1676,10 +1708,9 @@ export class LogicalLiteralContext extends ParserRuleContext {
1676
1708
  }
1677
1709
  }
1678
1710
  }
1679
- export class VariableRefContext extends ParserRuleContext {
1680
- constructor(parser, parent, invokingState) {
1711
+ export class VariableRefContext extends antlr.ParserRuleContext {
1712
+ constructor(parent, invokingState) {
1681
1713
  super(parent, invokingState);
1682
- this.parser = parser;
1683
1714
  }
1684
1715
  IDENTIFIER() {
1685
1716
  return this.getToken(IfcExpressionParser.IDENTIFIER, 0);
@@ -1697,7 +1728,6 @@ export class VariableRefContext extends ParserRuleContext {
1697
1728
  listener.exitVariableRef(this);
1698
1729
  }
1699
1730
  }
1700
- // @Override
1701
1731
  accept(visitor) {
1702
1732
  if (visitor.visitVariableRef) {
1703
1733
  return visitor.visitVariableRef(this);