forked from jasder/antlr
TODO
This commit is contained in:
parent
6c717889b2
commit
97bf8d63f8
|
@ -1,9 +1,7 @@
|
||||||
PORT_DEBUG = false
|
|
||||||
|
|
||||||
var antlr4 = require('./antlr4/index');
|
var antlr4 = require('./antlr4/index');
|
||||||
var TLexer = require('./TLexer');
|
var DesignScriptLexer = require('./DesignScriptLexer');
|
||||||
var TParser = require('./TParser');
|
var DesignScriptParser = require('./DesignScriptParser');
|
||||||
var TListener = require('./TListener').TListener;
|
var DesignScriptListener = require('./DesignScriptListener').DesignScriptListener;
|
||||||
// var TVisitor = require('./parser/TVisitor').TVisitor;
|
// var TVisitor = require('./parser/TVisitor').TVisitor;
|
||||||
|
|
||||||
function TreeShapeListener() {
|
function TreeShapeListener() {
|
||||||
|
@ -25,10 +23,11 @@ TreeShapeListener.prototype.enterEveryRule = function(ctx) {
|
||||||
};
|
};
|
||||||
|
|
||||||
function main(argv) {
|
function main(argv) {
|
||||||
|
PORT_DEBUG =true
|
||||||
var input = new antlr4.FileStream(argv[2]);
|
var input = new antlr4.FileStream(argv[2]);
|
||||||
var lexer = new TLexer.TLexer(input);
|
var lexer = new DesignScriptLexer.DesignScriptLexer(input);
|
||||||
var stream = new antlr4.CommonTokenStream(lexer);
|
var stream = new antlr4.CommonTokenStream(lexer);
|
||||||
var parser = new TParser.TParser(stream);
|
var parser = new DesignScriptParser.DesignScriptParser(stream);
|
||||||
parser.buildParseTrees = true;
|
parser.buildParseTrees = true;
|
||||||
printer = function() {
|
printer = function() {
|
||||||
this.println = function(s) { console.log(s); }
|
this.println = function(s) { console.log(s); }
|
||||||
|
|
Loading…
Reference in New Issue