grammar: Fix recognising numbers in the '.x' format, i.e. omitting the 0

See issue #623.
This commit is contained in:
Martin Kleusberg
2016-08-14 17:44:55 +02:00
parent 03374851f3
commit 5381bff244
6 changed files with 6 additions and 7 deletions
+1 -2
View File
@@ -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 (;;) {
+1 -1
View File
@@ -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 -1
View File
@@ -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>
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -110,7 +110,7 @@ QUOTEDLITERAL
NUMERIC
: ( (DIGIT)+ ( '.' (DIGIT)* )?
| '.' { _ttype=DOT; } (DIGIT)+)
| '.' (DIGIT)+)
( 'e' (PLUS|MINUS)? (DIGIT)+ )?
;
+1 -1
View File
@@ -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