antlr4-vb6
v0.0.1
Published
Visual Basic 6.0 Lexer & Parser for ANTLR4 JavaScript target
Downloads
11
Readme
Visual Basic 6.0 Grammar for ANTLR4 JavaScript
prebuilt for ANTLR4 JavaScript target.
grammer is originally cloned from uwol/vb6grammar.
How to use
npm install antlr4-vb6 antlr4
import antlr4 from 'antlr4';
import {VisualBasic6Lexer, VisualBasic6Parser} from 'antlr4-vb6';
let stream = new antlr4.InputStream('Dim i As Integer\n');
let lexer = new VisualBasic6Lexer(stream);
let tokens = new antlr4.CommonTokenStream(lexer);
let parser = new VisualBasic6Parser(tokens);
parser.buildParseTrees = true;
let tree = parser.startRule();
console.log(tree);
How to build from source
install ANTLR4
Getting Started with ANTLR v4
then, npm run build