UNPKG

ifc-expressions

Version:

Parsing and evaluation of IFC expressions

1,334 lines 61.5 kB
"use strict"; // Generated from IfcExpression.g4 by ANTLR 4.13.0 // noinspection ES6UnusedImports,JSUnusedGlobalSymbols,JSUnusedLocalSymbols Object.defineProperty(exports, "__esModule", { value: true }); exports.VariableRefContext = exports.LogicalLiteralContext = exports.BooleanLiteralContext = exports.StringLiteralContext = exports.NumLiteralContext = exports.LiteralContext = exports.ArrayElementListContext = exports.ArrayExprContext = exports.ExprListContext = exports.FunctionCallContext = exports.MethodCallChainEndContext = exports.MethodCallChainInnerContext = exports.MethodCallChainContext = exports.SEMethodCallContext = exports.SEAddSubContext = exports.SEUnaryMinusContext = exports.SEUnaryMultipleMinusContext = exports.SEVariableRefContext = exports.SENotContext = exports.SEArrayExprContext = exports.SEFunctionCallContext = exports.SEBooleanBinaryOpContext = exports.SEPowerContext = exports.SEMulDivContext = exports.SEParenthesisContext = exports.SELiteralContext = exports.SEComparisonContext = exports.SingleExprContext = exports.ExprContext = void 0; const antlr4_1 = require("antlr4"); class IfcExpressionParser extends antlr4_1.Parser { get grammarFileName() { return "IfcExpression.g4"; } get literalNames() { return IfcExpressionParser.literalNames; } get symbolicNames() { return IfcExpressionParser.symbolicNames; } get ruleNames() { return IfcExpressionParser.ruleNames; } get serializedATN() { return IfcExpressionParser._serializedATN; } createFailedPredicateException(predicate, message) { return new antlr4_1.FailedPredicateException(this, predicate, message); } constructor(input) { super(input); this._interp = new antlr4_1.ParserATNSimulator(this, IfcExpressionParser._ATN, IfcExpressionParser.DecisionsToDFA, new antlr4_1.PredictionContextCache()); } // @RuleVersion(0) expr() { let localctx = new ExprContext(this, this._ctx, this.state); this.enterRule(localctx, 0, IfcExpressionParser.RULE_expr); try { this.enterOuterAlt(localctx, 1); { this.state = 26; this.singleExpr(0); this.state = 27; this.match(IfcExpressionParser.EOF); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) singleExpr(_p) { if (_p === undefined) { _p = 0; } let _parentctx = this._ctx; let _parentState = this.state; let localctx = new SingleExprContext(this, this._ctx, _parentState); let _prevctx = localctx; let _startState = 2; this.enterRecursionRule(localctx, 2, IfcExpressionParser.RULE_singleExpr, _p); let _la; try { let _alt; this.enterOuterAlt(localctx, 1); { this.state = 44; this._errHandler.sync(this); switch (this._input.LA(1)) { case 1: { localctx = new SEUnaryMultipleMinusContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 30; this.match(IfcExpressionParser.T__0); this.state = 31; localctx._sub = this.singleExpr(14); } break; case 2: { localctx = new SEParenthesisContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 32; this.match(IfcExpressionParser.T__1); this.state = 33; localctx._sub = this.singleExpr(0); this.state = 34; this.match(IfcExpressionParser.T__2); } break; case 4: { localctx = new SEUnaryMinusContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 36; this.match(IfcExpressionParser.T__3); this.state = 37; localctx._sub = this.singleExpr(12); } break; case 9: { localctx = new SENotContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 38; this.match(IfcExpressionParser.T__8); this.state = 39; localctx._sub = this.singleExpr(6); } break; case 13: { localctx = new SEVariableRefContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 40; localctx._sub = this.variableRef(); } break; case 20: { localctx = new SEFunctionCallContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 41; localctx._sub = this.functionCall(); } break; case 14: case 15: case 16: case 17: case 19: { localctx = new SELiteralContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 42; localctx._sub = this.literal(); } break; case 11: { localctx = new SEArrayExprContext(this, localctx); this._ctx = localctx; _prevctx = localctx; this.state = 43; localctx._sub = this.arrayExpr(); } break; default: throw new antlr4_1.NoViableAltException(this); } this._ctx.stop = this._input.LT(-1); this.state = 65; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 2, this._ctx); while (_alt !== 2 && _alt !== antlr4_1.ATN.INVALID_ALT_NUMBER) { if (_alt === 1) { if (this._parseListeners != null) { this.triggerExitRuleEvent(); } _prevctx = localctx; { this.state = 63; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 1, this._ctx)) { case 1: { localctx = new SEPowerContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 46; if (!(this.precpred(this._ctx, 11))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 11)"); } this.state = 47; localctx._op = this.match(IfcExpressionParser.T__4); this.state = 48; localctx._right = this.singleExpr(11); } break; case 2: { localctx = new SEMulDivContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 49; if (!(this.precpred(this._ctx, 9))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 9)"); } this.state = 50; localctx._op = this._input.LT(1); _la = this._input.LA(1); if (!(_la === 6 || _la === 7)) { localctx._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } this.state = 51; localctx._right = this.singleExpr(10); } break; case 3: { localctx = new SEAddSubContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 52; if (!(this.precpred(this._ctx, 8))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 8)"); } this.state = 53; localctx._op = this._input.LT(1); _la = this._input.LA(1); if (!(_la === 4 || _la === 8)) { localctx._op = this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } this.state = 54; localctx._right = this.singleExpr(9); } break; case 4: { localctx = new SEComparisonContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 55; if (!(this.precpred(this._ctx, 7))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 7)"); } this.state = 56; this.match(IfcExpressionParser.CMP_OP); this.state = 57; localctx._right = this.singleExpr(8); } break; case 5: { localctx = new SEBooleanBinaryOpContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._left = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 58; if (!(this.precpred(this._ctx, 5))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 5)"); } this.state = 59; localctx._op = this.match(IfcExpressionParser.BOOLEAN_BINARY_OP); this.state = 60; localctx._right = this.singleExpr(6); } break; case 6: { localctx = new SEMethodCallContext(this, new SingleExprContext(this, _parentctx, _parentState)); localctx._target = _prevctx; this.pushNewRecursionContext(localctx, _startState, IfcExpressionParser.RULE_singleExpr); this.state = 61; if (!(this.precpred(this._ctx, 10))) { throw this.createFailedPredicateException("this.precpred(this._ctx, 10)"); } this.state = 62; localctx._call = this.methodCallChain(); } break; } } } this.state = 67; this._errHandler.sync(this); _alt = this._interp.adaptivePredict(this._input, 2, this._ctx); } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.unrollRecursionContexts(_parentctx); } return localctx; } // @RuleVersion(0) methodCallChain() { let localctx = new MethodCallChainContext(this, this._ctx, this.state); this.enterRule(localctx, 4, IfcExpressionParser.RULE_methodCallChain); try { this.state = 74; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 3, this._ctx)) { case 1: localctx = new MethodCallChainInnerContext(this, localctx); this.enterOuterAlt(localctx, 1); { this.state = 68; this.match(IfcExpressionParser.DOT); this.state = 69; localctx._target = this.functionCall(); this.state = 70; localctx._call = this.methodCallChain(); } break; case 2: localctx = new MethodCallChainEndContext(this, localctx); this.enterOuterAlt(localctx, 2); { this.state = 72; this.match(IfcExpressionParser.DOT); this.state = 73; localctx._call = this.functionCall(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) functionCall() { let localctx = new FunctionCallContext(this, this._ctx, this.state); this.enterRule(localctx, 6, IfcExpressionParser.RULE_functionCall); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 76; this.match(IfcExpressionParser.IDENTIFIER); this.state = 77; this.match(IfcExpressionParser.T__1); this.state = 79; this._errHandler.sync(this); _la = this._input.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1829398) !== 0)) { { this.state = 78; localctx._sub = this.exprList(); } } this.state = 81; this.match(IfcExpressionParser.T__2); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) exprList() { let localctx = new ExprListContext(this, this._ctx, this.state); this.enterRule(localctx, 8, IfcExpressionParser.RULE_exprList); try { this.state = 88; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 5, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 83; this.singleExpr(0); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 84; this.singleExpr(0); this.state = 85; this.match(IfcExpressionParser.T__9); this.state = 86; this.exprList(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) arrayExpr() { let localctx = new ArrayExprContext(this, this._ctx, this.state); this.enterRule(localctx, 10, IfcExpressionParser.RULE_arrayExpr); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 90; this.match(IfcExpressionParser.T__10); this.state = 92; this._errHandler.sync(this); _la = this._input.LA(1); if ((((_la) & ~0x1F) === 0 && ((1 << _la) & 1829398) !== 0)) { { this.state = 91; localctx._sub = this.arrayElementList(); } } this.state = 94; this.match(IfcExpressionParser.T__11); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) arrayElementList() { let localctx = new ArrayElementListContext(this, this._ctx, this.state); this.enterRule(localctx, 12, IfcExpressionParser.RULE_arrayElementList); try { this.state = 101; this._errHandler.sync(this); switch (this._interp.adaptivePredict(this._input, 7, this._ctx)) { case 1: this.enterOuterAlt(localctx, 1); { this.state = 96; this.singleExpr(0); } break; case 2: this.enterOuterAlt(localctx, 2); { this.state = 97; this.singleExpr(0); this.state = 98; this.match(IfcExpressionParser.T__9); this.state = 99; this.arrayElementList(); } break; } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) literal() { let localctx = new LiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 14, IfcExpressionParser.RULE_literal); try { this.state = 107; this._errHandler.sync(this); switch (this._input.LA(1)) { case 14: case 15: this.enterOuterAlt(localctx, 1); { this.state = 103; this.numLiteral(); } break; case 19: this.enterOuterAlt(localctx, 2); { this.state = 104; this.stringLiteral(); } break; case 16: this.enterOuterAlt(localctx, 3); { this.state = 105; this.booleanLiteral(); } break; case 17: this.enterOuterAlt(localctx, 4); { this.state = 106; this.logicalLiteral(); } break; default: throw new antlr4_1.NoViableAltException(this); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) numLiteral() { let localctx = new NumLiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 16, IfcExpressionParser.RULE_numLiteral); let _la; try { this.enterOuterAlt(localctx, 1); { this.state = 109; _la = this._input.LA(1); if (!(_la === 14 || _la === 15)) { this._errHandler.recoverInline(this); } else { this._errHandler.reportMatch(this); this.consume(); } } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) stringLiteral() { let localctx = new StringLiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 18, IfcExpressionParser.RULE_stringLiteral); try { this.enterOuterAlt(localctx, 1); { this.state = 111; this.match(IfcExpressionParser.QUOTED_STRING); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) booleanLiteral() { let localctx = new BooleanLiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 20, IfcExpressionParser.RULE_booleanLiteral); try { this.enterOuterAlt(localctx, 1); { this.state = 113; this.match(IfcExpressionParser.BOOLEAN); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) logicalLiteral() { let localctx = new LogicalLiteralContext(this, this._ctx, this.state); this.enterRule(localctx, 22, IfcExpressionParser.RULE_logicalLiteral); try { this.enterOuterAlt(localctx, 1); { this.state = 115; this.match(IfcExpressionParser.LOGICAL_UNKNOWN); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } // @RuleVersion(0) variableRef() { let localctx = new VariableRefContext(this, this._ctx, this.state); this.enterRule(localctx, 24, IfcExpressionParser.RULE_variableRef); try { this.enterOuterAlt(localctx, 1); { this.state = 117; this.match(IfcExpressionParser.T__12); this.state = 118; this.match(IfcExpressionParser.IDENTIFIER); } } catch (re) { if (re instanceof antlr4_1.RecognitionException) { localctx.exception = re; this._errHandler.reportError(this, re); this._errHandler.recover(this, re); } else { throw re; } } finally { this.exitRule(); } return localctx; } sempred(localctx, ruleIndex, predIndex) { switch (ruleIndex) { case 1: return this.singleExpr_sempred(localctx, predIndex); } return true; } singleExpr_sempred(localctx, predIndex) { switch (predIndex) { case 0: return this.precpred(this._ctx, 11); case 1: return this.precpred(this._ctx, 9); case 2: return this.precpred(this._ctx, 8); case 3: return this.precpred(this._ctx, 7); case 4: return this.precpred(this._ctx, 5); case 5: return this.precpred(this._ctx, 10); } return true; } static get _ATN() { if (!IfcExpressionParser.__ATN) { IfcExpressionParser.__ATN = new antlr4_1.ATNDeserializer().deserialize(IfcExpressionParser._serializedATN); } return IfcExpressionParser.__ATN; } } IfcExpressionParser.T__0 = 1; IfcExpressionParser.T__1 = 2; IfcExpressionParser.T__2 = 3; IfcExpressionParser.T__3 = 4; IfcExpressionParser.T__4 = 5; IfcExpressionParser.T__5 = 6; IfcExpressionParser.T__6 = 7; IfcExpressionParser.T__7 = 8; IfcExpressionParser.T__8 = 9; IfcExpressionParser.T__9 = 10; IfcExpressionParser.T__10 = 11; IfcExpressionParser.T__11 = 12; IfcExpressionParser.T__12 = 13; IfcExpressionParser.INT = 14; IfcExpressionParser.FLOAT = 15; IfcExpressionParser.BOOLEAN = 16; IfcExpressionParser.LOGICAL_UNKNOWN = 17; IfcExpressionParser.DOT = 18; IfcExpressionParser.QUOTED_STRING = 19; IfcExpressionParser.IDENTIFIER = 20; IfcExpressionParser.WS = 21; IfcExpressionParser.NEWLINE = 22; IfcExpressionParser.BOOLEAN_BINARY_OP = 23; IfcExpressionParser.CMP_OP = 24; IfcExpressionParser.EOF = antlr4_1.Token.EOF; IfcExpressionParser.RULE_expr = 0; IfcExpressionParser.RULE_singleExpr = 1; IfcExpressionParser.RULE_methodCallChain = 2; IfcExpressionParser.RULE_functionCall = 3; IfcExpressionParser.RULE_exprList = 4; IfcExpressionParser.RULE_arrayExpr = 5; IfcExpressionParser.RULE_arrayElementList = 6; IfcExpressionParser.RULE_literal = 7; IfcExpressionParser.RULE_numLiteral = 8; IfcExpressionParser.RULE_stringLiteral = 9; IfcExpressionParser.RULE_booleanLiteral = 10; IfcExpressionParser.RULE_logicalLiteral = 11; IfcExpressionParser.RULE_variableRef = 12; IfcExpressionParser.literalNames = [null, "'--'", "'('", "')'", "'-'", "'^'", "'*'", "'/'", "'+'", "'!'", "','", "'['", "']'", "'$'", null, null, null, null, "'.'"]; IfcExpressionParser.symbolicNames = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, "INT", "FLOAT", "BOOLEAN", "LOGICAL_UNKNOWN", "DOT", "QUOTED_STRING", "IDENTIFIER", "WS", "NEWLINE", "BOOLEAN_BINARY_OP", "CMP_OP"]; // tslint:disable:no-trailing-whitespace IfcExpressionParser.ruleNames = [ "expr", "singleExpr", "methodCallChain", "functionCall", "exprList", "arrayExpr", "arrayElementList", "literal", "numLiteral", "stringLiteral", "booleanLiteral", "logicalLiteral", "variableRef", ]; IfcExpressionParser._serializedATN = [4, 1, 24, 121, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 5, 20, 0, 0, 119, 25, 1, 0, 0, 0, 9, 44, 63, 65, 74, 79, 88, 92, 101, 107]; IfcExpressionParser.DecisionsToDFA = IfcExpressionParser._ATN.decisionToState.map((ds, index) => new antlr4_1.DFA(ds, index)); exports.default = IfcExpressionParser; class ExprContext extends antlr4_1.ParserRuleContext { constructor(parser, parent, invokingState) { super(parent, invokingState); this.parser = parser; } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } EOF() { return this.getToken(IfcExpressionParser.EOF, 0); } get ruleIndex() { return IfcExpressionParser.RULE_expr; } enterRule(listener) { if (listener.enterExpr) { listener.enterExpr(this); } } exitRule(listener) { if (listener.exitExpr) { listener.exitExpr(this); } } // @Override accept(visitor) { if (visitor.visitExpr) { return visitor.visitExpr(this); } else { return visitor.visitChildren(this); } } } exports.ExprContext = ExprContext; class SingleExprContext extends antlr4_1.ParserRuleContext { constructor(parser, parent, invokingState) { super(parent, invokingState); this.parser = parser; } get ruleIndex() { return IfcExpressionParser.RULE_singleExpr; } copyFrom(ctx) { super.copyFrom(ctx); } } exports.SingleExprContext = SingleExprContext; class SEComparisonContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } CMP_OP() { return this.getToken(IfcExpressionParser.CMP_OP, 0); } singleExpr_list() { return this.getTypedRuleContexts(SingleExprContext); } singleExpr(i) { return this.getTypedRuleContext(SingleExprContext, i); } enterRule(listener) { if (listener.enterSEComparison) { listener.enterSEComparison(this); } } exitRule(listener) { if (listener.exitSEComparison) { listener.exitSEComparison(this); } } // @Override accept(visitor) { if (visitor.visitSEComparison) { return visitor.visitSEComparison(this); } else { return visitor.visitChildren(this); } } } exports.SEComparisonContext = SEComparisonContext; class SELiteralContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } literal() { return this.getTypedRuleContext(LiteralContext, 0); } enterRule(listener) { if (listener.enterSELiteral) { listener.enterSELiteral(this); } } exitRule(listener) { if (listener.exitSELiteral) { listener.exitSELiteral(this); } } // @Override accept(visitor) { if (visitor.visitSELiteral) { return visitor.visitSELiteral(this); } else { return visitor.visitChildren(this); } } } exports.SELiteralContext = SELiteralContext; class SEParenthesisContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } enterRule(listener) { if (listener.enterSEParenthesis) { listener.enterSEParenthesis(this); } } exitRule(listener) { if (listener.exitSEParenthesis) { listener.exitSEParenthesis(this); } } // @Override accept(visitor) { if (visitor.visitSEParenthesis) { return visitor.visitSEParenthesis(this); } else { return visitor.visitChildren(this); } } } exports.SEParenthesisContext = SEParenthesisContext; class SEMulDivContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr_list() { return this.getTypedRuleContexts(SingleExprContext); } singleExpr(i) { return this.getTypedRuleContext(SingleExprContext, i); } enterRule(listener) { if (listener.enterSEMulDiv) { listener.enterSEMulDiv(this); } } exitRule(listener) { if (listener.exitSEMulDiv) { listener.exitSEMulDiv(this); } } // @Override accept(visitor) { if (visitor.visitSEMulDiv) { return visitor.visitSEMulDiv(this); } else { return visitor.visitChildren(this); } } } exports.SEMulDivContext = SEMulDivContext; class SEPowerContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr_list() { return this.getTypedRuleContexts(SingleExprContext); } singleExpr(i) { return this.getTypedRuleContext(SingleExprContext, i); } enterRule(listener) { if (listener.enterSEPower) { listener.enterSEPower(this); } } exitRule(listener) { if (listener.exitSEPower) { listener.exitSEPower(this); } } // @Override accept(visitor) { if (visitor.visitSEPower) { return visitor.visitSEPower(this); } else { return visitor.visitChildren(this); } } } exports.SEPowerContext = SEPowerContext; class SEBooleanBinaryOpContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr_list() { return this.getTypedRuleContexts(SingleExprContext); } singleExpr(i) { return this.getTypedRuleContext(SingleExprContext, i); } BOOLEAN_BINARY_OP() { return this.getToken(IfcExpressionParser.BOOLEAN_BINARY_OP, 0); } enterRule(listener) { if (listener.enterSEBooleanBinaryOp) { listener.enterSEBooleanBinaryOp(this); } } exitRule(listener) { if (listener.exitSEBooleanBinaryOp) { listener.exitSEBooleanBinaryOp(this); } } // @Override accept(visitor) { if (visitor.visitSEBooleanBinaryOp) { return visitor.visitSEBooleanBinaryOp(this); } else { return visitor.visitChildren(this); } } } exports.SEBooleanBinaryOpContext = SEBooleanBinaryOpContext; class SEFunctionCallContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } functionCall() { return this.getTypedRuleContext(FunctionCallContext, 0); } enterRule(listener) { if (listener.enterSEFunctionCall) { listener.enterSEFunctionCall(this); } } exitRule(listener) { if (listener.exitSEFunctionCall) { listener.exitSEFunctionCall(this); } } // @Override accept(visitor) { if (visitor.visitSEFunctionCall) { return visitor.visitSEFunctionCall(this); } else { return visitor.visitChildren(this); } } } exports.SEFunctionCallContext = SEFunctionCallContext; class SEArrayExprContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } arrayExpr() { return this.getTypedRuleContext(ArrayExprContext, 0); } enterRule(listener) { if (listener.enterSEArrayExpr) { listener.enterSEArrayExpr(this); } } exitRule(listener) { if (listener.exitSEArrayExpr) { listener.exitSEArrayExpr(this); } } // @Override accept(visitor) { if (visitor.visitSEArrayExpr) { return visitor.visitSEArrayExpr(this); } else { return visitor.visitChildren(this); } } } exports.SEArrayExprContext = SEArrayExprContext; class SENotContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } enterRule(listener) { if (listener.enterSENot) { listener.enterSENot(this); } } exitRule(listener) { if (listener.exitSENot) { listener.exitSENot(this); } } // @Override accept(visitor) { if (visitor.visitSENot) { return visitor.visitSENot(this); } else { return visitor.visitChildren(this); } } } exports.SENotContext = SENotContext; class SEVariableRefContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } variableRef() { return this.getTypedRuleContext(VariableRefContext, 0); } enterRule(listener) { if (listener.enterSEVariableRef) { listener.enterSEVariableRef(this); } } exitRule(listener) { if (listener.exitSEVariableRef) { listener.exitSEVariableRef(this); } } // @Override accept(visitor) { if (visitor.visitSEVariableRef) { return visitor.visitSEVariableRef(this); } else { return visitor.visitChildren(this); } } } exports.SEVariableRefContext = SEVariableRefContext; class SEUnaryMultipleMinusContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } enterRule(listener) { if (listener.enterSEUnaryMultipleMinus) { listener.enterSEUnaryMultipleMinus(this); } } exitRule(listener) { if (listener.exitSEUnaryMultipleMinus) { listener.exitSEUnaryMultipleMinus(this); } } // @Override accept(visitor) { if (visitor.visitSEUnaryMultipleMinus) { return visitor.visitSEUnaryMultipleMinus(this); } else { return visitor.visitChildren(this); } } } exports.SEUnaryMultipleMinusContext = SEUnaryMultipleMinusContext; class SEUnaryMinusContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } enterRule(listener) { if (listener.enterSEUnaryMinus) { listener.enterSEUnaryMinus(this); } } exitRule(listener) { if (listener.exitSEUnaryMinus) { listener.exitSEUnaryMinus(this); } } // @Override accept(visitor) { if (visitor.visitSEUnaryMinus) { return visitor.visitSEUnaryMinus(this); } else { return visitor.visitChildren(this); } } } exports.SEUnaryMinusContext = SEUnaryMinusContext; class SEAddSubContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr_list() { return this.getTypedRuleContexts(SingleExprContext); } singleExpr(i) { return this.getTypedRuleContext(SingleExprContext, i); } enterRule(listener) { if (listener.enterSEAddSub) { listener.enterSEAddSub(this); } } exitRule(listener) { if (listener.exitSEAddSub) { listener.exitSEAddSub(this); } } // @Override accept(visitor) { if (visitor.visitSEAddSub) { return visitor.visitSEAddSub(this); } else { return visitor.visitChildren(this); } } } exports.SEAddSubContext = SEAddSubContext; class SEMethodCallContext extends SingleExprContext { constructor(parser, ctx) { super(parser, ctx.parentCtx, ctx.invokingState); super.copyFrom(ctx); } singleExpr() { return this.getTypedRuleContext(SingleExprContext, 0); } methodCallChain() { return this.getTypedRuleContext(MethodCallChainContext, 0); } enterRule(listener) { if (listener.enterSEMethodCall) { listener.enterSEMethodCall(this); } } exitRule(listener) { if (listener.exitSEMethodCall) { listener.exitSEMethodCall(this); } } // @Override accept(visitor) { if (visitor.visitSEMethodCall) { return visitor.visitSEMethodCall(this); } else { return visitor.visitChildren(this); } } } exports.SEMethodCallContext = SEMethodCallContext; class MethodCallChainContext extends antlr4_1.ParserRuleContext { constructor(parser, parent, invokingState) { super(parent, invokingState); this.parser = parser; } get ruleIndex() { return IfcExpressionParser.RULE_methodCallChain; } copyFrom(ctx) { super.copyFrom(ctx); } } exports.MethodCallChainContext = MethodCallChainContext; class MethodCallChainInnerContext exte