%DeepSee.SQL.Parser

class %DeepSee.SQL.Parser extends %Library.RegisteredObject

Include %qaqplex

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties

property %CurrentToken as %String;
Accumulator for the current token
Property methods: %CurrentTokenDisplayToLogical(), %CurrentTokenGet(), %CurrentTokenIsValid(), %CurrentTokenLogicalToDisplay(), %CurrentTokenLogicalToOdbc(), %CurrentTokenNormalize(), %CurrentTokenSet()
property %Input as %String [ MultiDimensional ];
Property methods: %InputDisplayToLogical(), %InputGet(), %InputIsValid(), %InputLogicalToDisplay(), %InputLogicalToOdbc(), %InputNormalize(), %InputPartDisplayToLogical(), %InputPartGet(), %InputPartIsValid(), %InputPartLogicalToDisplay(), %InputPartNormalize(), %InputPartSet(), %InputSet()
property %InputPart as %Integer [ InitialExpression = 0 ];
Current part of the input being processed
Property methods: %InputPartDisplayToLogical(), %InputPartGet(), %InputPartIsValid(), %InputPartLogicalToDisplay(), %InputPartNormalize(), %InputPartSet()
property %LastToken as %String;
Container for the last complete token. This is used for looking back when there are multiple tokens in a succession.
Property methods: %LastTokenDisplayToLogical(), %LastTokenGet(), %LastTokenIsValid(), %LastTokenLogicalToDisplay(), %LastTokenLogicalToOdbc(), %LastTokenNormalize(), %LastTokenSet()
property %Position as %Integer [ InitialExpression = 0 ];
Current position in the string
Property methods: %PositionDisplayToLogical(), %PositionGet(), %PositionIsValid(), %PositionLogicalToDisplay(), %PositionNormalize(), %PositionSet()
property %TokenList as %DynamicArray;
The ordered list of complete tokens
Property methods: %TokenListGet(), %TokenListGetObject(), %TokenListGetObjectId(), %TokenListGetSwizzled(), %TokenListIsValid(), %TokenListNewObject(), %TokenListSet(), %TokenListSetObject(), %TokenListSetObjectId(), %TokenListUnSwizzle()
property stack as %DynamicArray;
Stack for changing state
Property methods: stackGet(), stackGetObject(), stackGetObjectId(), stackGetSwizzled(), stackIsValid(), stackNewObject(), stackSet(), stackSetObject(), stackSetObjectId(), stackUnSwizzle()
property state as %DynamicObject;
Any state information can be packed into this object, which can be pushed or popped from a stack if needed.
Property methods: stateGet(), stateGetObject(), stateGetObjectId(), stateGetSwizzled(), stateIsValid(), stateNewObject(), stateSet(), stateSetObject(), stateSetObjectId(), stateUnSwizzle()

Methods

private method %CheckDollar(pString As %String = "") as %Integer [ Language = objectscript ]
Investigate the current position for $ tokens. Returns the number of consecutive dollar sign characters beginning at the current position
method %GetTokenList() as %DynamicArray [ Language = objectscript ]
Returns the current %TokenList array
method %InitializeState() as %Status [ Language = objectscript ]
Initialize the state object.
private method %IsAggFunction(pToken As %String = "", Output pFunctionArity) as %Boolean [ Language = objectscript ]
private method %IsCastType(pToken As %String = "", pFunctionArity) as %Boolean [ Language = objectscript ]
Type arguments in the CAST function can look like
private method %IsDSMacro(pToken As %String = "", pFunctionArity) as %Boolean [ Language = objectscript ]
Test for one of the DeepSee-specific macro functions
private method %IsFunction(pToken As %String = "", Output pFunctionArity) as %Boolean [ Language = objectscript ]
Test for a supported function
method %IsOperatorChar(pChar As %String = "", Output pOpLength) as %Boolean [ Language = objectscript ]
Test for a single-character operator
method %IsOperatorToken(pToken As %String = "") as %Boolean [ Language = objectscript ]
Test for an opertor token of arbitrary length
private method %IsScalarFunction(pToken As %String = "", Output pFunctionArity) as %Boolean [ Language = objectscript ]
Test for a supported scalar function
private method %IsSeparatorChar(pChar As %String = "", pPosition As %Integer = ..%Position) as %Boolean [ Language = objectscript ]
Test for a characer separating two different terms.
method %IsUserFunction(pFunction, pLastToken=..%LastToken) as %Boolean [ Language = objectscript ]
private method %IsWhiteSpace(pChar As %String = "") as %Boolean [ Language = objectscript ]
Test for white space character
method %OnNew(pInput As %String) as %Status [ Language = objectscript ]
Optionally set the input as the object is created.
classmethod %ParseSelect(pSelectTokens As %DynamicArray, Output pParsedTree, Output pSpecialTokens) as %Status [ Language = objectscript ]
Parse SELECT list for a DeepSee listing. The output pParsedTree is a %DynamicArray containing the individual select terms.
private method %PopState() as %Status [ Language = objectscript ]
Restore the last state from the top of the stack.
method %PrintInput(pVerbose=1) as %String [ Language = objectscript ]
Print the current inputas set by %SetInput(). If pVerbose = 1, print the string to the current device.
method %PrintTokenList(pVerbose=1) as %String [ Language = objectscript ]
method %ProcessDsTEXT(pTextMacroTokens As %DynamicArray, pDomain As %String = "", Output pStatus, pLocalize As %Boolean = 0) as %String [ Language = objectscript ]
Extract the display header from the $$$TEXT macro. The parameter pLocalize allows the caller to request translation of the header string to the current locale. A default domain for this translation can be supplied via pDomain. When defined, this default is used if there is no domain explicitly declared as the second argument of $$$TEXT.
method %ProcessSelectItem(pSelectItemTokens As %DynamicArray, pHeaderPos, pDomain As %String = "", Output pSelectItemPair, pLocalize As %Boolean = 0) as %Status [ Language = objectscript ]
Reassemble the select Item in both the logical and display versions. The parameter pLocalize allows the caller to request translation of the header string to the current locale. A default domain for this translation can be supplied via pDomain. When defined, this default is used if there is no domain explicitly declared as the second argument of $$$TEXT.
private method %PushCurrentToken() as %Status [ Language = objectscript ]
private method %PushState() as %Status [ Language = objectscript ]
Push the current parser state to the stack and initialize a new state object
method %SetInput(pInput) as %Status [ Language = objectscript ]
Set the current input to be analyzed.
method %Tokenize() as %Status [ Language = objectscript ]
Walk through the string per character and tokenize.

Inherited Members

Inherited Methods (Including Private)

Feedback