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

Error-proof parser #6

Open
2 tasks
HyeonuPark opened this issue Dec 12, 2017 · 0 comments
Open
2 tasks

Error-proof parser #6

HyeonuPark opened this issue Dec 12, 2017 · 0 comments

Comments

@HyeonuPark
Copy link
Owner

nal_parser is intended to be error-proof parser, means small parse errors are isolated so whole parser never fail and at last it will report positions of invalid code.

Nal's grammar provides two levels of syntactic isolation - line and block. Syntax errors can't escape containing line or block(section enclosed by bracket).

block!() parser is my attempt to do it, but I found it will totally fail in some cases, like when erroneous line includes containing block's end bracket.

To properly handle cases like this, Our parser needs to perform some bracket-matching first.

  • add test cases containing erroneous lines, to check it will not spread to entire parser
  • make parser error-proof
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