1 ! Copyright (C) 2009 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors combinators db kernel sequences peg.ebnf
4 strings db.errors multiline ;
7 TUPLE: unparsed-sqlite-error error ;
8 C: <unparsed-sqlite-error> unparsed-sqlite-error
10 EBNF: parse-sqlite-sql-error [=[
12 AlreadyExists = " already exists"
15 "table " (!(AlreadyExists).)+:table AlreadyExists
16 => [[ table >string <sql-table-exists> ]]
17 | "index " (!(AlreadyExists).)+:name AlreadyExists
18 => [[ name >string <sql-index-exists> ]]
19 | "no such table: " .+:table
20 => [[ table >string <sql-table-missing> ]]
22 => [[ error >string <unparsed-sqlite-error> ]]