Crates.io | sqlite3-parser |
lib.rs | sqlite3-parser |
version | |
source | src |
created_at | 2021-02-07 17:08:56.501536 |
updated_at | 2025-01-19 13:25:07.448796 |
description | SQL parser (as understood by SQLite) |
homepage | |
repository | https://github.com/gwenn/lemon-rs |
max_upload_size | |
id | 352002 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
LEMON parser generator modified to generate Rust code.
Lemon source and SQLite3 grammar were last synced as of July 2024.
%token_destructor
: Code to execute to destroy token data%default_destructor
: Code for the default non-terminal destructor%destructor
: Code which executes whenever this symbol is
popped from the stack during error processinghttps://www.codeproject.com/Articles/1056460/Generating-a-High-Speed-Parser-Part-Lemon https://www.sqlite.org/lemon.html
SQLite lexer and SQLite parser have been ported from C to Rust. The parser generates an AST.
Lexer/Parser:
Lexer and parser have been tested with the following scripts:
TODO:
#line
directiveParseAlloc
/ParseFree
anymore%extra_argument
is not supported.lemon_rust does the same thing
but with an old version of lemon
. And it seems not possible to use yystack
as a stack because items may be access randomly and the top+1
item can be used.
lalrpop would be the perfect alternative but it does not support fallback/streaming (see this issue) and compilation/generation is slow.
Latest stable Rust version at the time of release. It might compile with older versions.