|
@@ -1,6 +1,6 @@
|
|
{
|
|
{
|
|
This file is part of the Free Component Library
|
|
This file is part of the Free Component Library
|
|
- Copyright (c) 2010 by the Free Pascal development team
|
|
|
|
|
|
+ Copyright (c) 2010-2014 by the Free Pascal development team
|
|
|
|
|
|
SQL source lexical scanner
|
|
SQL source lexical scanner
|
|
|
|
|
|
@@ -71,9 +71,9 @@ type
|
|
const
|
|
const
|
|
FirstKeyword = tsqlAll;
|
|
FirstKeyword = tsqlAll;
|
|
LastKeyWord = tsqlWhen;
|
|
LastKeyWord = tsqlWhen;
|
|
- sqlComparisons = [tsqleq,tsqlGE,tsqlLE,tsqlNE,tsqlGT,tsqlLT,tsqlIn, tsqlis,
|
|
|
|
- tsqlbetween,tsqlLike,tsqlContaining,tsqlStarting,tsqlnot];
|
|
|
|
- sqlInvertableComparisons = [tsqlLike,tsqlContaining,tsqlStarting,tsqlin,tsqlis, tsqlbetween];
|
|
|
|
|
|
+ sqlComparisons = [tsqleq,tsqlGE,tsqlLE,tsqlNE,tsqlGT,tsqlLT,tsqlIn,tsqlIS,
|
|
|
|
+ tsqlbetween,tsqlLike,tsqlContaining,tsqlStarting,tsqlNOT];
|
|
|
|
+ sqlInvertableComparisons = [tsqlLike,tsqlContaining,tsqlStarting,tsqlin,tsqlIS, tsqlbetween];
|
|
|
|
|
|
// Strings that represent tokens in TSQLToken
|
|
// Strings that represent tokens in TSQLToken
|
|
TokenInfos: array[TSQLToken] of string = ('unknown',
|
|
TokenInfos: array[TSQLToken] of string = ('unknown',
|
|
@@ -632,7 +632,7 @@ begin
|
|
Move(TokenStart^,FCurTokenString[1],Len);
|
|
Move(TokenStart^,FCurTokenString[1],Len);
|
|
S:=UpperCase(FCurTokenString);
|
|
S:=UpperCase(FCurTokenString);
|
|
// Check if this is a keyword or identifier
|
|
// Check if this is a keyword or identifier
|
|
- // !!!: Optimize this!
|
|
|
|
|
|
+ // to do: Optimize this!
|
|
If FKeyWords.Count=0 then
|
|
If FKeyWords.Count=0 then
|
|
BuildKeyWords;
|
|
BuildKeyWords;
|
|
P:=FKeyWords.Find(S);
|
|
P:=FKeyWords.Find(S);
|