UNPKG

@stordata/grammars

Version:

A collection of ANTLR grammars used at Stordata. This project exists so that we can package the grammars (and various utilities) as a CommonJS module. The `antlr4` Javascript runtime is only available as an ES module at the time of writing.

102 lines (89 loc) 5.09 kB
// Generated from src/grammars/CustomMetric.g4 by ANTLR 4.13.1 // jshint ignore: start import antlr4 from 'antlr4'; const serializedATN = [4,0,23,124,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2, 4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7, 12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19, 2,20,7,20,2,21,7,21,2,22,7,22,1,0,1,0,1,1,3,1,51,8,1,1,1,4,1,54,8,1,11,1, 12,1,55,1,1,1,1,4,1,60,8,1,11,1,12,1,61,3,1,64,8,1,1,2,1,2,4,2,68,8,2,11, 2,12,2,69,1,2,1,2,1,3,4,3,75,8,3,11,3,12,3,76,1,4,1,4,1,4,1,4,4,4,83,8,4, 11,4,12,4,84,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1, 11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18, 1,18,1,19,1,19,1,20,1,20,1,21,1,21,1,22,1,22,1,69,0,23,1,1,3,2,5,3,7,4,9, 5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35, 18,37,19,39,20,41,21,43,22,45,23,1,0,5,2,0,65,90,97,122,1,0,48,57,1,0,9, 9,1,0,13,13,1,0,10,10,133,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0, 0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1, 0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0, 31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0, 0,0,0,43,1,0,0,0,0,45,1,0,0,0,1,47,1,0,0,0,3,50,1,0,0,0,5,65,1,0,0,0,7,74, 1,0,0,0,9,82,1,0,0,0,11,88,1,0,0,0,13,90,1,0,0,0,15,92,1,0,0,0,17,94,1,0, 0,0,19,96,1,0,0,0,21,98,1,0,0,0,23,100,1,0,0,0,25,102,1,0,0,0,27,104,1,0, 0,0,29,106,1,0,0,0,31,108,1,0,0,0,33,110,1,0,0,0,35,112,1,0,0,0,37,114,1, 0,0,0,39,116,1,0,0,0,41,118,1,0,0,0,43,120,1,0,0,0,45,122,1,0,0,0,47,48, 5,44,0,0,48,2,1,0,0,0,49,51,3,29,14,0,50,49,1,0,0,0,50,51,1,0,0,0,51,53, 1,0,0,0,52,54,3,19,9,0,53,52,1,0,0,0,54,55,1,0,0,0,55,53,1,0,0,0,55,56,1, 0,0,0,56,63,1,0,0,0,57,59,3,21,10,0,58,60,3,19,9,0,59,58,1,0,0,0,60,61,1, 0,0,0,61,59,1,0,0,0,61,62,1,0,0,0,62,64,1,0,0,0,63,57,1,0,0,0,63,64,1,0, 0,0,64,4,1,0,0,0,65,67,3,35,17,0,66,68,3,45,22,0,67,66,1,0,0,0,68,69,1,0, 0,0,69,70,1,0,0,0,69,67,1,0,0,0,70,71,1,0,0,0,71,72,3,35,17,0,72,6,1,0,0, 0,73,75,7,0,0,0,74,73,1,0,0,0,75,76,1,0,0,0,76,74,1,0,0,0,76,77,1,0,0,0, 77,8,1,0,0,0,78,83,3,37,18,0,79,83,3,39,19,0,80,83,3,41,20,0,81,83,3,43, 21,0,82,78,1,0,0,0,82,79,1,0,0,0,82,80,1,0,0,0,82,81,1,0,0,0,83,84,1,0,0, 0,84,82,1,0,0,0,84,85,1,0,0,0,85,86,1,0,0,0,86,87,6,4,0,0,87,10,1,0,0,0, 88,89,3,27,13,0,89,12,1,0,0,0,90,91,3,29,14,0,91,14,1,0,0,0,92,93,3,31,15, 0,93,16,1,0,0,0,94,95,3,33,16,0,95,18,1,0,0,0,96,97,7,1,0,0,97,20,1,0,0, 0,98,99,5,46,0,0,99,22,1,0,0,0,100,101,5,40,0,0,101,24,1,0,0,0,102,103,5, 41,0,0,103,26,1,0,0,0,104,105,5,43,0,0,105,28,1,0,0,0,106,107,5,45,0,0,107, 30,1,0,0,0,108,109,5,42,0,0,109,32,1,0,0,0,110,111,5,47,0,0,111,34,1,0,0, 0,112,113,5,34,0,0,113,36,1,0,0,0,114,115,5,32,0,0,115,38,1,0,0,0,116,117, 7,2,0,0,117,40,1,0,0,0,118,119,7,3,0,0,119,42,1,0,0,0,120,121,7,4,0,0,121, 44,1,0,0,0,122,123,9,0,0,0,123,46,1,0,0,0,9,0,50,55,61,63,69,76,82,84,1, 6,0,0]; const atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN); const decisionsToDFA = atn.decisionToState.map( (ds, index) => new antlr4.dfa.DFA(ds, index) ); export default class CustomMetricLexer extends antlr4.Lexer { static grammarFileName = "CustomMetric.g4"; static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ]; static modeNames = [ "DEFAULT_MODE" ]; static literalNames = [ null, "','", null, null, null, null, null, null, null, null, null, "'.'", "'('", "')'", "'+'", "'-'", "'*'", "'/'", "'\"'", "' '" ]; static symbolicNames = [ null, null, "NUMBER", "STRING", "FN", "WHITESPACE", "ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT", "DOT", "L_PARANT", "R_PARANT", "PLUS", "MINUS", "STAR", "SLASH", "DQUOTE", "SPACE", "TAB", "CR", "LF", "ANY" ]; static ruleNames = [ "T__0", "NUMBER", "STRING", "FN", "WHITESPACE", "ADD", "SUBTRACT", "MULTIPLY", "DIVIDE", "DIGIT", "DOT", "L_PARANT", "R_PARANT", "PLUS", "MINUS", "STAR", "SLASH", "DQUOTE", "SPACE", "TAB", "CR", "LF", "ANY" ]; constructor(input) { super(input) this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache()); } } CustomMetricLexer.EOF = antlr4.Token.EOF; CustomMetricLexer.T__0 = 1; CustomMetricLexer.NUMBER = 2; CustomMetricLexer.STRING = 3; CustomMetricLexer.FN = 4; CustomMetricLexer.WHITESPACE = 5; CustomMetricLexer.ADD = 6; CustomMetricLexer.SUBTRACT = 7; CustomMetricLexer.MULTIPLY = 8; CustomMetricLexer.DIVIDE = 9; CustomMetricLexer.DIGIT = 10; CustomMetricLexer.DOT = 11; CustomMetricLexer.L_PARANT = 12; CustomMetricLexer.R_PARANT = 13; CustomMetricLexer.PLUS = 14; CustomMetricLexer.MINUS = 15; CustomMetricLexer.STAR = 16; CustomMetricLexer.SLASH = 17; CustomMetricLexer.DQUOTE = 18; CustomMetricLexer.SPACE = 19; CustomMetricLexer.TAB = 20; CustomMetricLexer.CR = 21; CustomMetricLexer.LF = 22; CustomMetricLexer.ANY = 23;