feat: add generic and plsql basic parser file

This commit is contained in:
xiaowei
2020-09-11 17:39:10 +08:00
parent 68800312d3
commit f85163892a
83 changed files with 326433 additions and 155590 deletions

View File

@ -0,0 +1,16 @@
const Lexer = require('antlr4').Lexer;
function PlSqlBaseLexer(...args) {
Lexer.call(this, ...args);
return this;
}
PlSqlBaseLexer.prototype = Object.create(Lexer.prototype);
PlSqlBaseLexer.prototype.constructor = PlSqlBaseLexer;
PlSqlBaseLexer.prototype.IsNewlineAtPos = function(pos) {
const la = this._input.LA(pos);
return la == -1 || la == '\n';
};
exports.PlSqlBaseLexer = PlSqlBaseLexer;

View File

@ -0,0 +1,27 @@
const Parser = require('antlr4').Parser;
function PlSqlBaseParser(...args) {
Parser.call(this, ...args);
this._isVersion10 = false;
this._isVersion12 = true;
return this;
}
PlSqlBaseParser.prototype = Object.create(Parser.prototype);
PlSqlBaseParser.prototype.constructor = PlSqlBaseParser;
PlSqlBaseParser.prototype.isVersion10 = function() {
return this._isVersion10;
};
PlSqlBaseParser.prototype.isVersion12 = function() {
return this._isVersion12;
};
PlSqlBaseParser.prototype.setVersion10 = function(value) {
this._isVersion10 = value;
};
PlSqlBaseParser.prototype.setVersion12 = function(value) {
this._isVersion12 = value;
};
exports.PlSqlBaseParser = PlSqlBaseParser;

File diff suppressed because one or more lines are too long

23834
src/lib/plsql/PlSqlLexer.js Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

100054
src/lib/plsql/PlSqlParser.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff