|
Options |
Name |
Purpose |
|
|
|
CHARACTER AsClassName (integer)
|
Returns the class name named in a DEFINE AS clause
Notes : The type node nests under the AS node.
@param piHeadId The DEFINE head node id
@return The qualified class name, or the unknown value
*/
|
|
|
|
CHARACTER AsDataType (integer)
|
Returns the data type named in a DEFINE VARIABLE / PARAMETER AS clause
Notes : The data type nests under the AS node (AS > type).
@param piHeadId The DEFINE head node id
@return The data type text, or the empty string
*/
|
|
|
|
LOGICAL BufferHasField (integer, character)
|
Returns whether the table of a buffer holds a field matching an
unqualified (possibly abbreviated) name
Notes :
@param piBufferId The table-buffer symbol id
@param pcName The field name
@return Whether the buffer's table holds a matching field
*/
|
|
|
|
CHARACTER BuildDataTypeNumbers ()
|
Builds the parallel list of token type numbers of the data types
Notes : Resolved once in the constructor - the numbers depend on the
token table. Entry n corresponds to entry n of DataTypeNameList.
@return The comma separated list of token type numbers
*/
|
|
|
|
INTEGER CachedSchemaUnqualifiedFieldId (character)
|
Returns the schema field an unqualified name resolves to, caching
the (mostly negative) lookups of one parse
Notes : A class source repeats the same bare member names many times and
every one misses the whole-schema scan - the cache turns the
repeats into one indexed find (SCL-5619)
@param pcName The referenced (possibly abbreviated) field name
@return The schema field id, or 0 when no schema table holds the field
*/
|
|
|
|
CHARACTER DataTypeNameList ()
|
Returns the canonical data type names the reference engine reports
Notes : The progress names of org.prorefactor.treeparser.DataType, in the
order their token type names appear in BuildDataTypeNumbers. Most
equal their token type name; COM-HANDLE, DATETIME-TZ,
UNSIGNED-SHORT and WIDGET-HANDLE are hyphenated (SCL-5518).
@return The comma separated list of canonical names
*/
|
|
|
|
INTEGER DefaultFrameFor (integer, integer, integer)
|
Returns the default frame of the block a statement belongs to
Notes : Walks the enclosing block headers like the reference engine's
Block.getDefaultFrame (): an explicit default frame of a DO /
FOR / REPEAT header wins; a REPEAT / FOR block without one, or
the scope's root block, ends the search and is the frame
scoping node a new unnamed frame belongs to (SCL-5739)
@param piHeadId The statement head node id
@param piScopeId The current scope id
@param piScopeNodeId OUTPUT The frame scoping node of the statement
@return The default frame symbol id, or 0 when the block has none yet
*/
|
|
|
|
INTEGER DefaultFrameOf (integer)
|
Returns the registered default frame of a frame scoping node
Notes :
@param piScopeNodeId The frame scoping node id
@return The default frame symbol id, or 0
*/
|
|
|
|
INTEGER DefineObjectType (integer)
|
Returns the DEFINE object-type keyword child type of a DEFINE head
Notes : Scans direct children for the first recognised object-type keyword.
@param piHeadId The DEFINE head node id
@return The object-type keyword type number, or 0
*/
|
|
|
|
INTEGER ExtentValue (integer)
|
Returns the EXTENT dimension named in a DEFINE head, or 0
Notes : The dimension NUMBER nests under the EXTENT node. An EXTENT
clause without a dimension (an indeterminate array) reports -1,
as the reference engine does (SCL-5482).
@param piHeadId The DEFINE head node id
@return The extent value, -1 for an indeterminate extent, or 0
*/
|
|
|
|
INTEGER FindOrCreateFrame (integer, character)
|
Returns the frame symbol of a name in a scope, creating it when
it has not been defined
Notes : The reference engine's FrameStack.frameRefSet () creates a frame
on its first reference the same way (SCL-3077)
@param piScopeId The current scope id
@param pcName The frame name
@return The frame symbol id
*/
|
|
|
|
INTEGER FrameScopeNodeFor (integer, integer)
|
Returns the frame scoping node of a statement
Notes : The nearest enclosing REPEAT / FOR block header, or the scope's
root node when there is none - the reference engine's
Block.canScopeFrame () chain; a DO block does not scope frames
(SCL-5739)
@param piHeadId The statement head node id
@param piScopeId The current scope id
@return The frame scoping node id
*/
|
|
|
|
INTEGER FrameWidgetNameNode (integer)
|
Returns the name node of the FRAME widget reference of a CLEAR /
VIEW statement
Notes : The widget reference is a Widget_ref with the FRAME keyword and
the name (SCL-5562); the name is accepted as a sibling of the
FRAME node or nested under it
@param piHeadId The statement head node id
@return The name node id, or 0 when the statement references no frame
*/
|
|
|
|
INTEGER GetOrCreateFieldBuffer (integer, character, integer)
|
Returns (creating on first use) the field buffer of a table buffer
for a field name
Notes : Resolves the field against the schema (for a database-table buffer)
so the field buffer carries its data type / IField.
@param piBufferId The table-buffer symbol id
@param pcFieldName The field name
@param piScopeId The current scope id
@return The field-buffer symbol id, or 0
*/
|
|
|
|
INTEGER GetSuperScope (character)
|
Returns (parsing and caching on first use) the skeleton scope
chain of a super class, materialized in the current store
Notes : A super class that does not resolve to a .cls on the PROPATH
(Progress.Lang.*, vendor libraries) or cannot be parsed chains
nothing, like the Java parseSuper / classStateSuper. The parse
result is kept in the bounded session SuperScopeCache; the
cycle guard breaks a circular INHERITS chain.
@param pcQualifiedName The qualified super class name
@return The scope id of the super scope in the current store, or 0
*/
|
|
|
|
LOGICAL IsFrameInitStatement (integer)
|
Returns whether a statement head type initializes a frame
Notes : The frame initializing statements of the reference engine's tree
parser (frameInitializingStatement / frameEnablingStatement):
CHOOSE, COLOR, DISPLAY, FORM, INSERT, SCROLL, SET, UNDERLINE,
UP, DISABLE, DOWN, ENABLE, PROMPT-FOR and UPDATE - plus the
embedded SQL SELECT, which the reference engine behind the
IKVM assemblies initializes a frame for (SCL-5739)
@param piType The statement head node type
@return Logical value indicating whether the statement initializes a frame
*/
|
|
|
|
LOGICAL IsRoutineType (integer)
|
Returns whether a node type opens a routine (symbol) scope
Notes :
@param piType The node type
@return Logical value
*/
|
|
|
|
CHARACTER LikeDataType (integer, integer, integer)
|
Returns the data type of the field a LIKE clause references,
resolving the reference on the way
Notes : The reference engine resolves the LIKE target as a Field_ref
through the same lookup as any other field reference (a buffer
scoped in an enclosing block first for an unqualified name)
and copies its data type to the defined symbol (SCL-5747). The
resolved symbol is linked to the Field_ref node.
@param piNodeId The node holding the LIKE clause (a DEFINE head or a Parameter_list mode node)
@param piScopeId The current scope id
@param piBlockId The current block id
@return The data type of the referenced field, or the empty string
*/
|
|
|
|
LinkBufferScope (integer, integer, integer)
|
Links the buffer scope of a table buffer in a block to a
reference node, creating the scope on first use
Notes : A buffer has one scope per block - a repeated reference in the
same block reuses it, so IBufferScope:Symbol / :Block report the
same shape as the reference engine (SCL-5480).
@param piNodeId The reference node id (RECORD_NAME or Field_ref)
@param piBlockId The current block id
@param piBufferId The table-buffer symbol id
*/
|
|
|
|
LinkSymbolNodes (integer, integer)
|
Links a symbol's AS / LIKE nodes from its DEFINE head
Notes :
@param piSymbolId The symbol id
@param piHeadId The DEFINE head node id
*/
|
|
|
|
INTEGER NameNodeAfter (integer, integer)
|
Returns the first ID child that follows a given object-type keyword
child (the defined name)
Notes :
@param piHeadId The DEFINE head node id
@param piAfterType The object-type keyword type to search past
@return The name node id, or 0
*/
|
|
|
|
CHARACTER NormalizedClassName (integer)
|
Returns the class name a type node stands for, as the reference
engine reports it
Notes : The qualified type name for an object typed variable, and the
unknown value - not the empty string - for a primitive one, so
that a consumer testing the class name against ? behaves the same
on both engines (SCL-5471). The name as written resolves against
the USING statements and the PROPATH (SCL-5482); an unresolvable
name is reported as written, like the Java
ClassSupport:qualifiedClassName.
@param piTypeNodeId The node id of the type named after AS
@return The qualified class name, or the unknown value
*/
|
|
|
|
CHARACTER NormalizedDataType (integer)
|
Returns the data type a type node stands for, as the reference
engine reports it
Notes : The reference reports an object typed variable as the data type
CLASS, with the qualified type name carried separately in
ClassName (SCL-5471). For a primitive it reports the CANONICAL
data type name, taken from the type node's token type -
DataType:getDataType (typeNode.getType ()) in TP01Support - not
from the source text, so an abbreviated keyword is reported in
full: AS CHAR yields CHARACTER and AS WIDGET yields
WIDGET-HANDLE (SCL-5518). A type node whose token type is not a
data type falls back to its upper cased text.
@param piTypeNodeId The node id of the type named after AS
@return The data type, or the empty string when there is no type node
*/
|
|
|
|
INTEGER Parse (NodeStore, integer)
|
Builds the symbol model over an already-parsed record AST
Notes : Creates a fresh SymbolStore, walks the tree from the Program_root,
and links the symbol model back to the node store so INode:Symbol /
:Call / :FieldContainer resolve.
@param poNodes The record AST (as produced by AblParser)
@param piRootNodeId The Program_root node id
@return The root symbol scope id
*/
|
|
|
|
INTEGER ParseSource (longchar, character)
|
Lexes, parses and tree-parses an in-memory source string
Notes : Convenience for callers / tests: runs the statement framer
(AblParser) then the symbol resolution over its record AST.
@param plcSource The source code
@param pcFileName The (nominal) file name for position reporting
@return The root symbol scope id
*/
|
|
|
|
ProcessAggregatePhrase (integer, integer)
|
Declares the implicit variables of an aggregate phrase
Notes : The reference tree parser (enterAggregateOption) defines one
variable per accumulate option of the phrase, named after the
lower case full keyword text of the option (sub-total, count,
maximum - whatever abbreviation the source wrote), in the
current scope - an INTEGER for COUNT, a DECIMAL for the other
accumulate keywords. The option's keyword node is the defining
node of the symbol (SCL-5788).
@param piNodeId The Aggregate_phrase node id
@param piScopeId The current scope id
*/
|
|
|
|
ProcessCanFind (integer, integer, integer)
|
Processes a CAN-FIND function - a scope of its own
Notes : Like the Java canFindBegin / canFindEnd, a CAN-FIND opens a
scope (with a root block) below the current one and defines the
buffer for its record there: a named source buffer is copied as
a named buffer of the can-find scope; a default temp-table /
work-table reference gets its own default buffer in the
can-find scope - every CAN-FIND creates one, so the routine's
(root) default buffer is not scoped up by the CAN-FIND
(SCL-5552); a schema-table reference resolves through the
generic path and stays invisible in the scope's buffer list
(SCL-5482).
@param piNodeId The CANFIND node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessClassStatement (integer, integer)
|
Processes a CLASS statement head - the super-class scope chain
Notes : Names the root scope after the class; when the INHERITS type
name qualifies to a class on the PROPATH, that class is parsed
(through the bounded SuperScopeCache) and its skeleton scope
chain becomes the parent of the compile unit's root scope, like
the Java TP01Support classState / classStateInherits. The root
scope's depth and its root block's program / method flags follow
from the chained parent.
@param piHeadId The CLASS statement head node id
@param piScopeId The current (root) scope id
*/
|
|
|
|
ProcessDataRelation (integer, integer, integer)
|
Processes a DATA-RELATION clause of a DEFINE DATASET, resolving
its FOR record pair and its RELATION-FIELDS field pairs
Notes : The first field of each RELATION-FIELDS pair resolves against the
parent record, the second against the child record - the
reference tree parser's field_mapping_phrase resolves fld2
(prevTableReferenced = the parent) before fld1
(lastTableReferenced = the child) per pair (SCL-5619)
@param piRelId The DATA-RELATION node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefBuffer (integer, integer, integer)
|
Processes a DEFINE BUFFER statement (also a BUFFER parameter)
Notes : Creates a named table buffer resolved (through its FOR RECORD_NAME)
against the schema, links the buffer name node, and creates a buffer
scope; the source RECORD_NAME is resolved through the generic path.
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefDataset (integer, integer, integer)
|
Processes a DEFINE DATASET statement, resolving its record and
field references
Notes : The FOR record list resolves through the generic record-reference
path (the reference engine's tbl[CQ.INIT] action); each
DATA-RELATION clause resolves its own FOR record pair and the
RELATION-FIELDS field pairs (SCL-5619)
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefEvent (integer, integer, integer)
|
Processes a DEFINE EVENT statement
Notes : The parameters declared in the event's SIGNATURE become variables
of the DECLARING scope - the reference engine does not open a
child scope for an event signature, unlike a method (SCL-5473).
The Parameter_list hangs off the SIGNATURE node, not off the
DEFINE head, so the signature node is what is handed to the
shared parameter walk.
@param piHeadId The DEFINE head node id
@param piScopeId The current (declaring) scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefFrame (integer, integer)
|
Processes a DEFINE FRAME statement
Notes : Creates a FRAME symbol and links the frame name node.
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
*/
|
|
|
|
ProcessDefine (integer, integer, integer)
|
Processes a DEFINE statement head, creating the defined symbol
Notes : Dispatches on the object-type keyword child (VARIABLE / BUFFER /
TEMP-TABLE / WORK-TABLE / FRAME / PARAMETER / PROPERTY).
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefParameter (integer, integer, integer)
|
Processes a DEFINE PARAMETER statement
Notes : A scalar parameter creates a VARIABLE symbol; a BUFFER parameter
creates a table buffer; TABLE / DATASET parameter references are
resolved through their RECORD_NAME children by the generic walk.
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefProperty (integer, integer, integer)
|
Processes a DEFINE PROPERTY statement
Notes : Creates a VARIABLE symbol for the property and walks the getter /
setter accessor bodies in the declaring scope - the reference
engine does not open a scope for a property accessor (its
defineproperty_accessor rule runs the code block in the current
scope, SCL-5482).
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefRecordList (integer, integer, integer)
|
Processes a DEFINE QUERY / DATA-SOURCE statement, resolving the
record references of its FOR list
Notes : Each RECORD_NAME child resolves through the generic
record-reference path - a named buffer defined earlier wins, a
schema table falls back to its default buffer (SCL-5619). The
query name of the DATA-SOURCE FOR QUERY form is a plain
identifier and resolves nothing.
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefTempTable (integer, integer, integer)
|
Processes a DEFINE TEMP-TABLE / WORK-TABLE statement
Notes : Creates a store-local table and its default (unnamed) buffer, and
links the table name node to the default buffer symbol. A
BEFORE-TABLE clause adds a second, NON-default buffer on the same
table (SCL-5520). The table and its default buffer always belong
to the ROOT scope, no matter where the DEFINE appears - the
reference's defineTable calls rootScope.defineTable - while the
before-table buffer stays in the scope of the DEFINE, whose
defineBuffer uses currentScope (SCL-5529).
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piStoreType The StoreTypeEnum value (TTABLE / WTABLE)
*/
|
|
|
|
ProcessDefVariable (integer, integer, integer)
|
Processes a DEFINE VARIABLE statement
Notes : Creates a VARIABLE symbol and links the variable name node to it.
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ProcessDefWidget (integer, integer, integer)
|
Processes a DEFINE statement declaring a field-level widget
(DEFINE BUTTON)
Notes : Creates a widget symbol - it participates in a frame's
AllFieldsAndWidgets collection but is not a field (SCL-3077)
@param piHeadId The DEFINE head node id
@param piScopeId The current scope id
@param piObjType The widget-kind keyword type (BUTTON, ...)
*/
|
|
|
|
ProcessFrameFields (integer, integer)
|
Registers the form items of a statement head with its frame's
field container
Notes : Runs after the statement subtree is resolved. Each Form_item's
Field_ref supplies the registered symbol - a resolved variable /
field buffer as a field, a widget (DEFINE BUTTON) via a widget
symbol lookup. An enabling statement (ENABLE / UPDATE / SET /
PROMPT-FOR) marks its fields enabled, mirroring the reference
engine's frame stack (SCL-3077).
@param piHeadId The statement head node id
@param piScopeId The current scope id
*/
|
|
|
|
ProcessRelationFields (integer, integer, integer, integer)
|
Processes a RELATION-FIELDS clause, resolving each field pair
against the parent and child record buffers of its DATA-RELATION
Notes : The field names are unqualified, so the buffer is dictated by the
pair position rather than looked up - exactly the reference
engine's whichTable resolution (SCL-5619). An unresolved record
leaves the fields of its position unresolved.
@param piRelFieldsId The RELATION-FIELDS node id
@param piParentRecId The parent RECORD_NAME node id (0 when absent)
@param piChildRecId The child RECORD_NAME node id (0 when absent)
@param piScopeId The current scope id
*/
|
|
|
|
ProcessRoutineParameters (integer, integer, integer)
|
Creates the parameter variables of a routine scope from the
routine head's Parameter_list
Notes : Each mode node (INPUT / OUTPUT / INPUT-OUTPUT) defines one
variable: its first ID child is the name, the node following the
AS child names the data type (the Parameter_list AS clause is
flat). The name node is linked to the created symbol so later
body references resolve to it.
@param piHeadId The routine statement head node id
@param piScopeId The routine's (child) scope id
@param piBlockId The routine's (child) block id
*/
|
|
|
|
ProcessRun (integer, integer)
|
Processes a RUN statement, creating a call linked to the head node
Notes : The first natural child is the target; PERSISTENT / IN handle
options are read from the flat children.
@param piHeadId The RUN head node id
@param piScopeId The current scope id
*/
|
|
|
|
ProcessRunParameters (integer, integer)
|
Models the parameters of a RUN call from its Parameter_list
Notes : Each INPUT / OUTPUT / INPUT-OUTPUT mode node becomes an
IParameter whose DirectionNode is the mode node and whose Symbol
is the resolved argument reference (the mode's Field_ref /
RECORD_NAME child - already resolved by the preceding child
walk); an expression argument carries no symbol.
@param piHeadId The RUN head node id
@param piCallId The call id
*/
|
|
|
|
ProcessRunPersistentSet (integer, character, integer)
|
Links the procedure of a RUN ... PERSISTENT SET to its handle variable
Notes : Shape: RUN > { FILENAME, PERSISTENT > SET > Field_ref > ID }.
The variable the handle is assigned to then reports an IRunHandle
as its IVariable:Value, naming the procedure it was set to. The
call itself records the handle reference node and the handle
variable symbol, backing ICall:PersistentHandleNode and
ICall:PersistentHandleVariable (SCL-3077).
@param piHeadId The RUN statement head node id
@param pcExternal The external procedure name the RUN targets
@param piCallId The call id created for the RUN statement
*/
|
|
|
|
ProcessTableFields (integer, integer)
|
Enumerates the FIELD clauses of a DEFINE TEMP-TABLE / WORK-TABLE
statement into its store-local table
Notes : Each FIELD clause node holds the field name (its first ID child)
and the data type nested under its AS child, so ITable:Fields
returns the fields like the ProparseDotNet engine.
@param piHeadId The DEFINE head node id
@param piStoreTableId The store table id
*/
|
|
|
|
ProcessTriggerOldValue (integer, integer, integer, logical)
|
Declares the OLD [VALUE] variable of an ASSIGN trigger - an ON
ASSIGN OF field block or a TRIGGER PROCEDURE FOR ASSIGN OF
field statement - with the data type of the trigger field
Notes : The reference's trigger_on / triggerprocedurestate rules
resolve the field as a Field_ref and declare the variable in
the trigger's scope like a LIKE field definition (SCL-5765).
The buffer names of NEW / OLD BUFFER options of the other
database events are not variables and are left alone.
The NEW / OLD [BUFFER] names of the other database events
are named buffers of the trigger scope on the trigger's table.
@param piHeadId The ON / TRIGGER statement head node id
@param piScopeId The scope the variable is declared in
@param piBlockId The block of that scope
@param plFieldType Whether the OLD variable takes the field's data type (an ON block) or none (a TRIGGER PROCEDURE)
*/
|
|
|
|
ProcessUsing (integer)
|
Registers a USING statement with the class finder
Notes : Every USING is registered, including FROM ASSEMBLY, like the
Java usingState - an assembly name simply never resolves to a
.cls on the PROPATH.
@param piHeadId The USING statement head node id
*/
|
|
|
|
ProcessVarStatement (integer, integer)
|
Processes a VAR statement (the inline variable declaration)
Notes : One VAR statement declares one or more variables of the same
type: "var integer n, m." or "var char c1, c2 = "x":u.". The
data type is the first type node under the head; every direct ID
child is a declared name. The EQUAL initializer subtree is
skipped - its own references are resolved by the generic walk.
@param piHeadId The VAR statement head node id
@param piScopeId The current scope id
*/
|
|
|
|
CHARACTER PropertyClassName (integer)
|
Returns the class name named in a DEFINE PROPERTY AS clause
Notes : For a property the type node is a sibling of the AS node (flat).
@param piHeadId The DEFINE head node id
@return The qualified class name, or the unknown value
*/
|
|
|
|
CHARACTER PropertyDataType (integer)
|
Returns the data type named in a DEFINE PROPERTY AS clause
Notes : For a property the data type is a sibling of the AS node (flat).
@param piHeadId The DEFINE head node id
@return The data type text, or the empty string
*/
|
|
|
|
RegisterDefaultFrame (integer, integer)
|
Registers the default frame of a frame scoping node
Notes : A later registration replaces the earlier one, like a second
DO WITH FRAME on the same block would in the reference engine
@param piScopeNodeId The frame scoping node id
@param piFrameId The frame symbol id
*/
|
|
|
|
ResolveFieldContainer (integer, integer, integer)
|
Resolves the frame (field container) of a statement head
Notes : Mirrors the reference engine's frame stack (SCL-3077, SCL-5739):
*
- a DO / FOR / REPEAT header WITH FRAME name scopes the named
frame to that block and makes it the block's default frame
(FrameStack.nodeOfBlock)
- a frame initializing statement (DISPLAY, UPDATE, SET, ...)
WITH FRAME name initializes the named frame - its first use
scopes it to the nearest REPEAT / FOR block or the scope's root
block (FrameStack.nodeOfInitializingStatement)
- a frame initializing statement without WITH FRAME / BROWSE
uses the block's default frame, creating the implicit unnamed
frame of the nearest frame scoping block on its first use
- CLEAR FRAME name and VIEW FRAME name initialize the named
frame (FrameStack.simpleFrameInitStatement)
- any other statement head WITH FRAME name links the frame as
its field container without initializing it
*
A frame that has not been defined by a DEFINE FRAME statement is
created on its first reference.
@param piHeadId The statement head node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ResolveFieldRef (integer, integer, integer)
|
Resolves a Field_ref node to a variable or a buffer field, and links it
Notes : An unqualified name resolves to a variable in scope; a qualified
"buffer.field" name resolves to (and, on first use, creates) a field
buffer of the named buffer. Unqualified field references cannot be
disambiguated without the active buffer set and are left unlinked in
this stage.
@param piNodeId The Field_ref node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ResolveRecordName (integer, integer, integer)
|
Resolves a RECORD_NAME node to a table buffer and links it
Notes : A named buffer defined earlier wins; otherwise a schema table
resolves to a shared default schema buffer (created on first use);
otherwise a store-local (temp-table) default buffer of the same name
is used. The buffer scope of the reference is linked to the node
(SCL-5480) and the reference is counted on the buffer symbol.
@param piNodeId The RECORD_NAME node id
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
ResolveTable (character, integer, integer, integer, integer)
|
Resolves a table name to its schema / store table id
Notes : Sets piKind to TableKindSchema (with piTableId) for a connected
database table, TableKindStore (with piStoreId) for a store-local
temp-table found by name, or TableKindNone when unresolved.
@param pcName The table name
@param piScopeId The current scope id
@param piKind The resolved table kind (output)
@param piTableId The schema table id (output)
@param piStoreId The store table id (output)
*/
|
|
|
|
ResolveUnqualifiedField (integer, integer, character, integer, integer)
|
Resolves an unqualified Field_ref that matched no variable to a
field of a table, and links it
Notes : Mirrors the reference engine's Block.lookupField fallback chain
for unqualified names: a buffer scoped in the nearest enclosing
blocks first, then any temp / work table, then any schema table
(resolved by name prefix, so an abbreviated field name matches).
The name is left unresolved when no table holds a matching
field - a bare class-member reference typically ends up here
(SCL-5619).
@param piNodeId The Field_ref node id
@param piIdNodeId The ID child node id
@param pcName The referenced (possibly abbreviated) field name
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|
|
|
|
CHARACTER RoutineName (integer)
|
Returns a routine's name for the scope (first ID child), or the
empty string
Notes : Informational only.
@param piHeadId The routine statement head node id
@return The routine name
*/
|
|
|
|
INTEGER SchemaDefaultBuffer (character, integer)
|
Returns (creating on first use) the shared default schema buffer for
a schema table name, or 0 when the name is not a schema table
Notes :
@param pcName The schema table name
@param piScopeId The current scope id
@return The table-buffer symbol id, or 0
*/
|
|
|
|
CHARACTER StripQuotes (character)
|
Strips surrounding quotes from a literal token text
Notes :
@param pcText The token text
@return The unquoted text
*/
|
|
|
|
INTEGER UnqualifiedFieldBufferSource (character, integer, integer)
|
Returns the table buffer an unqualified field name resolves
against
Notes : The reference engine's lookup order: per enclosing block (inner
to outer) the buffers scoped in that block, where a named buffer
or temp / work table beats a default schema buffer
(Block.lookupUnqualifiedField); then the default buffer of any
temp / work table (SymbolScopeRoot.lookupUnqualifiedField); then
the default buffer of the first schema table holding a matching
field (Schema.lookupUnqualifiedField). The strong / weak buffer
scope raising rules of the reference are not modelled - none of
the parity fixtures distinguishes them (SCL-5619).
@param pcName The referenced (possibly abbreviated) field name
@param piScopeId The current scope id
@param piBlockId The current block id
@return The table-buffer symbol id, or 0 when nothing matches
*/
|
|
|
|
WalkSubtree (integer, integer, integer)
|
Walks a subtree, building scopes / blocks / symbols and resolving
references, carrying the current scope and block
Notes : A routine head opens a child scope + method block for its body; a
DEFINE statement head is dispatched to its own handler; a RECORD_NAME
/ Field_ref node is resolved; every other node descends into its
children within the current scope / block.
@param piNodeId The node id to visit
@param piScopeId The current scope id
@param piBlockId The current block id
*/
|