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

parser: AST validator #140

Open
tsatke opened this issue May 21, 2020 · 1 comment
Open

parser: AST validator #140

tsatke opened this issue May 21, 2020 · 1 comment
Labels
component/parser This is regarding the SQL parser feature New feature or enhancement good first issue Good for newcomers help wanted Extra attention is needed

Comments

@tsatke
Copy link
Contributor

tsatke commented May 21, 2020

The validator should reside in internal/parser/ast/validate. The tool should provide a validation method for every Statement of the ast. Upon calling, the tool shall validate, if the ast is a valid production of the SQLite grammar. This validation shall go beyond parsing, i.e. validating token values, validating escape sequences inside string literals, checking bounds on numeric literals etc. The highest priority for this tool is a minimalistic API. The second highest priority is performance, as this will be used before compiling.

@tsatke tsatke added component/parser This is regarding the SQL parser feature New feature or enhancement good first issue Good for newcomers help wanted Extra attention is needed labels May 21, 2020
@tsatke
Copy link
Contributor Author

tsatke commented May 21, 2020

Most important feature right now:
ast.Validate(*ast.SQLStmt) error

All other methods should be exported too and should have the form ast.ValidateXXX(*ast.XXX) error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/parser This is regarding the SQL parser feature New feature or enhancement good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant