Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can Jison parser be error tolerant? #376

Open
wongjiahau opened this issue Jul 17, 2018 · 0 comments
Open

Can Jison parser be error tolerant? #376

wongjiahau opened this issue Jul 17, 2018 · 0 comments

Comments

@wongjiahau
Copy link

Background

In order to design a [language-server[(https://code.visualstudio.com/docs/extensions/example-language-server) to be used for Visual Studio Code, the parser have to be error tolerant(the full mechanism is explained here).

Request

So, I'm wondering if Jison could integrate such feature into the parser.

For example, the parser should automatically fill-in missing token

function hello() {
    console.log("hello");
// } <-- missing token

function next() {
    console.log("next");
}

The parser should look for token that will minimize number of error-filling tokens.
In this case, if the parser tried to fill up the next token as let, then the next token will be error since after let should be variable identifier, so let will not be considered. So, the parser will try all possible next-token and choose the one that produces the least error.

Can you help with this @zaach ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant