lbadd icon indicating copy to clipboard operation
lbadd copied to clipboard

parser: AST validator

Open tsatke opened this issue 4 years ago • 1 comments

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 avatar May 21 '20 00:05 tsatke

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.

tsatke avatar May 21 '20 00:05 tsatke