Skip to main content

Module parser

Module parser 

Source
Expand description

Recursive-descent statement parser with Pratt expression parsing.

Functions§

parse
Public statement entry — implemented in Task 12.
parse_with_command_identities
Parse statements and return the parser-owned accepted command identity for each one. Identity classification is the same mandatory gate used by parse.
parse_with_source
Parse sql into statements, each paired with its EXACT source text — the byte slice of sql spanning that statement, trimmed of surrounding whitespace. The multi-range gateway uses this to forward an INDIVIDUAL statement (not the whole ;-separated simple-query frame) to a remote range’s leader, so a frame mixing a local and a remote range never re-runs the local statement on the remote node.