How to use the antlr4/index.atn function in antlr4

To help you get started, we’ve selected a few antlr4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github maiermic / antlr4-ace-ext / parser / SingleToken / SingleTokenLexer.js View on Github external
// Generated from grammar/SingleToken.g4 by ANTLR 4.5.3
// jshint ignore: start
var antlr4 = require('antlr4/index');


var serializedATN = ["\u0003\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd",
    "\u0002\u0003\u000b\b\u0001\u0004\u0002\t\u0002\u0003\u0002\u0003\u0002",
    "\u0003\u0002\u0003\u0002\u0003\u0002\u0003\u0002\u0002\u0002\u0003\u0003",
    "\u0003\u0003\u0002\u0002\n\u0002\u0003\u0003\u0002\u0002\u0002\u0003",
    "\u0005\u0003\u0002\u0002\u0002\u0005\u0006\u0007v\u0002\u0002\u0006",
    "\u0007\u0007q\u0002\u0002\u0007\b\u0007m\u0002\u0002\b\t\u0007g\u0002",
    "\u0002\t\n\u0007p\u0002\u0002\n\u0004\u0003\u0002\u0002\u0002\u0003",
    "\u0002\u0002"].join("");


var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });

function SingleTokenLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

SingleTokenLexer.prototype = Object.create(antlr4.Lexer.prototype);
SingleTokenLexer.prototype.constructor = SingleTokenLexer;

SingleTokenLexer.EOF = antlr4.Token.EOF;
SingleTokenLexer.TOKEN = 1;
github maiermic / antlr4-ace-ext / parser / VariableDeclaration / VariableDeclarationParser.js View on Github external
function VariableDeclarationParser (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;
}
github maiermic / antlr4-ace-ext / parser / SingleToken / SingleTokenLexer.js View on Github external
function SingleTokenLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}
github cancerberoSgx / univac / univac / src / grammar / less / LessLexer.js View on Github external
"\u0005!\u0010\u0002\u0539\u053a\u0003\u0002\u0002\u0002\u053a\u053b",
    "\b\u0099\u0005\u0002\u053b\u053c\b\u0099\r\u0002\u053c\u0134\u0003\u0002",
    "\u0002\u0002\u053d\u053e\u0005%\u0012\u0002\u053e\u053f\u0003\u0002",
    "\u0002\u0002\u053f\u0540\b\u009a\u0005\u0002\u0540\u0541\b\u009a\u000e",
    "\u0002\u0541\u0136\u0003\u0002\u0002\u0002\u0542\u0543\u0005#\u0011",
    "\u0002\u0543\u0544\u0003\u0002\u0002\u0002\u0544\u0545\b\u009b\u0005",
    "\u0002\u0545\u0546\b\u009b\u000f\u0002\u0546\u0138\u0003\u0002\u0002",
    "\u0002\u001d\u0002\u0003\u0004\u0164\u0227\u022f\u0232\u023a\u0242\u0246",
    "\u024e\u0252\u0257\u025c\u0260\u0265\u0267\u026d\u0272\u0274\u027e\u0284",
    "\u0286\u0290\u02e6\u050a\u050c\u0010\u0007\u0004\u0002\u0007\u0003\u0002",
    "\b\u0002\u0002\u0006\u0002\u0002\t\n\u0002\t\u0015\u0002\t\u000b\u0002",
    "\t\u0006\u0002\t\u0014\u0002\t\b\u0002\t\t\u0002\t\u0011\u0002\t\u0013",
    "\u0002\t\u0012\u0002"].join("");


var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });

function LessLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

LessLexer.prototype = Object.create(antlr4.Lexer.prototype);
LessLexer.prototype.constructor = LessLexer;

Object.defineProperty(LessLexer.prototype, "atn", {
        get : function() {
                return atn;
        }
github cancerberoSgx / univac / univac / src / grammar / r / RFilter.js View on Github external
function RFilter (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;

	  this.curlies = 0;

    return this;
}
github cancerberoSgx / univac / univac / src / grammar / c / CLexer.js View on Github external
"\u0002\u0002\u0557\u0558\u00071\u0002\u0002\u0558\u0559\u00071\u0002",
    "\u0002\u0559\u055d\u0003\u0002\u0002\u0002\u055a\u055c\n\u0013\u0002",
    "\u0002\u055b\u055a\u0003\u0002\u0002\u0002\u055c\u055f\u0003\u0002\u0002",
    "\u0002\u055d\u055b\u0003\u0002\u0002\u0002\u055d\u055e\u0003\u0002\u0002",
    "\u0002\u055e\u0560\u0003\u0002\u0002\u0002\u055f\u055d\u0003\u0002\u0002",
    "\u0002\u0560\u0561\b\u009d\u0002\u0002\u0561\u013a\u0003\u0002\u0002",
    "\u0002J\u0002\u038a\u038c\u0391\u03a1\u03ab\u03af\u03b3\u03b7\u03ba",
    "\u03c1\u03c7\u03ce\u03d5\u03e2\u03e9\u03ed\u03ef\u03f9\u03fd\u0401\u0404",
    "\u0409\u040b\u0411\u0417\u0419\u041c\u0423\u0427\u042c\u042f\u0436\u0439",
    "\u0440\u0444\u0449\u044c\u0451\u046b\u0470\u0474\u047a\u048a\u0492\u0495",
    "\u0499\u04a0\u04a5\u04ae\u04b2\u04be\u04c5\u04d0\u04d6\u04de\u04e2\u04e5",
    "\u04f2\u04f9\u0509\u050f\u0516\u051a\u0520\u0527\u0534\u053c\u0542\u0545",
    "\u054f\u055d\u0003\b\u0002\u0002"].join("");


var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

var decisionsToDFA = atn.decisionToState.map( function(ds, index) { return new antlr4.dfa.DFA(ds, index); });

function CLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

CLexer.prototype = Object.create(antlr4.Lexer.prototype);
CLexer.prototype.constructor = CLexer;

Object.defineProperty(CLexer.prototype, "atn", {
        get : function() {
                return atn;
        }
github cancerberoSgx / univac / univac / src / grammar / r / RFilter.js View on Github external
"\u0003\u0002\u0002\u0002\u0087\u0085\u0003\u0002\u0002\u0002\u0088\u008a",
    "\u0007%\u0002\u0002\u0089\u008b\u0005\u0004\u0003\u0002\u008a\u0089",
    "\u0003\u0002\u0002\u0002\u008a\u008b\u0003\u0002\u0002\u0002\u008b\u008f",
    "\u0003\u0002\u0002\u0002\u008c\u008d\u0007)\u0002\u0002\u008d\u008f",
    "\b\u0004\u0001\u0002\u008e\u001c\u0003\u0002\u0002\u0002\u008e \u0003",
    "\u0002\u0002\u0002\u008e!\u0003\u0002\u0002\u0002\u008e0\u0003\u0002",
    "\u0002\u0002\u008e9\u0003\u0002\u0002\u0002\u008eB\u0003\u0002\u0002",
    "\u0002\u008eL\u0003\u0002\u0002\u0002\u008e\\\u0003\u0002\u0002\u0002",
    "\u008el\u0003\u0002\u0002\u0002\u008e|\u0003\u0002\u0002\u0002\u008e",
    "\u008c\u0003\u0002\u0002\u0002\u008f\u0007\u0003\u0002\u0002\u0002\u0090",
    "\u0091\t\u0002\u0002\u0002\u0091\t\u0003\u0002\u0002\u0002\u0092\u0093",
    "\t\u0003\u0002\u0002\u0093\u000b\u0003\u0002\u0002\u0002 \u000f\u0011",
    "\u001a\u001e#)+35<>EGNSUZ^cejnsuz~\u0083\u0085\u008a\u008e"].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, "';'", "'[['", "']'", "'['", "'::'", "':::'", 
                     "'$'", "'@'", "'^'", "'-'", "'+'", "':'", "'*'", "'/'", 
                     "'>'", "'>='", "'<'", "'<='", "'=='", "'!='", "'!'", 
                     "'&'", "'&&'", "'|'", "'||'", "'~'", "'<-'", "'<<-'", 
                     "'='", "'->'", "'->>'", "':='", "'function'", "'('", 
                     "')'", "'{'", "'}'", "'if'", "'else'", "'for'", "'in'", 
                     "'while'", "'repeat'", "'?'", "'next'", "'break'", 
                     "'NULL'", "'NA'", "'Inf'", "'NaN'", "'TRUE'", "'FALSE'", 
                     "','", "'...'", "'.'" ];

var symbolicNames = [ null, null, null, null, null, null, null, null, null,
github cancerberoSgx / univac / univac / src / grammar / abnf / AbnfLexer.js View on Github external
function AbnfLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}
github cancerberoSgx / univac / univac / src / grammar / r / RParser.js View on Github external
function RParser (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;
}