UNPKG

@openfga/syntax-transformer

Version:

Javascript implementation of ANTLR Grammar for the OpenFGA DSL and parser from and to the OpenFGA JSON Syntax

80 lines (79 loc) 2.81 kB
import { ATN, CharStream, DFA, Lexer } from "antlr4"; export default class OpenFGALexer extends Lexer { static readonly COLON = 1; static readonly COMMA = 2; static readonly LESS = 3; static readonly GREATER = 4; static readonly LBRACKET = 5; static readonly RBRACKET = 6; static readonly LPAREN = 7; static readonly RPAREN = 8; static readonly WHITESPACE = 9; static readonly IDENTIFIER = 10; static readonly HASH = 11; static readonly AND = 12; static readonly OR = 13; static readonly BUT_NOT = 14; static readonly FROM = 15; static readonly MODULE = 16; static readonly MODEL = 17; static readonly SCHEMA = 18; static readonly SCHEMA_VERSION = 19; static readonly EXTEND = 20; static readonly TYPE = 21; static readonly CONDITION = 22; static readonly RELATIONS = 23; static readonly RELATION = 24; static readonly DEFINE = 25; static readonly KEYWORD_WITH = 26; static readonly EQUALS = 27; static readonly NOT_EQUALS = 28; static readonly IN = 29; static readonly LESS_EQUALS = 30; static readonly GREATER_EQUALS = 31; static readonly LOGICAL_AND = 32; static readonly LOGICAL_OR = 33; static readonly RPRACKET = 34; static readonly LBRACE = 35; static readonly RBRACE = 36; static readonly DOT = 37; static readonly MINUS = 38; static readonly EXCLAM = 39; static readonly QUESTIONMARK = 40; static readonly PLUS = 41; static readonly STAR = 42; static readonly SLASH = 43; static readonly PERCENT = 44; static readonly CEL_TRUE = 45; static readonly CEL_FALSE = 46; static readonly NUL = 47; static readonly CEL_COMMENT = 48; static readonly NUM_FLOAT = 49; static readonly NUM_INT = 50; static readonly NUM_UINT = 51; static readonly STRING = 52; static readonly BYTES = 53; static readonly EXTENDED_IDENTIFIER = 54; static readonly NEWLINE = 55; static readonly CONDITION_PARAM_CONTAINER = 56; static readonly CONDITION_PARAM_TYPE = 57; static readonly EOF: number; static readonly CONDITION_DEF = 1; static readonly channelNames: string[]; static readonly literalNames: (string | null)[]; static readonly symbolicNames: (string | null)[]; static readonly modeNames: string[]; static readonly ruleNames: string[]; constructor(input: CharStream); get grammarFileName(): string; get literalNames(): (string | null)[]; get symbolicNames(): (string | null)[]; get ruleNames(): string[]; get serializedATN(): number[]; get channelNames(): string[]; get modeNames(): string[]; static readonly _serializedATN: number[]; private static __ATN; static get _ATN(): ATN; static DecisionsToDFA: DFA[]; }