Skip to content
Discussion options

You must be logged in to vote

why the parser fails to perform its lookahead function?

Because the lookahead is instantly aborted once a token is identified that doesn't fit any of the given alternatives. See also here.

And do you think it's possible that I parse the documents before parser error and after parser error individually to validator?

No, because the entry point of the grammar already appeared, and so it will just result in more errors for all non-trivial grammars.

Do you know what're the functions that I can use to validate the document that doesn't contain those errors?

I guess you would need to look at the errors in the document? I'm not entirely sure.

Can langium also implement that?

Maybe? I nee…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@durianwaffle
Comment options

@durianwaffle
Comment options

@durianwaffle
Comment options

@msujew
Comment options

Answer selected by durianwaffle
@durianwaffle
Comment options

@msujew
Comment options

@durianwaffle
Comment options

@msujew
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants