@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.
47 lines (34 loc) • 1.78 kB
JavaScript
// Generated from src/grammars/CSV.g4 by ANTLR 4.13.1
// jshint ignore: start
import antlr4 from 'antlr4';
const serializedATN = [4,0,5,33,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,
7,4,1,0,1,0,1,1,1,1,1,2,4,2,17,8,2,11,2,12,2,18,1,3,1,3,1,3,1,3,5,3,25,8,
3,10,3,12,3,28,9,3,1,3,1,3,1,4,1,4,0,0,5,1,1,3,2,5,3,7,4,9,5,1,0,3,4,0,10,
10,13,13,44,44,59,59,1,0,34,34,2,0,44,44,59,59,35,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,1,11,1,0,0,0,3,13,1,0,0,0,5,16,1,0,
0,0,7,20,1,0,0,0,9,31,1,0,0,0,11,12,5,13,0,0,12,2,1,0,0,0,13,14,5,10,0,0,
14,4,1,0,0,0,15,17,8,0,0,0,16,15,1,0,0,0,17,18,1,0,0,0,18,16,1,0,0,0,18,
19,1,0,0,0,19,6,1,0,0,0,20,26,5,34,0,0,21,22,5,34,0,0,22,25,5,34,0,0,23,
25,8,1,0,0,24,21,1,0,0,0,24,23,1,0,0,0,25,28,1,0,0,0,26,24,1,0,0,0,26,27,
1,0,0,0,27,29,1,0,0,0,28,26,1,0,0,0,29,30,5,34,0,0,30,8,1,0,0,0,31,32,7,
2,0,0,32,10,1,0,0,0,4,0,18,24,26,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 CSVLexer extends antlr4.Lexer {
static grammarFileName = "CSV.g4";
static channelNames = [ "DEFAULT_TOKEN_CHANNEL", "HIDDEN" ];
static modeNames = [ "DEFAULT_MODE" ];
static literalNames = [ null, "'\\r'", "'\\n'" ];
static symbolicNames = [ null, null, null, "UNQUOTED", "QUOTED", "DELIMITER" ];
static ruleNames = [ "T__0", "T__1", "UNQUOTED", "QUOTED", "DELIMITER" ];
constructor(input) {
super(input)
this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.atn.PredictionContextCache());
}
}
CSVLexer.EOF = antlr4.Token.EOF;
CSVLexer.T__0 = 1;
CSVLexer.T__1 = 2;
CSVLexer.UNQUOTED = 3;
CSVLexer.QUOTED = 4;
CSVLexer.DELIMITER = 5;