How to use the antlr4ts/Lexer.Lexer function in antlr4ts

To help you get started, we’ve selected a few antlr4ts 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 mr-doc / mr-doc / src / tom / grammar / TomLexer.js View on Github external
// Generated from TomLexer.g4 by ANTLR 4.6-SNAPSHOT
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer");
const Lexer_1 = require("antlr4ts/Lexer");
const LexerATNSimulator_1 = require("antlr4ts/atn/LexerATNSimulator");
const Decorators_1 = require("antlr4ts/Decorators");
const Decorators_2 = require("antlr4ts/Decorators");
const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
const Utils = require("antlr4ts/misc/Utils");
class TomLexer extends Lexer_1.Lexer {
    constructor(input) {
        super(input);
        this._interp = new LexerATNSimulator_1.LexerATNSimulator(TomLexer._ATN, this);
    }
    get vocabulary() {
        return TomLexer.VOCABULARY;
    }
    get grammarFileName() { return "TomLexer.g4"; }
    get ruleNames() { return TomLexer.ruleNames; }
    get serializedATN() { return TomLexer._serializedATN; }
    get modeNames() { return TomLexer.modeNames; }
    action(_localctx, ruleIndex, actionIndex) {
        switch (ruleIndex) {
            case 50:
                this.ID_action(_localctx, actionIndex);
                break;
github mr-doc / mr-doc / src / tom / TomLexer.js View on Github external
// Generated from TomLexer.g4 by ANTLR 4.6-SNAPSHOT
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const ATNDeserializer_1 = require("antlr4ts/atn/ATNDeserializer");
const Lexer_1 = require("antlr4ts/Lexer");
const LexerATNSimulator_1 = require("antlr4ts/atn/LexerATNSimulator");
const Decorators_1 = require("antlr4ts/Decorators");
const Decorators_2 = require("antlr4ts/Decorators");
const VocabularyImpl_1 = require("antlr4ts/VocabularyImpl");
const Utils = require("antlr4ts/misc/Utils");
class TomLexer extends Lexer_1.Lexer {
    constructor(input) {
        super(input);
        this._interp = new LexerATNSimulator_1.LexerATNSimulator(TomLexer._ATN, this);
    }
    get vocabulary() {
        return TomLexer.VOCABULARY;
    }
    get grammarFileName() { return "TomLexer.g4"; }
    get ruleNames() { return TomLexer.ruleNames; }
    get serializedATN() { return TomLexer._serializedATN; }
    get modeNames() { return TomLexer.modeNames; }
    action(_localctx, ruleIndex, actionIndex) {
        switch (ruleIndex) {
            case 50:
                this.ID_action(_localctx, actionIndex);
                break;