firebase-rules-parser
Version:
Parser for Firebase rule files
1,357 lines (1,179 loc) • 130 kB
JavaScript
// Generated from FirebaseRules.g4 by ANTLR 4.7.1
// jshint ignore: start
var antlr4 = require('antlr4/index');
var FirebaseRulesListener = require('./FirebaseRulesListener').FirebaseRulesListener;
var grammarFileName = "FirebaseRules.g4";
var serializedATN = ["\u0003\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964",
"\u00037\u011a\u0004\u0002\t\u0002\u0004\u0003\t\u0003\u0004\u0004\t",
"\u0004\u0004\u0005\t\u0005\u0004\u0006\t\u0006\u0004\u0007\t\u0007\u0004",
"\b\t\b\u0004\t\t\t\u0004\n\t\n\u0004\u000b\t\u000b\u0004\f\t\f\u0004",
"\r\t\r\u0004\u000e\t\u000e\u0004\u000f\t\u000f\u0004\u0010\t\u0010\u0004",
"\u0011\t\u0011\u0004\u0012\t\u0012\u0004\u0013\t\u0013\u0004\u0014\t",
"\u0014\u0004\u0015\t\u0015\u0004\u0016\t\u0016\u0004\u0017\t\u0017\u0004",
"\u0018\t\u0018\u0004\u0019\t\u0019\u0004\u001a\t\u001a\u0004\u001b\t",
"\u001b\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0003\u0003",
"\u0003\u0003\u0003\u0007\u0003>\n\u0003\f\u0003\u000e\u0003A\u000b\u0003",
"\u0003\u0004\u0003\u0004\u0003\u0004\u0003\u0004\u0007\u0004G\n\u0004",
"\f\u0004\u000e\u0004J\u000b\u0004\u0003\u0004\u0003\u0004\u0003\u0005",
"\u0003\u0005\u0003\u0005\u0003\u0005\u0003\u0005\u0007\u0005S\n\u0005",
"\f\u0005\u000e\u0005V\u000b\u0005\u0003\u0005\u0003\u0005\u0003\u0006",
"\u0003\u0006\u0003\u0007\u0003\u0007\u0003\b\u0003\b\u0003\b\u0003\b",
"\u0003\t\u0003\t\u0003\t\u0003\t\u0007\tf\n\t\f\t\u000e\ti\u000b\t\u0003",
"\t\u0003\t\u0003\t\u0005\tn\n\t\u0003\t\u0003\t\u0003\n\u0003\n\u0003",
"\u000b\u0003\u000b\u0003\u000b\u0003\u000b\u0005\u000bx\n\u000b\u0003",
"\u000b\u0003\u000b\u0003\f\u0003\f\u0003\r\u0005\r\u007f\n\r\u0003\r",
"\u0003\r\u0007\r\u0083\n\r\f\r\u000e\r\u0086\u000b\r\u0003\u000e\u0003",
"\u000e\u0003\u000f\u0005\u000f\u008b\n\u000f\u0003\u000f\u0003\u000f",
"\u0007\u000f\u008f\n\u000f\f\u000f\u000e\u000f\u0092\u000b\u000f\u0003",
"\u0010\u0003\u0010\u0003\u0011\u0005\u0011\u0097\n\u0011\u0003\u0011",
"\u0003\u0011\u0007\u0011\u009b\n\u0011\f\u0011\u000e\u0011\u009e\u000b",
"\u0011\u0003\u0012\u0003\u0012\u0003\u0012\u0003\u0012\u0003\u0012\u0003",
"\u0012\u0003\u0012\u0003\u0012\u0003\u0012\u0003\u0012\u0003\u0012\u0003",
"\u0013\u0003\u0013\u0003\u0013\u0003\u0013\u0003\u0013\u0003\u0013\u0005",
"\u0013\u00b1\n\u0013\u0003\u0014\u0003\u0014\u0003\u0015\u0003\u0015",
"\u0003\u0015\u0003\u0015\u0005\u0015\u00b9\n\u0015\u0003\u0015\u0003",
"\u0015\u0007\u0015\u00bd\n\u0015\f\u0015\u000e\u0015\u00c0\u000b\u0015",
"\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015",
"\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015",
"\u0003\u0015\u0005\u0015\u00cf\n\u0015\u0003\u0015\u0003\u0015\u0003",
"\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003",
"\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003",
"\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003",
"\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0003",
"\u0015\u0003\u0015\u0003\u0015\u0003\u0015\u0005\u0015\u00ef\n\u0015",
"\u0003\u0015\u0003\u0015\u0007\u0015\u00f3\n\u0015\f\u0015\u000e\u0015",
"\u00f6\u000b\u0015\u0003\u0016\u0003\u0016\u0003\u0017\u0003\u0017\u0003",
"\u0017\u0003\u0017\u0003\u0018\u0003\u0018\u0003\u0018\u0005\u0018\u0101",
"\n\u0018\u0006\u0018\u0103\n\u0018\r\u0018\u000e\u0018\u0104\u0003\u0019",
"\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u0019\u0003\u001a\u0003\u001a",
"\u0003\u001a\u0003\u001a\u0003\u001a\u0003\u001b\u0003\u001b\u0003\u001b",
"\u0005\u001b\u0114\n\u001b\u0006\u001b\u0116\n\u001b\r\u001b\u000e\u001b",
"\u0117\u0003\u001b\u0002\u0003(\u001c\u0002\u0004\u0006\b\n\f\u000e",
"\u0010\u0012\u0014\u0016\u0018\u001a\u001c\u001e \"$&(*,.024\u0002\u000b",
"\u0004\u0002$$(-\u0005\u0002!#%144\u0004\u0002\u0018\u0018\u001c\u001c",
"\u0003\u0002&\'\u0003\u0002\u0010\u0015\u0003\u0002\u0016\u0017\u0003",
"\u0002\u0019\u001a\u0004\u0002\u001b\u001f55\u0003\u0002$%\u0002\u0129",
"\u00026\u0003\u0002\u0002\u0002\u0004:\u0003\u0002\u0002\u0002\u0006",
"B\u0003\u0002\u0002\u0002\bM\u0003\u0002\u0002\u0002\nY\u0003\u0002",
"\u0002\u0002\f[\u0003\u0002\u0002\u0002\u000e]\u0003\u0002\u0002\u0002",
"\u0010a\u0003\u0002\u0002\u0002\u0012q\u0003\u0002\u0002\u0002\u0014",
"s\u0003\u0002\u0002\u0002\u0016{\u0003\u0002\u0002\u0002\u0018~\u0003",
"\u0002\u0002\u0002\u001a\u0087\u0003\u0002\u0002\u0002\u001c\u008a\u0003",
"\u0002\u0002\u0002\u001e\u0093\u0003\u0002\u0002\u0002 \u0096\u0003",
"\u0002\u0002\u0002\"\u009f\u0003\u0002\u0002\u0002$\u00b0\u0003\u0002",
"\u0002\u0002&\u00b2\u0003\u0002\u0002\u0002(\u00ce\u0003\u0002\u0002",
"\u0002*\u00f7\u0003\u0002\u0002\u0002,\u00f9\u0003\u0002\u0002\u0002",
".\u0102\u0003\u0002\u0002\u00020\u0106\u0003\u0002\u0002\u00022\u010b",
"\u0003\u0002\u0002\u00024\u0115\u0003\u0002\u0002\u000267\u00071\u0002",
"\u000278\u0005\u0004\u0003\u000289\u0005\u0006\u0004\u00029\u0003\u0003",
"\u0002\u0002\u0002:?\u0005&\u0014\u0002;<\u0007\f\u0002\u0002<>\u0005",
"&\u0014\u0002=;\u0003\u0002\u0002\u0002>A\u0003\u0002\u0002\u0002?=",
"\u0003\u0002\u0002\u0002?@\u0003\u0002\u0002\u0002@\u0005\u0003\u0002",
"\u0002\u0002A?\u0003\u0002\u0002\u0002BH\u0007\u0005\u0002\u0002CG\u0005",
"\u000e\b\u0002DG\u0005\f\u0007\u0002EG\u0005\"\u0012\u0002FC\u0003\u0002",
"\u0002\u0002FD\u0003\u0002\u0002\u0002FE\u0003\u0002\u0002\u0002GJ\u0003",
"\u0002\u0002\u0002HF\u0003\u0002\u0002\u0002HI\u0003\u0002\u0002\u0002",
"IK\u0003\u0002\u0002\u0002JH\u0003\u0002\u0002\u0002KL\u0007\u0006\u0002",
"\u0002L\u0007\u0003\u0002\u0002\u0002MT\u0007\u0005\u0002\u0002NS\u0005",
"\u0010\t\u0002OS\u0005\u000e\b\u0002PS\u00077\u0002\u0002QS\u0005\"",
"\u0012\u0002RN\u0003\u0002\u0002\u0002RO\u0003\u0002\u0002\u0002RP\u0003",
"\u0002\u0002\u0002RQ\u0003\u0002\u0002\u0002SV\u0003\u0002\u0002\u0002",
"TR\u0003\u0002\u0002\u0002TU\u0003\u0002\u0002\u0002UW\u0003\u0002\u0002",
"\u0002VT\u0003\u0002\u0002\u0002WX\u0007\u0006\u0002\u0002X\t\u0003",
"\u0002\u0002\u0002YZ\t\u0002\u0002\u0002Z\u000b\u0003\u0002\u0002\u0002",
"[\\\u00077\u0002\u0002\\\r\u0003\u0002\u0002\u0002]^\u0007\"\u0002\u0002",
"^_\u00054\u001b\u0002_`\u0005\b\u0005\u0002`\u000f\u0003\u0002\u0002",
"\u0002ab\u0007!\u0002\u0002bg\u0005\n\u0006\u0002cd\u0007\u000e\u0002",
"\u0002df\u0005\n\u0006\u0002ec\u0003\u0002\u0002\u0002fi\u0003\u0002",
"\u0002\u0002ge\u0003\u0002\u0002\u0002gh\u0003\u0002\u0002\u0002hm\u0003",
"\u0002\u0002\u0002ig\u0003\u0002\u0002\u0002jk\u0007\r\u0002\u0002k",
"l\u0007#\u0002\u0002ln\u0005(\u0015\u0002mj\u0003\u0002\u0002\u0002",
"mn\u0003\u0002\u0002\u0002no\u0003\u0002\u0002\u0002op\u0007\u000f\u0002",
"\u0002p\u0011\u0003\u0002\u0002\u0002qr\u00074\u0002\u0002r\u0013\u0003",
"\u0002\u0002\u0002st\u0007\u0005\u0002\u0002tw\u00074\u0002\u0002uv",
"\u0007\u0003\u0002\u0002vx\u0007\u0004\u0002\u0002wu\u0003\u0002\u0002",
"\u0002wx\u0003\u0002\u0002\u0002xy\u0003\u0002\u0002\u0002yz\u0007\u0006",
"\u0002\u0002z\u0015\u0003\u0002\u0002\u0002{|\u0005(\u0015\u0002|\u0017",
"\u0003\u0002\u0002\u0002}\u007f\u0005\u0016\f\u0002~}\u0003\u0002\u0002",
"\u0002~\u007f\u0003\u0002\u0002\u0002\u007f\u0084\u0003\u0002\u0002",
"\u0002\u0080\u0081\u0007\u000e\u0002\u0002\u0081\u0083\u0005\u0016\f",
"\u0002\u0082\u0080\u0003\u0002\u0002\u0002\u0083\u0086\u0003\u0002\u0002",
"\u0002\u0084\u0082\u0003\u0002\u0002\u0002\u0084\u0085\u0003\u0002\u0002",
"\u0002\u0085\u0019\u0003\u0002\u0002\u0002\u0086\u0084\u0003\u0002\u0002",
"\u0002\u0087\u0088\u0005(\u0015\u0002\u0088\u001b\u0003\u0002\u0002",
"\u0002\u0089\u008b\u0005\u001a\u000e\u0002\u008a\u0089\u0003\u0002\u0002",
"\u0002\u008a\u008b\u0003\u0002\u0002\u0002\u008b\u0090\u0003\u0002\u0002",
"\u0002\u008c\u008d\u0007\u000e\u0002\u0002\u008d\u008f\u0005\u001a\u000e",
"\u0002\u008e\u008c\u0003\u0002\u0002\u0002\u008f\u0092\u0003\u0002\u0002",
"\u0002\u0090\u008e\u0003\u0002\u0002\u0002\u0090\u0091\u0003\u0002\u0002",
"\u0002\u0091\u001d\u0003\u0002\u0002\u0002\u0092\u0090\u0003\u0002\u0002",
"\u0002\u0093\u0094\u00074\u0002\u0002\u0094\u001f\u0003\u0002\u0002",
"\u0002\u0095\u0097\u0005\u001e\u0010\u0002\u0096\u0095\u0003\u0002\u0002",
"\u0002\u0096\u0097\u0003\u0002\u0002\u0002\u0097\u009c\u0003\u0002\u0002",
"\u0002\u0098\u0099\u0007\u000e\u0002\u0002\u0099\u009b\u0005\u001e\u0010",
"\u0002\u009a\u0098\u0003\u0002\u0002\u0002\u009b\u009e\u0003\u0002\u0002",
"\u0002\u009c\u009a\u0003\u0002\u0002\u0002\u009c\u009d\u0003\u0002\u0002",
"\u0002\u009d!\u0003\u0002\u0002\u0002\u009e\u009c\u0003\u0002\u0002",
"\u0002\u009f\u00a0\u0007.\u0002\u0002\u00a0\u00a1\u00074\u0002\u0002",
"\u00a1\u00a2\u0007\u0007\u0002\u0002\u00a2\u00a3\u0005 \u0011\u0002",
"\u00a3\u00a4\u0007\b\u0002\u0002\u00a4\u00a5\u0007\u0005\u0002\u0002",
"\u00a5\u00a6\u0007/\u0002\u0002\u00a6\u00a7\u0005(\u0015\u0002\u00a7",
"\u00a8\u0007\u000f\u0002\u0002\u00a8\u00a9\u0007\u0006\u0002\u0002\u00a9",
"#\u0003\u0002\u0002\u0002\u00aa\u00ab\u0007\f\u0002\u0002\u00ab\u00b1",
"\u0005&\u0014\u0002\u00ac\u00ad\u0007\n\u0002\u0002\u00ad\u00ae\u0005",
"(\u0015\u0002\u00ae\u00af\u0007\u000b\u0002\u0002\u00af\u00b1\u0003",
"\u0002\u0002\u0002\u00b0\u00aa\u0003\u0002\u0002\u0002\u00b0\u00ac\u0003",
"\u0002\u0002\u0002\u00b1%\u0003\u0002\u0002\u0002\u00b2\u00b3\t\u0003",
"\u0002\u0002\u00b3\'\u0003\u0002\u0002\u0002\u00b4\u00b5\b\u0015\u0001",
"\u0002\u00b5\u00cf\u00070\u0002\u0002\u00b6\u00b8\u0007\n\u0002\u0002",
"\u00b7\u00b9\u0005(\u0015\u0002\u00b8\u00b7\u0003\u0002\u0002\u0002",
"\u00b8\u00b9\u0003\u0002\u0002\u0002\u00b9\u00be\u0003\u0002\u0002\u0002",
"\u00ba\u00bb\u0007\u000e\u0002\u0002\u00bb\u00bd\u0005(\u0015\u0002",
"\u00bc\u00ba\u0003\u0002\u0002\u0002\u00bd\u00c0\u0003\u0002\u0002\u0002",
"\u00be\u00bc\u0003\u0002\u0002\u0002\u00be\u00bf\u0003\u0002\u0002\u0002",
"\u00bf\u00c1\u0003\u0002\u0002\u0002\u00c0\u00be\u0003\u0002\u0002\u0002",
"\u00c1\u00cf\u0007\u000b\u0002\u0002\u00c2\u00c3\t\u0004\u0002\u0002",
"\u00c3\u00cf\u0005(\u0015\n\u00c4\u00cf\u00073\u0002\u0002\u00c5\u00cf",
"\u00072\u0002\u0002\u00c6\u00cf\t\u0005\u0002\u0002\u00c7\u00cf\u0007",
"4\u0002\u0002\u00c8\u00cf\u00050\u0019\u0002\u00c9\u00cf\u00052\u001a",
"\u0002\u00ca\u00cb\u0007\u0007\u0002\u0002\u00cb\u00cc\u0005(\u0015",
"\u0002\u00cc\u00cd\u0007\b\u0002\u0002\u00cd\u00cf\u0003\u0002\u0002",
"\u0002\u00ce\u00b4\u0003\u0002\u0002\u0002\u00ce\u00b6\u0003\u0002\u0002",
"\u0002\u00ce\u00c2\u0003\u0002\u0002\u0002\u00ce\u00c4\u0003\u0002\u0002",
"\u0002\u00ce\u00c5\u0003\u0002\u0002\u0002\u00ce\u00c6\u0003\u0002\u0002",
"\u0002\u00ce\u00c7\u0003\u0002\u0002\u0002\u00ce\u00c8\u0003\u0002\u0002",
"\u0002\u00ce\u00c9\u0003\u0002\u0002\u0002\u00ce\u00ca\u0003\u0002\u0002",
"\u0002\u00cf\u00f4\u0003\u0002\u0002\u0002\u00d0\u00d1\f\u0013\u0002",
"\u0002\u00d1\u00d2\t\u0006\u0002\u0002\u00d2\u00f3\u0005(\u0015\u0014",
"\u00d3\u00d4\f\u0012\u0002\u0002\u00d4\u00d5\t\u0007\u0002\u0002\u00d5",
"\u00f3\u0005(\u0015\u0013\u00d6\u00d7\f\u0011\u0002\u0002\u00d7\u00d8",
"\t\b\u0002\u0002\u00d8\u00f3\u0005(\u0015\u0012\u00d9\u00da\f\u0010",
"\u0002\u0002\u00da\u00db\t\t\u0002\u0002\u00db\u00f3\u0005(\u0015\u0011",
"\u00dc\u00dd\f\u000f\u0002\u0002\u00dd\u00de\u0007 \u0002\u0002\u00de",
"\u00f3\u0005(\u0015\u0010\u00df\u00e0\f\u000e\u0002\u0002\u00e0\u00e1",
"\u0007\f\u0002\u0002\u00e1\u00f3\u0005&\u0014\u0002\u00e2\u00e3\f\r",
"\u0002\u0002\u00e3\u00e4\u0007\f\u0002\u0002\u00e4\u00e5\u0005&\u0014",
"\u0002\u00e5\u00e6\u0007\u0007\u0002\u0002\u00e6\u00e7\u0005\u001c\u000f",
"\u0002\u00e7\u00e8\u0007\b\u0002\u0002\u00e8\u00f3\u0003\u0002\u0002",
"\u0002\u00e9\u00ea\f\f\u0002\u0002\u00ea\u00eb\u0007\n\u0002\u0002\u00eb",
"\u00ee\u0005(\u0015\u0002\u00ec\u00ed\u0007\r\u0002\u0002\u00ed\u00ef",
"\u0005(\u0015\u0002\u00ee\u00ec\u0003\u0002\u0002\u0002\u00ee\u00ef",
"\u0003\u0002\u0002\u0002\u00ef\u00f0\u0003\u0002\u0002\u0002\u00f0\u00f1",
"\u0007\u000b\u0002\u0002\u00f1\u00f3\u0003\u0002\u0002\u0002\u00f2\u00d0",
"\u0003\u0002\u0002\u0002\u00f2\u00d3\u0003\u0002\u0002\u0002\u00f2\u00d6",
"\u0003\u0002\u0002\u0002\u00f2\u00d9\u0003\u0002\u0002\u0002\u00f2\u00dc",
"\u0003\u0002\u0002\u0002\u00f2\u00df\u0003\u0002\u0002\u0002\u00f2\u00e2",
"\u0003\u0002\u0002\u0002\u00f2\u00e9\u0003\u0002\u0002\u0002\u00f3\u00f6",
"\u0003\u0002\u0002\u0002\u00f4\u00f2\u0003\u0002\u0002\u0002\u00f4\u00f5",
"\u0003\u0002\u0002\u0002\u00f5)\u0003\u0002\u0002\u0002\u00f6\u00f4",
"\u0003\u0002\u0002\u0002\u00f7\u00f8\u00074\u0002\u0002\u00f8+\u0003",
"\u0002\u0002\u0002\u00f9\u00fa\u0007\t\u0002\u0002\u00fa\u00fb\u0005",
"(\u0015\u0002\u00fb\u00fc\u0007\b\u0002\u0002\u00fc-\u0003\u0002\u0002",
"\u0002\u00fd\u0100\u00075\u0002\u0002\u00fe\u0101\u0005\u0012\n\u0002",
"\u00ff\u0101\u0005,\u0017\u0002\u0100\u00fe\u0003\u0002\u0002\u0002",
"\u0100\u00ff\u0003\u0002\u0002\u0002\u0101\u0103\u0003\u0002\u0002\u0002",
"\u0102\u00fd\u0003\u0002\u0002\u0002\u0103\u0104\u0003\u0002\u0002\u0002",
"\u0104\u0102\u0003\u0002\u0002\u0002\u0104\u0105\u0003\u0002\u0002\u0002",
"\u0105/\u0003\u0002\u0002\u0002\u0106\u0107\t\n\u0002\u0002\u0107\u0108",
"\u0007\u0007\u0002\u0002\u0108\u0109\u0005.\u0018\u0002\u0109\u010a",
"\u0007\b\u0002\u0002\u010a1\u0003\u0002\u0002\u0002\u010b\u010c\u0007",
"4\u0002\u0002\u010c\u010d\u0007\u0007\u0002\u0002\u010d\u010e\u0005",
"\u0018\r\u0002\u010e\u010f\u0007\b\u0002\u0002\u010f3\u0003\u0002\u0002",
"\u0002\u0110\u0113\u00075\u0002\u0002\u0111\u0114\u00074\u0002\u0002",
"\u0112\u0114\u0005\u0014\u000b\u0002\u0113\u0111\u0003\u0002\u0002\u0002",
"\u0113\u0112\u0003\u0002\u0002\u0002\u0114\u0116\u0003\u0002\u0002\u0002",
"\u0115\u0110\u0003\u0002\u0002\u0002\u0116\u0117\u0003\u0002\u0002\u0002",
"\u0117\u0115\u0003\u0002\u0002\u0002\u0117\u0118\u0003\u0002\u0002\u0002",
"\u01185\u0003\u0002\u0002\u0002\u001b?FHRTgmw~\u0084\u008a\u0090\u0096",
"\u009c\u00b0\u00b8\u00be\u00ce\u00ee\u00f2\u00f4\u0100\u0104\u0113\u0117"].join("");
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);
var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });
var sharedContextCache = new antlr4.PredictionContextCache();
var literalNames = [ null, "'='", "'**'", "'{'", "'}'", "'('", "')'", "'$('",
"'['", "']'", "'.'", "':'", "','", "';'", "'<'", "'<='",
"'>='", "'>'", "'=='", "'!='", "'&&'", "'||'", "'!'",
"'&'", "'|'", "'+'", "'-'", "'*'", "'^'", "'%'", "'in'",
"'allow'", "'match'", "'if'", "'get'", "'exists'",
"'true'", "'false'", "'list'", "'create'", "'update'",
"'read'", "'write'", "'delete'", "'function'", "'return'",
"'null'", "'service'", null, null, null, "'/'" ];
var symbolicNames = [ null, null, null, "CurlyOpen", "CurlyClose", "BracketOpen",
"BracketClose", "PathVariableBracket", "SquareBracketOpen",
"SquareBracketClose", "Dot", "Colon", "Comma", "Semicolon",
"LessThan", "LessOrEqual", "GreaterOrEqual", "GreaterThan",
"Equals", "Unequal", "LogicalAnd", "LogicalOr", "LogicalNot",
"BinaryAnd", "BinaryOr", "ArithmeticAdd", "ArithmeticSub",
"ArithmeticMul", "ArithmeticExp", "ArithmeticModus",
"InOperator", "Allow", "Match", "If", "Get", "Exists",
"True", "False", "List", "Create", "Update", "Read",
"Write", "Delete", "Function", "Return", "Null", "Service",
"Number", "String", "Identifier", "Slash", "WS", "Comment" ];
var ruleNames = [ "service", "namespaceIdentifier", "namespaceBlock", "matchBlock",
"allowKey", "comment", "matcher", "allow", "getPathVariable",
"pathVariable", "arg", "arguments", "memberArg", "memberArguments",
"argDeclaration", "argDeclarations", "functionDeclaration",
"fieldReference", "id", "expression", "objectReference",
"getPathExpressionVariable", "getPath", "ruleFunctionCall",
"functionCall", "matchPath" ];
function FirebaseRulesParser (input) {
antlr4.Parser.call(this, input);
this._interp = new antlr4.atn.ParserATNSimulator(this, atn, decisionsToDFA, sharedContextCache);
this.ruleNames = ruleNames;
this.literalNames = literalNames;
this.symbolicNames = symbolicNames;
return this;
}
FirebaseRulesParser.prototype = Object.create(antlr4.Parser.prototype);
FirebaseRulesParser.prototype.constructor = FirebaseRulesParser;
Object.defineProperty(FirebaseRulesParser.prototype, "atn", {
get : function() {
return atn;
}
});
FirebaseRulesParser.EOF = antlr4.Token.EOF;
FirebaseRulesParser.T__0 = 1;
FirebaseRulesParser.T__1 = 2;
FirebaseRulesParser.CurlyOpen = 3;
FirebaseRulesParser.CurlyClose = 4;
FirebaseRulesParser.BracketOpen = 5;
FirebaseRulesParser.BracketClose = 6;
FirebaseRulesParser.PathVariableBracket = 7;
FirebaseRulesParser.SquareBracketOpen = 8;
FirebaseRulesParser.SquareBracketClose = 9;
FirebaseRulesParser.Dot = 10;
FirebaseRulesParser.Colon = 11;
FirebaseRulesParser.Comma = 12;
FirebaseRulesParser.Semicolon = 13;
FirebaseRulesParser.LessThan = 14;
FirebaseRulesParser.LessOrEqual = 15;
FirebaseRulesParser.GreaterOrEqual = 16;
FirebaseRulesParser.GreaterThan = 17;
FirebaseRulesParser.Equals = 18;
FirebaseRulesParser.Unequal = 19;
FirebaseRulesParser.LogicalAnd = 20;
FirebaseRulesParser.LogicalOr = 21;
FirebaseRulesParser.LogicalNot = 22;
FirebaseRulesParser.BinaryAnd = 23;
FirebaseRulesParser.BinaryOr = 24;
FirebaseRulesParser.ArithmeticAdd = 25;
FirebaseRulesParser.ArithmeticSub = 26;
FirebaseRulesParser.ArithmeticMul = 27;
FirebaseRulesParser.ArithmeticExp = 28;
FirebaseRulesParser.ArithmeticModus = 29;
FirebaseRulesParser.InOperator = 30;
FirebaseRulesParser.Allow = 31;
FirebaseRulesParser.Match = 32;
FirebaseRulesParser.If = 33;
FirebaseRulesParser.Get = 34;
FirebaseRulesParser.Exists = 35;
FirebaseRulesParser.True = 36;
FirebaseRulesParser.False = 37;
FirebaseRulesParser.List = 38;
FirebaseRulesParser.Create = 39;
FirebaseRulesParser.Update = 40;
FirebaseRulesParser.Read = 41;
FirebaseRulesParser.Write = 42;
FirebaseRulesParser.Delete = 43;
FirebaseRulesParser.Function = 44;
FirebaseRulesParser.Return = 45;
FirebaseRulesParser.Null = 46;
FirebaseRulesParser.Service = 47;
FirebaseRulesParser.Number = 48;
FirebaseRulesParser.String = 49;
FirebaseRulesParser.Identifier = 50;
FirebaseRulesParser.Slash = 51;
FirebaseRulesParser.WS = 52;
FirebaseRulesParser.Comment = 53;
FirebaseRulesParser.RULE_service = 0;
FirebaseRulesParser.RULE_namespaceIdentifier = 1;
FirebaseRulesParser.RULE_namespaceBlock = 2;
FirebaseRulesParser.RULE_matchBlock = 3;
FirebaseRulesParser.RULE_allowKey = 4;
FirebaseRulesParser.RULE_comment = 5;
FirebaseRulesParser.RULE_matcher = 6;
FirebaseRulesParser.RULE_allow = 7;
FirebaseRulesParser.RULE_getPathVariable = 8;
FirebaseRulesParser.RULE_pathVariable = 9;
FirebaseRulesParser.RULE_arg = 10;
FirebaseRulesParser.RULE_arguments = 11;
FirebaseRulesParser.RULE_memberArg = 12;
FirebaseRulesParser.RULE_memberArguments = 13;
FirebaseRulesParser.RULE_argDeclaration = 14;
FirebaseRulesParser.RULE_argDeclarations = 15;
FirebaseRulesParser.RULE_functionDeclaration = 16;
FirebaseRulesParser.RULE_fieldReference = 17;
FirebaseRulesParser.RULE_id = 18;
FirebaseRulesParser.RULE_expression = 19;
FirebaseRulesParser.RULE_objectReference = 20;
FirebaseRulesParser.RULE_getPathExpressionVariable = 21;
FirebaseRulesParser.RULE_getPath = 22;
FirebaseRulesParser.RULE_ruleFunctionCall = 23;
FirebaseRulesParser.RULE_functionCall = 24;
FirebaseRulesParser.RULE_matchPath = 25;
function ServiceContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_service;
return this;
}
ServiceContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ServiceContext.prototype.constructor = ServiceContext;
ServiceContext.prototype.Service = function() {
return this.getToken(FirebaseRulesParser.Service, 0);
};
ServiceContext.prototype.namespaceIdentifier = function() {
return this.getTypedRuleContext(NamespaceIdentifierContext,0);
};
ServiceContext.prototype.namespaceBlock = function() {
return this.getTypedRuleContext(NamespaceBlockContext,0);
};
ServiceContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterService(this);
}
};
ServiceContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitService(this);
}
};
FirebaseRulesParser.ServiceContext = ServiceContext;
FirebaseRulesParser.prototype.service = function() {
var localctx = new ServiceContext(this, this._ctx, this.state);
this.enterRule(localctx, 0, FirebaseRulesParser.RULE_service);
try {
this.enterOuterAlt(localctx, 1);
this.state = 52;
this.match(FirebaseRulesParser.Service);
this.state = 53;
this.namespaceIdentifier();
this.state = 54;
this.namespaceBlock();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function NamespaceIdentifierContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_namespaceIdentifier;
return this;
}
NamespaceIdentifierContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
NamespaceIdentifierContext.prototype.constructor = NamespaceIdentifierContext;
NamespaceIdentifierContext.prototype.id = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(IdContext);
} else {
return this.getTypedRuleContext(IdContext,i);
}
};
NamespaceIdentifierContext.prototype.Dot = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(FirebaseRulesParser.Dot);
} else {
return this.getToken(FirebaseRulesParser.Dot, i);
}
};
NamespaceIdentifierContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterNamespaceIdentifier(this);
}
};
NamespaceIdentifierContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitNamespaceIdentifier(this);
}
};
FirebaseRulesParser.NamespaceIdentifierContext = NamespaceIdentifierContext;
FirebaseRulesParser.prototype.namespaceIdentifier = function() {
var localctx = new NamespaceIdentifierContext(this, this._ctx, this.state);
this.enterRule(localctx, 2, FirebaseRulesParser.RULE_namespaceIdentifier);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 56;
this.id();
this.state = 61;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===FirebaseRulesParser.Dot) {
this.state = 57;
this.match(FirebaseRulesParser.Dot);
this.state = 58;
this.id();
this.state = 63;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function NamespaceBlockContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_namespaceBlock;
return this;
}
NamespaceBlockContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
NamespaceBlockContext.prototype.constructor = NamespaceBlockContext;
NamespaceBlockContext.prototype.CurlyOpen = function() {
return this.getToken(FirebaseRulesParser.CurlyOpen, 0);
};
NamespaceBlockContext.prototype.CurlyClose = function() {
return this.getToken(FirebaseRulesParser.CurlyClose, 0);
};
NamespaceBlockContext.prototype.matcher = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(MatcherContext);
} else {
return this.getTypedRuleContext(MatcherContext,i);
}
};
NamespaceBlockContext.prototype.comment = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(CommentContext);
} else {
return this.getTypedRuleContext(CommentContext,i);
}
};
NamespaceBlockContext.prototype.functionDeclaration = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(FunctionDeclarationContext);
} else {
return this.getTypedRuleContext(FunctionDeclarationContext,i);
}
};
NamespaceBlockContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterNamespaceBlock(this);
}
};
NamespaceBlockContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitNamespaceBlock(this);
}
};
FirebaseRulesParser.NamespaceBlockContext = NamespaceBlockContext;
FirebaseRulesParser.prototype.namespaceBlock = function() {
var localctx = new NamespaceBlockContext(this, this._ctx, this.state);
this.enterRule(localctx, 4, FirebaseRulesParser.RULE_namespaceBlock);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 64;
this.match(FirebaseRulesParser.CurlyOpen);
this.state = 70;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(((((_la - 32)) & ~0x1f) == 0 && ((1 << (_la - 32)) & ((1 << (FirebaseRulesParser.Match - 32)) | (1 << (FirebaseRulesParser.Function - 32)) | (1 << (FirebaseRulesParser.Comment - 32)))) !== 0)) {
this.state = 68;
this._errHandler.sync(this);
switch(this._input.LA(1)) {
case FirebaseRulesParser.Match:
this.state = 65;
this.matcher();
break;
case FirebaseRulesParser.Comment:
this.state = 66;
this.comment();
break;
case FirebaseRulesParser.Function:
this.state = 67;
this.functionDeclaration();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 72;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 73;
this.match(FirebaseRulesParser.CurlyClose);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function MatchBlockContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_matchBlock;
return this;
}
MatchBlockContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
MatchBlockContext.prototype.constructor = MatchBlockContext;
MatchBlockContext.prototype.CurlyOpen = function() {
return this.getToken(FirebaseRulesParser.CurlyOpen, 0);
};
MatchBlockContext.prototype.CurlyClose = function() {
return this.getToken(FirebaseRulesParser.CurlyClose, 0);
};
MatchBlockContext.prototype.allow = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(AllowContext);
} else {
return this.getTypedRuleContext(AllowContext,i);
}
};
MatchBlockContext.prototype.matcher = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(MatcherContext);
} else {
return this.getTypedRuleContext(MatcherContext,i);
}
};
MatchBlockContext.prototype.Comment = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(FirebaseRulesParser.Comment);
} else {
return this.getToken(FirebaseRulesParser.Comment, i);
}
};
MatchBlockContext.prototype.functionDeclaration = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(FunctionDeclarationContext);
} else {
return this.getTypedRuleContext(FunctionDeclarationContext,i);
}
};
MatchBlockContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterMatchBlock(this);
}
};
MatchBlockContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitMatchBlock(this);
}
};
FirebaseRulesParser.MatchBlockContext = MatchBlockContext;
FirebaseRulesParser.prototype.matchBlock = function() {
var localctx = new MatchBlockContext(this, this._ctx, this.state);
this.enterRule(localctx, 6, FirebaseRulesParser.RULE_matchBlock);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 75;
this.match(FirebaseRulesParser.CurlyOpen);
this.state = 82;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(((((_la - 31)) & ~0x1f) == 0 && ((1 << (_la - 31)) & ((1 << (FirebaseRulesParser.Allow - 31)) | (1 << (FirebaseRulesParser.Match - 31)) | (1 << (FirebaseRulesParser.Function - 31)) | (1 << (FirebaseRulesParser.Comment - 31)))) !== 0)) {
this.state = 80;
this._errHandler.sync(this);
switch(this._input.LA(1)) {
case FirebaseRulesParser.Allow:
this.state = 76;
this.allow();
break;
case FirebaseRulesParser.Match:
this.state = 77;
this.matcher();
break;
case FirebaseRulesParser.Comment:
this.state = 78;
this.match(FirebaseRulesParser.Comment);
break;
case FirebaseRulesParser.Function:
this.state = 79;
this.functionDeclaration();
break;
default:
throw new antlr4.error.NoViableAltException(this);
}
this.state = 84;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 85;
this.match(FirebaseRulesParser.CurlyClose);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function AllowKeyContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_allowKey;
return this;
}
AllowKeyContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
AllowKeyContext.prototype.constructor = AllowKeyContext;
AllowKeyContext.prototype.Read = function() {
return this.getToken(FirebaseRulesParser.Read, 0);
};
AllowKeyContext.prototype.Write = function() {
return this.getToken(FirebaseRulesParser.Write, 0);
};
AllowKeyContext.prototype.Update = function() {
return this.getToken(FirebaseRulesParser.Update, 0);
};
AllowKeyContext.prototype.Delete = function() {
return this.getToken(FirebaseRulesParser.Delete, 0);
};
AllowKeyContext.prototype.Create = function() {
return this.getToken(FirebaseRulesParser.Create, 0);
};
AllowKeyContext.prototype.List = function() {
return this.getToken(FirebaseRulesParser.List, 0);
};
AllowKeyContext.prototype.Get = function() {
return this.getToken(FirebaseRulesParser.Get, 0);
};
AllowKeyContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterAllowKey(this);
}
};
AllowKeyContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitAllowKey(this);
}
};
FirebaseRulesParser.AllowKeyContext = AllowKeyContext;
FirebaseRulesParser.prototype.allowKey = function() {
var localctx = new AllowKeyContext(this, this._ctx, this.state);
this.enterRule(localctx, 8, FirebaseRulesParser.RULE_allowKey);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 87;
_la = this._input.LA(1);
if(!(((((_la - 34)) & ~0x1f) == 0 && ((1 << (_la - 34)) & ((1 << (FirebaseRulesParser.Get - 34)) | (1 << (FirebaseRulesParser.List - 34)) | (1 << (FirebaseRulesParser.Create - 34)) | (1 << (FirebaseRulesParser.Update - 34)) | (1 << (FirebaseRulesParser.Read - 34)) | (1 << (FirebaseRulesParser.Write - 34)) | (1 << (FirebaseRulesParser.Delete - 34)))) !== 0))) {
this._errHandler.recoverInline(this);
}
else {
this._errHandler.reportMatch(this);
this.consume();
}
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function CommentContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_comment;
return this;
}
CommentContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
CommentContext.prototype.constructor = CommentContext;
CommentContext.prototype.Comment = function() {
return this.getToken(FirebaseRulesParser.Comment, 0);
};
CommentContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterComment(this);
}
};
CommentContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitComment(this);
}
};
FirebaseRulesParser.CommentContext = CommentContext;
FirebaseRulesParser.prototype.comment = function() {
var localctx = new CommentContext(this, this._ctx, this.state);
this.enterRule(localctx, 10, FirebaseRulesParser.RULE_comment);
try {
this.enterOuterAlt(localctx, 1);
this.state = 89;
this.match(FirebaseRulesParser.Comment);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function MatcherContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_matcher;
return this;
}
MatcherContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
MatcherContext.prototype.constructor = MatcherContext;
MatcherContext.prototype.Match = function() {
return this.getToken(FirebaseRulesParser.Match, 0);
};
MatcherContext.prototype.matchPath = function() {
return this.getTypedRuleContext(MatchPathContext,0);
};
MatcherContext.prototype.matchBlock = function() {
return this.getTypedRuleContext(MatchBlockContext,0);
};
MatcherContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterMatcher(this);
}
};
MatcherContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitMatcher(this);
}
};
FirebaseRulesParser.MatcherContext = MatcherContext;
FirebaseRulesParser.prototype.matcher = function() {
var localctx = new MatcherContext(this, this._ctx, this.state);
this.enterRule(localctx, 12, FirebaseRulesParser.RULE_matcher);
try {
this.enterOuterAlt(localctx, 1);
this.state = 91;
this.match(FirebaseRulesParser.Match);
this.state = 92;
this.matchPath();
this.state = 93;
this.matchBlock();
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function AllowContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_allow;
return this;
}
AllowContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
AllowContext.prototype.constructor = AllowContext;
AllowContext.prototype.Allow = function() {
return this.getToken(FirebaseRulesParser.Allow, 0);
};
AllowContext.prototype.allowKey = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(AllowKeyContext);
} else {
return this.getTypedRuleContext(AllowKeyContext,i);
}
};
AllowContext.prototype.Semicolon = function() {
return this.getToken(FirebaseRulesParser.Semicolon, 0);
};
AllowContext.prototype.Comma = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTokens(FirebaseRulesParser.Comma);
} else {
return this.getToken(FirebaseRulesParser.Comma, i);
}
};
AllowContext.prototype.Colon = function() {
return this.getToken(FirebaseRulesParser.Colon, 0);
};
AllowContext.prototype.If = function() {
return this.getToken(FirebaseRulesParser.If, 0);
};
AllowContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
AllowContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterAllow(this);
}
};
AllowContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitAllow(this);
}
};
FirebaseRulesParser.AllowContext = AllowContext;
FirebaseRulesParser.prototype.allow = function() {
var localctx = new AllowContext(this, this._ctx, this.state);
this.enterRule(localctx, 14, FirebaseRulesParser.RULE_allow);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 95;
this.match(FirebaseRulesParser.Allow);
this.state = 96;
this.allowKey();
this.state = 101;
this._errHandler.sync(this);
_la = this._input.LA(1);
while(_la===FirebaseRulesParser.Comma) {
this.state = 97;
this.match(FirebaseRulesParser.Comma);
this.state = 98;
this.allowKey();
this.state = 103;
this._errHandler.sync(this);
_la = this._input.LA(1);
}
this.state = 107;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===FirebaseRulesParser.Colon) {
this.state = 104;
this.match(FirebaseRulesParser.Colon);
this.state = 105;
this.match(FirebaseRulesParser.If);
this.state = 106;
this.expression(0);
}
this.state = 109;
this.match(FirebaseRulesParser.Semicolon);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function GetPathVariableContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_getPathVariable;
return this;
}
GetPathVariableContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
GetPathVariableContext.prototype.constructor = GetPathVariableContext;
GetPathVariableContext.prototype.Identifier = function() {
return this.getToken(FirebaseRulesParser.Identifier, 0);
};
GetPathVariableContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterGetPathVariable(this);
}
};
GetPathVariableContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitGetPathVariable(this);
}
};
FirebaseRulesParser.GetPathVariableContext = GetPathVariableContext;
FirebaseRulesParser.prototype.getPathVariable = function() {
var localctx = new GetPathVariableContext(this, this._ctx, this.state);
this.enterRule(localctx, 16, FirebaseRulesParser.RULE_getPathVariable);
try {
this.enterOuterAlt(localctx, 1);
this.state = 111;
this.match(FirebaseRulesParser.Identifier);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function PathVariableContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_pathVariable;
return this;
}
PathVariableContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
PathVariableContext.prototype.constructor = PathVariableContext;
PathVariableContext.prototype.CurlyOpen = function() {
return this.getToken(FirebaseRulesParser.CurlyOpen, 0);
};
PathVariableContext.prototype.Identifier = function() {
return this.getToken(FirebaseRulesParser.Identifier, 0);
};
PathVariableContext.prototype.CurlyClose = function() {
return this.getToken(FirebaseRulesParser.CurlyClose, 0);
};
PathVariableContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterPathVariable(this);
}
};
PathVariableContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitPathVariable(this);
}
};
FirebaseRulesParser.PathVariableContext = PathVariableContext;
FirebaseRulesParser.prototype.pathVariable = function() {
var localctx = new PathVariableContext(this, this._ctx, this.state);
this.enterRule(localctx, 18, FirebaseRulesParser.RULE_pathVariable);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 113;
this.match(FirebaseRulesParser.CurlyOpen);
this.state = 114;
this.match(FirebaseRulesParser.Identifier);
this.state = 117;
this._errHandler.sync(this);
_la = this._input.LA(1);
if(_la===FirebaseRulesParser.T__0) {
this.state = 115;
this.match(FirebaseRulesParser.T__0);
this.state = 116;
this.match(FirebaseRulesParser.T__1);
}
this.state = 119;
this.match(FirebaseRulesParser.CurlyClose);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function ArgContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_arg;
return this;
}
ArgContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ArgContext.prototype.constructor = ArgContext;
ArgContext.prototype.expression = function() {
return this.getTypedRuleContext(ExpressionContext,0);
};
ArgContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterArg(this);
}
};
ArgContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitArg(this);
}
};
FirebaseRulesParser.ArgContext = ArgContext;
FirebaseRulesParser.prototype.arg = function() {
var localctx = new ArgContext(this, this._ctx, this.state);
this.enterRule(localctx, 20, FirebaseRulesParser.RULE_arg);
try {
this.enterOuterAlt(localctx, 1);
this.state = 121;
this.expression(0);
} catch (re) {
if(re instanceof antlr4.error.RecognitionException) {
localctx.exception = re;
this._errHandler.reportError(this, re);
this._errHandler.recover(this, re);
} else {
throw re;
}
} finally {
this.exitRule();
}
return localctx;
};
function ArgumentsContext(parser, parent, invokingState) {
if(parent===undefined) {
parent = null;
}
if(invokingState===undefined || invokingState===null) {
invokingState = -1;
}
antlr4.ParserRuleContext.call(this, parent, invokingState);
this.parser = parser;
this.ruleIndex = FirebaseRulesParser.RULE_arguments;
return this;
}
ArgumentsContext.prototype = Object.create(antlr4.ParserRuleContext.prototype);
ArgumentsContext.prototype.constructor = ArgumentsContext;
ArgumentsContext.prototype.arg = function(i) {
if(i===undefined) {
i = null;
}
if(i===null) {
return this.getTypedRuleContexts(ArgContext);
} else {
return this.getTypedRuleContext(ArgContext,i);
}
};
ArgumentsContext.prototype.enterRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.enterArguments(this);
}
};
ArgumentsContext.prototype.exitRule = function(listener) {
if(listener instanceof FirebaseRulesListener ) {
listener.exitArguments(this);
}
};
FirebaseRulesParser.ArgumentsContext = ArgumentsContext;
FirebaseRulesParser.prototype.arguments = function() {
var localctx = new ArgumentsContext(this, this._ctx, this.state);
this.enterRule(localctx, 22, FirebaseRulesParser.RULE_arguments);
var _la = 0; // Token type
try {
this.enterOuterAlt(localctx, 1);
this.state = 124;
this._errHandler.sync(this);
_la = this._input.LA(1);
if((((_la) & ~0x1f) == 0 && ((1 << _la) & ((1 << FirebaseRulesParser.BracketOpen) | (1 << FirebaseRulesParser.SquareBracketOpen) | (1 << FirebaseRulesParser.LogicalNot) | (1 << FirebaseRulesParser.ArithmeticSub))) !== 0) || ((((_la - 34)) & ~0x1f) == 0 && ((1 << (_la - 34)) & ((1 << (FirebaseRulesParser.Get - 34