mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 10:20:17 -06:00
grammar: Fix string literals in CHECK expressions (and maybe other places)
Fix parsing of table definitions like this one where there is a complex
check constraint using string literals:
CREATE TABLE "a" (
`b` TEXT CHECK(`b`='A' or `b`='B')
);
The grammar parser would fail to parse this statement correctly prior to
this fix.
See issue #179.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $ANTLR 2.7.7 (20130425): "sqlite3.g" -> "Sqlite3Lexer.cpp"$ */
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Lexer.cpp"$ */
|
||||
#include "Sqlite3Lexer.hpp"
|
||||
#include <antlr/CharBuffer.hpp>
|
||||
#include <antlr/TokenStreamException.hpp>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define INC_Sqlite3Lexer_hpp_
|
||||
|
||||
#include <antlr/config.hpp>
|
||||
/* $ANTLR 2.7.7 (20130425): "sqlite3.g" -> "Sqlite3Lexer.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Lexer.hpp"$ */
|
||||
#include <antlr/CommonToken.hpp>
|
||||
#include <antlr/InputBuffer.hpp>
|
||||
#include <antlr/BitSet.hpp>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
#define INC_Sqlite3Parser_hpp_
|
||||
|
||||
#include <antlr/config.hpp>
|
||||
/* $ANTLR 2.7.7 (20130425): "sqlite3.g" -> "Sqlite3Parser.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Parser.hpp"$ */
|
||||
#include <antlr/TokenStream.hpp>
|
||||
#include <antlr/TokenBuffer.hpp>
|
||||
#include "sqlite3TokenTypes.hpp"
|
||||
|
||||
@@ -463,7 +463,7 @@ suffixexpr
|
||||
literalvalue
|
||||
:
|
||||
NUMERIC
|
||||
// | STRINGLITERAL // captured by columnname
|
||||
| STRINGLITERAL
|
||||
// | blob-literal
|
||||
| NULL_T
|
||||
| CURRENT_TIME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef INC_sqlite3TokenTypes_hpp_
|
||||
#define INC_sqlite3TokenTypes_hpp_
|
||||
|
||||
/* $ANTLR 2.7.7 (20130425): "sqlite3.g" -> "sqlite3TokenTypes.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "sqlite3TokenTypes.hpp"$ */
|
||||
|
||||
#ifndef CUSTOM_API
|
||||
# define CUSTOM_API
|
||||
|
||||
Reference in New Issue
Block a user