Formatting
This commit is contained in:
@ -1053,46 +1053,48 @@ void SkipPastNextOccurrence(String target) :
|
|||||||
{ return; }
|
{ return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Read Tokens up to but not including the target Token.kind.
|
* Read Tokens up to but not including the target Token.kind.
|
||||||
*/
|
*/
|
||||||
void Skip2NextTokenOccurrence(int target) :
|
void Skip2NextTokenOccurrence(int target) :
|
||||||
{
|
{
|
||||||
Token nextToken = getToken(1);
|
Token nextToken = getToken(1);
|
||||||
Token specToken = null ;
|
Token specToken = null ;
|
||||||
while (nextToken.kind!=target
|
while (nextToken.kind!=target
|
||||||
&& (null == nextToken.specialToken || nextToken.specialToken.kind!=target ) //In case the target is a Special Token
|
&& (null == nextToken.specialToken || nextToken.specialToken.kind!=target ) //In case the target is a Special Token
|
||||||
&& nextToken.kind!=EOF) //SRT 20110521 - Prevent endless loop when target does not exist in the input stream
|
&& nextToken.kind!=EOF) //SRT 20110521 - Prevent endless loop when target does not exist in the input stream
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
Check if the target appears as a SpecialToken
|
* Check if the target appears as a SpecialToken
|
||||||
|
*
|
||||||
|
* nextToken.specialToken points to the _LAST_ of any SpecialTokens before the current normal Token.
|
||||||
|
*
|
||||||
|
* It is the head of a doubly-linked list:
|
||||||
|
*
|
||||||
|
* The ${specialToken}.specialToken field POINTS BACKWARDS TOWARDS the FIRST occurring SpecialToken
|
||||||
|
* The ${specialToken}.next field POINTS FORWARDS to to the LAST occurring SpecialToken
|
||||||
|
*
|
||||||
|
* This means that if the program is interested in a specific SpecialToken, it must examine the linked list for every Token which has nexToken.specialToken != null.
|
||||||
|
*/
|
||||||
|
specToken = nextToken.specialToken;
|
||||||
|
if (null!= specToken) {
|
||||||
|
//Walk backwards through the list looking for this Token as a Special Token
|
||||||
|
while (specToken != null && specToken.kind != target) {
|
||||||
|
specToken = specToken.specialToken;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
nextToken.specialToken points to the _LAST_ of any SpecialTokens before the current normal Token.
|
//We have found the target as a SpecialToken - break out of normal Token search
|
||||||
|
if (null != specToken && specToken.kind == target) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
It is the head of a doubly-linked list:
|
nextToken = getNextToken();
|
||||||
|
nextToken = getToken(1);
|
||||||
The ${specialToken}.specialToken field POINTS BACKWARDS TOWARDS the FIRST occurring SpecialToken
|
}
|
||||||
The ${specialToken}.next field POINTS FORWARDS to to the LAST occurring SpecialToken
|
|
||||||
|
|
||||||
This means that if the program is interested in a specific SpecialToken, it must examine the linked list for every Token which has nexToken.specialToken != null.
|
|
||||||
|
|
||||||
*/
|
|
||||||
specToken = nextToken.specialToken;
|
|
||||||
if (null!= specToken)
|
|
||||||
//Walk backwards through the list looking for this Token as a Special Token
|
|
||||||
while (specToken != null && specToken.kind != target)
|
|
||||||
specToken = specToken.specialToken;
|
|
||||||
|
|
||||||
//We have found the target as a SpecialToken - break out of normal Token search
|
|
||||||
if (null != specToken && specToken.kind == target)
|
|
||||||
break;
|
|
||||||
|
|
||||||
nextToken = getNextToken();
|
|
||||||
nextToken = getToken(1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
{ return; }
|
{ return; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -2864,6 +2866,10 @@ ASTCursorUnit CursorUnit() :
|
|||||||
{ jjtThis.setImage(simpleNode.getImage()) ; return jjtThis ; }
|
{ jjtThis.setImage(simpleNode.getImage()) ; return jjtThis ; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is in plsql actually called <a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/lnpls/explicit-cursor-declaration-and-definition.html#GUID-38C5DBA3-9DEC-4AF2-9B5E-7B721D11A77C">CursorDeclaration</a>
|
||||||
|
* or <a href="https://docs.oracle.com/en/database/oracle/oracle-database/18/lnpls/explicit-cursor-declaration-and-definition.html#GUID-38C5DBA3-9DEC-4AF2-9B5E-7B721D11A77C">CursorDefinition</a>.
|
||||||
|
*/
|
||||||
ASTCursorBody CursorBody() : {}
|
ASTCursorBody CursorBody() : {}
|
||||||
{
|
{
|
||||||
CursorUnit()
|
CursorUnit()
|
||||||
|
Reference in New Issue
Block a user