How to use the antlr4/index.Token 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 cancerberoSgx / univac / univac / src / grammar / r / RLexer.js View on Github external
function RLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

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

Object.defineProperty(RLexer.prototype, "atn", {
        get : function() {
                return atn;
        }
});

RLexer.EOF = antlr4.Token.EOF;
RLexer.T__0 = 1;
RLexer.T__1 = 2;
RLexer.T__2 = 3;
RLexer.T__3 = 4;
RLexer.T__4 = 5;
RLexer.T__5 = 6;
RLexer.T__6 = 7;
RLexer.T__7 = 8;
RLexer.T__8 = 9;
RLexer.T__9 = 10;
RLexer.T__10 = 11;
RLexer.T__11 = 12;
RLexer.T__12 = 13;
RLexer.T__13 = 14;
RLexer.T__14 = 15;
RLexer.T__15 = 16;
github protofire / solhint / lib / grammar / SolidityLexer.js View on Github external
function SolidityLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

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

Object.defineProperty(SolidityLexer.prototype, "atn", {
        get : function() {
                return atn;
        }
});

SolidityLexer.EOF = antlr4.Token.EOF;
SolidityLexer.T__0 = 1;
SolidityLexer.T__1 = 2;
SolidityLexer.T__2 = 3;
SolidityLexer.T__3 = 4;
SolidityLexer.T__4 = 5;
SolidityLexer.T__5 = 6;
SolidityLexer.T__6 = 7;
SolidityLexer.T__7 = 8;
SolidityLexer.T__8 = 9;
SolidityLexer.T__9 = 10;
SolidityLexer.T__10 = 11;
SolidityLexer.T__11 = 12;
SolidityLexer.T__12 = 13;
SolidityLexer.T__13 = 14;
SolidityLexer.T__14 = 15;
SolidityLexer.T__15 = 16;
github stencila / mini / parser / MiniLexer.js View on Github external
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

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

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

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

MiniLexer.EOF = antlr4.Token.EOF;
MiniLexer.T__0 = 1;
MiniLexer.T__1 = 2;
MiniLexer.T__2 = 3;
MiniLexer.T__3 = 4;
MiniLexer.T__4 = 5;
MiniLexer.T__5 = 6;
MiniLexer.T__6 = 7;
MiniLexer.T__7 = 8;
MiniLexer.T__8 = 9;
MiniLexer.T__9 = 10;
MiniLexer.T__10 = 11;
MiniLexer.T__11 = 12;
MiniLexer.T__12 = 13;
MiniLexer.T__13 = 14;
MiniLexer.T__14 = 15;
MiniLexer.T__15 = 16;
github merklejerk / solpp / src / antlr / ExprLexer.js View on Github external
function ExprLexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

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

Object.defineProperty(ExprLexer.prototype, "atn", {
        get : function() {
                return atn;
        }
});

ExprLexer.EOF = antlr4.Token.EOF;
ExprLexer.BLOCK_COMMENT = 1;
ExprLexer.LINE_COMMENT = 2;
ExprLexer.WS = 3;
ExprLexer.STRING_LITERAL = 4;
ExprLexer.FSTRING_LITERAL = 5;
ExprLexer.OCTAL_LITERAL = 6;
ExprLexer.HEX_LITERAL = 7;
ExprLexer.BINARY_LITERAL = 8;
ExprLexer.DECIMAL_LITERAL = 9;
ExprLexer.LPAREN = 10;
ExprLexer.RPAREN = 11;
ExprLexer.LBRACKET = 12;
ExprLexer.RBRACKET = 13;
ExprLexer.COMMA = 14;
ExprLexer.DOT = 15;
ExprLexer.LAMBDA_ARROW = 16;
github cancerberoSgx / univac / univac / src / grammar / python3 / Python3Lexer.js View on Github external
function Python3Lexer(input) {
	antlr4.Lexer.call(this, input);
    this._interp = new antlr4.atn.LexerATNSimulator(this, atn, decisionsToDFA, new antlr4.PredictionContextCache());
    return this;
}

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

Object.defineProperty(Python3Lexer.prototype, "atn", {
        get : function() {
                return atn;
        }
});

Python3Lexer.EOF = antlr4.Token.EOF;
Python3Lexer.DEF = 1;
Python3Lexer.RETURN = 2;
Python3Lexer.RAISE = 3;
Python3Lexer.FROM = 4;
Python3Lexer.IMPORT = 5;
Python3Lexer.AS = 6;
Python3Lexer.GLOBAL = 7;
Python3Lexer.NONLOCAL = 8;
Python3Lexer.ASSERT = 9;
Python3Lexer.IF = 10;
Python3Lexer.ELIF = 11;
Python3Lexer.ELSE = 12;
Python3Lexer.WHILE = 13;
Python3Lexer.FOR = 14;
Python3Lexer.IN = 15;
Python3Lexer.TRY = 16;
github ballerina-platform / ballerina-lang / modules / editor / web / js / ballerina-old / parser / gen / NELLexer.js View on Github external
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

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

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

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

NELLexer.EOF = antlr4.Token.EOF;
NELLexer.T__0 = 1;
NELLexer.T__1 = 2;
NELLexer.T__2 = 3;
NELLexer.T__3 = 4;
NELLexer.T__4 = 5;
NELLexer.T__5 = 6;
NELLexer.T__6 = 7;
NELLexer.T__7 = 8;
NELLexer.T__8 = 9;
NELLexer.T__9 = 10;
NELLexer.T__10 = 11;
NELLexer.T__11 = 12;
NELLexer.T__12 = 13;
NELLexer.T__13 = 14;
NELLexer.T__14 = 15;
NELLexer.T__15 = 16;
github cancerberoSgx / univac / univac / src / grammar / abnf / AbnfParser.js View on Github external
this.ruleNames = ruleNames;
    this.literalNames = literalNames;
    this.symbolicNames = symbolicNames;
    return this;
}

AbnfParser.prototype = Object.create(antlr4.Parser.prototype);
AbnfParser.prototype.constructor = AbnfParser;

Object.defineProperty(AbnfParser.prototype, "atn", {
	get : function() {
		return atn;
	}
});

AbnfParser.EOF = antlr4.Token.EOF;
AbnfParser.T__0 = 1;
AbnfParser.T__1 = 2;
AbnfParser.T__2 = 3;
AbnfParser.T__3 = 4;
AbnfParser.T__4 = 5;
AbnfParser.T__5 = 6;
AbnfParser.T__6 = 7;
AbnfParser.NumberValue = 8;
AbnfParser.ProseValue = 9;
AbnfParser.ID = 10;
AbnfParser.INT = 11;
AbnfParser.COMMENT = 12;
AbnfParser.WS = 13;
AbnfParser.STRING = 14;

AbnfParser.RULE_rulelist = 0;
github microsoft / botbuilder-tools / packages / Ludown / lib / generated / LUFileParser.js View on Github external
this.ruleNames = ruleNames;
    this.literalNames = literalNames;
    this.symbolicNames = symbolicNames;
    return this;
}

LUFileParser.prototype = Object.create(antlr4.Parser.prototype);
LUFileParser.prototype.constructor = LUFileParser;

Object.defineProperty(LUFileParser.prototype, "atn", {
	get : function() {
		return atn;
	}
});

LUFileParser.EOF = antlr4.Token.EOF;
LUFileParser.MODEL_INFO = 1;
LUFileParser.COMMENT = 2;
LUFileParser.WS = 3;
LUFileParser.NEWLINE = 4;
LUFileParser.QNA = 5;
LUFileParser.HASH = 6;
LUFileParser.DASH = 7;
LUFileParser.DOLLAR = 8;
LUFileParser.IMPORT_DESC = 9;
LUFileParser.IMPORT_PATH = 10;
LUFileParser.FILTER_MARK = 11;
LUFileParser.MULTI_LINE_TEXT = 12;
LUFileParser.INVALID_TOKEN_DEFAULT_MODE = 13;
LUFileParser.WS_IN_NAME_IGNORED = 14;
LUFileParser.IDENTIFIER = 15;
LUFileParser.DOT = 16;
github mongodb-js / bson-transpilers / lib / antlr / ECMAScriptLexer.js View on Github external
ECMAScriptLexer.prototype.nextToken = function() {
    var next = antlr4.Lexer.prototype.nextToken.call(this);
    if (next.channel == antlr4.Token.DEFAULT_CHANNEL)
        this.lastToken = next;
    return next;
};
github maiermic / antlr4-ace-ext / parser / SkippedToken / SkippedTokenLexer.js View on Github external
var atn = new antlr4.atn.ATNDeserializer().deserialize(serializedATN);

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

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

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

SkippedTokenLexer.EOF = antlr4.Token.EOF;
SkippedTokenLexer.SPACES = 1;
SkippedTokenLexer.TOKEN = 2;


SkippedTokenLexer.modeNames = [ "DEFAULT_MODE" ];

SkippedTokenLexer.literalNames = [ null, null, "'token'" ];

SkippedTokenLexer.symbolicNames = [ null, "SPACES", "TOKEN" ];

SkippedTokenLexer.ruleNames = [ "SPACES", "TOKEN" ];

SkippedTokenLexer.grammarFileName = "SkippedToken.g4";