Parser integration for required SQL grammar
Parser library selection is a team decision: ANTLR4 C++ runtime or handwritten lexer/parser. Do not require generated parser dependencies in the engine until agreed.
Contract
| Field | Value |
|---|---|
| Specification | PARSE-001 |
| Module | frontend |
| Scope | Required implementation or delivery |
| Milestone | M1, due 2026-12-06 |
| Owner role | SQL / frontend — teammate to claim |
| Implementation | Planned; scaffold only |
| Contract review | Team review required before implementation |
Interface
parse(string_view sql) -> Statement
These are proposed C++ design contracts, not an already implemented API. Shared types and ownership define the intended module boundaries.
Dependencies
Acceptance checklist
- [ ] Pin the course SQL.g4 revision or document equivalent handwritten grammar
- [ ] Parse all required DB/table/DML/ALTER/key/index/LOAD syntax into CORE-002 AST
- [ ] Cover literals, qualified columns, AND, and six comparison operators; reject malformed SQL
Input
INSERT INTO people VALUES (3, 'Mo', 71.25);
Expected output
InsertStatement(table=people, rows=[[3,"Mo",71.25]])
Where no ORDER BY appears, row order is not guaranteed. Error message text is illustrative; required diagnostic keywords and result framing are binding.
Verification
Completion rule
Link this spec and its GitLab issue in an MR into develop. Include relevant Linux evidence, obtain the other teammate’s review, merge, delete the feature branch, and close the issue. A page describes intended behavior; the GitLab issue and merged code determine completion.