Skip to main content

Crate spg_sql

Crate spg_sql 

Source
Expand description

SPG SQL front-end. v0.2 ships only the lexer + a minimal recursive-descent parser for the SELECT [..] FROM [..] WHERE [..] subset.

Layers (each in its own module):

  • lexer — byte stream → tokens
  • ast — abstract syntax tree types + Display (pretty-print)
  • parser — tokens → AST (Pratt parser for expression precedence)

Modules§

ast
AST for the PG-dialect subset SPG accepts in v0.2.
lexer
Lexer for the PG-dialect subset that SPG accepts.
parser
Recursive-descent parser with a Pratt (precedence-climbing) sub-parser for expressions.