Skip to content

DanielBV/antlr4-shulk

Repository files navigation

Antlr4-shulk

An autocomplete library for ANTLR4 grammars. The development of this library was explained in a series of posts: https://www.abstractsyntaxseed.com/blog/antlr4-autocomplete-library/introduction

How to use

For the basic use, you can do:

const ac = new Autocompleter(MyLexer, MyParser);
const result = ac.autocomplete(input);

Here MyLexer and MyParser are classes, not objects. The autocompleter will instanciate them.

To change the starting rule, you can use the second argument of autocomplete:

const options = {initialRule: MyParser.RULE_myRule};
const ac = new Autocompleter(MyLexer, MyParser, options);
const result = ac.autocomplete(input);

About

An autocomplete library for ANTLR4 grammars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published