mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-04-28 16:09:16 -05:00
grammar: Fix recognising numbers in the '.x' format, i.e. omitting the 0
See issue #623.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Lexer.cpp"$ */
|
||||
/* $ANTLR 2.7.7 (20160127): "sqlite3.g" -> "Sqlite3Lexer.cpp"$ */
|
||||
#include "Sqlite3Lexer.hpp"
|
||||
#include <antlr/CharBuffer.hpp>
|
||||
#include <antlr/TokenStreamException.hpp>
|
||||
@@ -616,7 +616,6 @@ void Sqlite3Lexer::mNUMERIC(bool _createToken) {
|
||||
case 0x2e /* '.' */ :
|
||||
{
|
||||
match(L'.' /* charlit */ );
|
||||
_ttype=DOT;
|
||||
{ // ( ... )+
|
||||
int _cnt27=0;
|
||||
for (;;) {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define INC_Sqlite3Lexer_hpp_
|
||||
|
||||
#include <antlr/config.hpp>
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Lexer.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20160127): "sqlite3.g" -> "Sqlite3Lexer.hpp"$ */
|
||||
#include <antlr/CommonToken.hpp>
|
||||
#include <antlr/InputBuffer.hpp>
|
||||
#include <antlr/BitSet.hpp>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Parser.cpp"$ */
|
||||
/* $ANTLR 2.7.7 (20160127): "sqlite3.g" -> "Sqlite3Parser.cpp"$ */
|
||||
#include "Sqlite3Parser.hpp"
|
||||
#include <antlr/NoViableAltException.hpp>
|
||||
#include <antlr/SemanticException.hpp>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define INC_Sqlite3Parser_hpp_
|
||||
|
||||
#include <antlr/config.hpp>
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "Sqlite3Parser.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20160127): "sqlite3.g" -> "Sqlite3Parser.hpp"$ */
|
||||
#include <antlr/TokenStream.hpp>
|
||||
#include <antlr/TokenBuffer.hpp>
|
||||
#include "sqlite3TokenTypes.hpp"
|
||||
|
||||
@@ -110,7 +110,7 @@ QUOTEDLITERAL
|
||||
|
||||
NUMERIC
|
||||
: ( (DIGIT)+ ( '.' (DIGIT)* )?
|
||||
| '.' { _ttype=DOT; } (DIGIT)+)
|
||||
| '.' (DIGIT)+)
|
||||
( 'e' (PLUS|MINUS)? (DIGIT)+ )?
|
||||
;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef INC_sqlite3TokenTypes_hpp_
|
||||
#define INC_sqlite3TokenTypes_hpp_
|
||||
|
||||
/* $ANTLR 2.7.7 (20141010): "sqlite3.g" -> "sqlite3TokenTypes.hpp"$ */
|
||||
/* $ANTLR 2.7.7 (20160127): "sqlite3.g" -> "sqlite3TokenTypes.hpp"$ */
|
||||
|
||||
#ifndef CUSTOM_API
|
||||
# define CUSTOM_API
|
||||
|
||||
Reference in New Issue
Block a user