gwenn / lemon-rs

LALR(1) parser generator for Rust based on Lemon + SQL parser
The Unlicense
48 stars 10 forks source link

Crash on invalid UTF-8 #45

Open MarinPostma opened 5 months ago

MarinPostma commented 5 months ago

The following input crashes the parser because of an invalid UTF8 sequence bad-utf8.txt

gwenn commented 5 months ago

I cannot reproduce:

lemon-rs % cargo run --example sql_cmds bad-utf8.txt
bad-utf8.txt
CREATE TABLE LEC� (ABLEBL "0", "0" EATE TABL0BL REFERENCES a);
CREATE TABLE LEC� (ASE0F�Y0);
Err: unknown table option: TA at (3, 30) in /Users/gwen/Downloads/bad-utf8.txt

I guess that the crash was related to #44 which is fixed.