|
Options |
Name |
Purpose |
|
|
|
INTEGER AbbreviatedDataType (integer, character)
|
Returns the canonical data type an abbreviated data type keyword
stands for at a type position, or 0 when the token names a class
Notes : Mirrors the reference grammar's datatype_var, which re-types the
keywords IN_KW / LOG / ROW / WIDGET and resolves the remaining
abbreviations through ParserSupport:abbrevDatatype - the ones the
lexer left as plain ID tokens because they are shorter than the
keyword table's minimum abbreviation (SCL-5518). Only the ROW
form needs its own case: the text rules below already cover IN,
LOG and WIDGET.
*
A qualified class name reaches this method as one ID token
("da.project.ClassName"), so it matches none of the rules and
stays a TYPE_NAME - the ambiguity the reference grammar guards
with its type_name_predicate.
@param piType The token type at the type position
@param pcText The token text
@return The canonical data type token type, or 0
*/
|
|
|
|
AppendTypeArguments (integer)
|
Appends an immediately adjacent type-argument / array suffix
(<...> / [...]) of a bound generic type to a TYPE_NAME node
Notes : Mirrors the reference grammar's type_name2 rule, which appends
adjacent type_name_part tokens (no hidden token in between;
LEFTBRACE / RIGHTBRACE / LEFTANGLE / RIGHTANGLE explicitly
allowed for generics and .NET arrays) to the TYPE_NAME token
text - a bound generic type (Foo<Bar>) is ONE TYPE_NAME node.
The merge deliberately starts only at a LEFTANGLE / LEFTBRACE
directly behind the base name and ends when the bracket depth
returns to zero (unless another suffix follows directly), at a
hidden token, or at one of the tokens non_punctuating excludes
(PERIOD / LEXCOLON / LEFTPAREN) (SCL-5563).
@param piNodeId The TYPE_NAME node id
*/
|
|
|
|
CHARACTER BuildDllTypeList ()
|
Builds the comma separated list of the DLL data type token
types accepted by a parameter definition (BYTE, SHORT, LONG,
UNSIGNED-BYTE, UNSIGNED-SHORT, FLOAT, DOUBLE)
Notes : The reference datatype_dll rule; the intrinsic types shared
with it (CHARACTER, INTEGER, INT64, MEMPTR) are in the
intrinsic list already (SCL-5779)
@return The list of token type numbers
*/
|
|
|
|
CHARACTER BuildIntrinsicTypeList ()
|
Builds the comma separated list of intrinsic data type token types
Notes : Resolved once in the constructor - the numbers depend on the
token table.
@return The list of token type numbers
*/
|
|
|
|
BuildState2Map ()
|
Builds the (head token, state2 token) lookup consulted by
ResolveState2
Notes : The reference grammar marks a statement head with
sthd (##, state2), where state2 is the statement sub-type
discriminator. For every family below, the state2 value is the
statement's second natural token, so a single pair lookup
resolves it. Generated from the SCL-5526 grammar specification
fixture (GrammarSpec/proparse-grammar-spec.csv, column state2).
*
Deliberately NOT in this table (see ResolveState2):
- DEFINE, whose object type is preceded by modifiers and is
therefore resolved in ParseDefineBody
- CREATE, which needs the automation-object / widget forms
- AATRACE, whose CLOSE may be preceded by a stream name
(SCL-5532)
*/
|
|
|
|
INTEGER ConsumeAs (integer, integer, integer)
|
Creates a node for the current natural token but with an
overriding (canonical) node type and subtype, keeping the token
text, and advances
Notes : Used for tokens that the AST re-types (an ID that is a table
reference becomes RECORD_NAME, a class name becomes TYPE_NAME).
@param piParentId The parent node id
@param piNodeType The canonical node type to assign
@param piSubType The node subtype kind
@return The new node id, or 0 at end of the stream
*/
|
|
|
|
ConsumeDataType (integer)
|
Consumes a data type after AS (an intrinsic type keyword, or a
class type name re-typed to TYPE_NAME) as a child of a target
Notes : Handles an optional leading CLASS keyword. An identifier data
type (a class name, which the lexer keeps as a single ID token)
is re-typed to TYPE_NAME to match Proparse; an intrinsic type
keyword (INTEGER / CHARACTER / HANDLE / ...) keeps its type. An
abbreviation the keyword table did not already fold into its
canonical keyword resolves to that keyword's type (SCL-5518).
@param piTargetId The node the data type is added under
*/
|
|
|
|
INTEGER ConsumeDotComment (integer)
|
Consumes an ABL dot comment as a single DOT_COMMENT node
Notes : A period where a statement would fit turns what follows into a
comment. The reference grammar collapses the whole run into ONE
node: the leading NAMEDOT is re-typed to DOT_COMMENT and every
following token up to AND INCLUDING the statement end is
excluded from the tree (the "!" operator), its text - plus the
hidden text in between - concatenated onto that node.
*
Because a dot comment has no terminator of its own it runs to
the next PERIOD in the source, which can swallow a following
statement whole. That is the reference behaviour, not a defect.
*
Every token is walked raw here rather than through ConsumeInto:
the hidden tokens ARE the whitespace and comments the reference
picks up via allLeadingHiddenText (), so concatenating the text
of hidden and natural tokens alike reproduces its node text
exactly. The rule calls no sthd (), so the node is not marked as
a statement head (SCL-5536).
@param piParentId The parent node id
@return The DOT_COMMENT node id
*/
|
|
|
|
INTEGER ConsumeFilename (integer)
|
Consumes a filename position: the current token plus any
immediately adjacent continuation tokens, merged into a single
FILENAME node
Notes : Mirrors the reference grammar's filename rule: filename_part
tokens are appended as long as no hidden token separates them
(!support.hasHiddenBefore) and the token is none of EOF /
PERIOD / LEXCOLON / RIGHTANGLE / LEFTANGLE / LEFTPAREN /
LEFTCURLY - so RUN adecomm/_pwemdrp.p yields one FILENAME
'adecomm/_pwemdrp.p' (SCL-5530). A LEFTCURLY never reaches
this parser (the preprocessor consumes include references).
@param piParentId The parent node id
@return The FILENAME node id, or 0 at end of the stream
*/
|
|
|
|
INTEGER ConsumeInto (integer)
|
Creates a node for the current natural token as a child of a
parent, attaches any pending leading hidden text, and advances
Notes : Assumes the cursor is positioned on a natural token (the caller
has probed it via CurrentType).
@param piParentId The parent node id
@return The new node id, or 0 at end of the stream
*/
|
|
|
|
INTEGER ConsumeName (integer)
|
Consumes the current natural token as a name (re-typed to ID) as
a child of a parent, and advances
Notes : Used at name positions (a variable / property / field / method
name), where an unreserved keyword serves as an identifier and
the .NET engine produces an ID node.
@param piParentId The parent node id
@return The new node id, or 0 at end of the stream
*/
|
|
|
|
LOGICAL ConsumeNotCaseSensitive (integer)
|
Consumes a NOT CASE-SENSITIVE option pair as a Not_casesens node
Notes : The reference grammar wraps the negated form in a synthetic
Not_casesens (NOT is an operator and cannot serve as the root).
A plain CASE-SENSITIVE stays a flat keyword and is not handled
here (SCL-5539).
@param piParentId The definition node the option belongs to
@return TRUE when a NOT CASE-SENSITIVE pair was consumed
*/
|
|
|
|
ConsumePeriod (integer)
|
Consumes a terminating PERIOD (when present) as a child of a node
Notes :
@param piParentId The parent node id
*/
|
|
|
|
INTEGER ConsumeProparseDirective (integer)
|
Consumes a proparse directive token as its own statement-level
node
Notes : The reference makes the node text empty and moves the directive
body to the proparsedirective attribute; here the body is
carried as the node's source text (never written by the source
writer for an empty-text node) and IProparseDirectiveNode:
DirectiveText reads it. The raw directive additionally stays a
hidden segment of its own node, so the source writer keeps
emitting it verbatim in source mode (SCL-5489).
@param piParentId The parent node id (a Code_block)
@return The new node id
*/
|
|
|
|
INTEGER CreateStructural (integer, integer, integer)
|
Creates a synthetic structural node (no source token) as a child
of a parent
Notes : Used for the Proparse structural nodes Field_ref / Form_item /
Property_getter / Property_setter / Parameter_list / With_down.
@param piParentId The parent node id
@param piNodeType The node type
@param piSubType The node subtype kind
@return The new node id
*/
|
|
|
|
CHARACTER CurrentText ()
|
Returns the text of the current natural token
Notes : Positions on the next natural token first.
@return The token text, or the empty string at end of the stream
*/
|
|
|
|
CHARACTER CurrentTokenText ()
|
Returns the text of the current natural token without moving the cursor
Notes :
@return The token text, or the empty string at end of the stream
*/
|
|
|
|
INTEGER CurrentType ()
|
Returns the type of the current natural token (skipping hidden)
Notes :
@return The token type, or 0 at end of the stream
*/
|
|
|
|
FlushHidden (integer)
|
Attaches the pending leading hidden segments to a node
Notes : Delegates to the node store, whose pending queue is shared with
the expression parser (SCL-5479)
@param piNodeId The node id
*/
|
|
|
|
LOGICAL IsAggregatePhraseStart ()
|
Returns whether the cursor sits on a DISPLAY-item aggregate
phrase - "( <accumulate keyword> ..." where the accumulate
keyword cannot start an ordinary expression
Notes : The reference grammar predicates the phrase at the display_item
level because "(sub-average + i)" could equally be a
parenthesised expression over a variable named sub-average. The
aggregate path is only taken when the token after the
accumulate keyword cannot continue an expression: a label
constant, BY, another accumulate keyword, or the closing
parenthesis (SCL-5540).
@return TRUE when an aggregate phrase starts at the cursor
*/
|
|
|
|
LOGICAL IsAssignablePseudoFunction (integer)
|
Returns whether a token type is an assignable pseudo-function
Notes : The reference grammar's pseudfn set (EXTENT / SUBSTRING /
OVERLAY / ENTRY / the memptr accessors / CURRENT-VALUE / ...):
a statement headed by one of these is an assignment that the
reference wraps in a synthetic ASSIGN head (SCL-5469).
@param piType The token type to test
@return True when the token type is an assignable pseudo-function
*/
|
|
|
|
LOGICAL IsAssignmentOperator (integer)
|
Returns whether a token type is an assignment operator
Notes : The plain "=" and the four compound operators ("+=", "-=", "*=",
"/="). All of them head an ASSIGN statement and own the assigned
reference and the right-hand expression as their two children.
@param piType The token type to test
@return True when the token type is an assignment operator
*/
|
|
|
|
LOGICAL IsBlockHeadType (integer)
|
Returns whether a statement head of this type opens a block
Notes : Determined by measurement against the reference engine, which
gives exactly these heads the BlockNode subtype across the whole
parity fixture set (SCL-5475). Notably CLASS, INTERFACE, ENUM,
CATCH and FINALLY are NOT block nodes, and neither is the
Code_block underneath a block head.
@param piType The statement head token type
@return True when the head owns a block
*/
|
|
|
|
LOGICAL IsColumnFormatToken (integer)
|
Returns whether a token type starts a browse column format option
Notes : The first tokens of the reference columnformat_opt rule: FORMAT,
LABEL / COLUMN-LABEL, NO-LABELS, the HEIGHT / WIDTH dimension
options, the column / label font and color options and the
"@ <base-field>" LEXAT (SCL-5786)
@param piType The token type to test
@return Logical value
*/
|
|
|
|
LOGICAL IsDatabaseEventToken (integer)
|
Returns whether a token is a database event in an ON statement
Notes : ASSIGN is deliberately absent - ON ASSIGN OF names a field, and
the reference engine does not make it a RECORD_NAME
@param piType The token type to test
@return TRUE when the token is a database event
*/
|
|
|
|
LOGICAL IsDefineType (integer)
|
Returns whether a token type is a DEFINE object-type keyword
Notes :
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsFilenameStart (integer)
|
Returns whether the current token can start a file name in a
file name position - anything but the end of the statement,
a VALUE ( ) and the PRINTER / TERMINAL / OS-DIR keywords
Notes : SCL-5760
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsFormatOptionToken (integer)
|
Returns whether a token type starts a format phrase option
Notes : The phrase runs until a token that cannot start an option - the
next form item's field name, a COMMA, the WITH clause or the
terminating PERIOD. Only the options whose nesting was verified
against the reference engine are listed; anything else ends the
phrase and is framed by the caller. WHEN (when_exp) and
COLUMN-LABEL (label_constant) are format options of the
reference format_opt rule like LABEL (SCL-5787).
@param piType The token type to test
@return Logical value
*/
|
|
|
|
LOGICAL IsHidden (integer)
|
Returns whether a token type is hidden (skipped, its text kept as
leading hidden text of the next natural node)
Notes : Besides whitespace / comments and the include / macro reference
markers, the surviving preprocessor directive tokens
(&GLOBAL-DEFINE / &SCOPED-DEFINE / &UNDEFINE / &ANALYZE-SUSPEND /
&ANALYZE-RESUME / &MESSAGE) are hidden: they were already
applied to the preprocessor by the lexer, carry no statement
semantics and - having no period terminator - would otherwise be
mis-framed as a statement head that swallows the following
tokens. (&IF / &THEN / &ELSEIF / &ELSE / &ENDIF are already
resolved and removed by the folded lexer's postlexer.) A
{&_proparse_ ...} directive is NOT hidden - it becomes its own
statement-level node, as in the reference (SCL-5489).
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsIdentifierToken (integer)
|
Returns whether a token type may serve as an identifier
Notes : An ID, or an unreserved keyword (the Proparse grammar's
unreservedkeyword rule) - such a token is re-typed to ID at the
identifier position, matching the .NET engine.
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsIntrinsicDataType (integer)
|
Returns whether a token type is an intrinsic ABL data type
Notes : Such a keyword keeps its own node type in a type position; every
other token there names a class and becomes a TYPE_NAME.
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsRecordFormItem ()
|
Returns whether the cursor sits on a record that is the single
item of a form item list
Notes : The reference grammar's displayItemsOrRecord /
formItemsOrRecord: the item is a table name and it is the
only item - nothing but a statement option (EXCEPT, WITH, IN
WINDOW, NO-ERROR, NO-LOBS, HEADER / BACKGROUND) or the period
follows it. The caller ensures no item precedes it
(SCL-5741).
@return Logical value indicating whether the cursor sits on a record item
*/
|
|
|
|
LOGICAL IsTableName (character)
|
Returns whether a name is a known table name
Notes : The reference grammar's isTableName predicate: a temp-table /
work-table / buffer declared so far in the compile unit, or a
table of the schema (optionally database-qualified). Without
a schema only the declared names count (SCL-5741).
@param pcName The name
@return Logical value indicating whether the name is a table name
*/
|
|
|
|
LOGICAL IsTypeNameToken (integer)
|
Returns whether a token type can name a type at a type position
Notes : Anything that is not a terminator or a separator - a class name
may be a plain ID or a token that happens to be a keyword.
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsValueToken (integer)
|
Returns whether a token type is a literal value token
(NUMBER / QSTRING / identifier)
Notes : Used to decide whether a clause keyword (INITIAL / FORMAT /
LABEL / FILE / ...) is followed by a value to wrap.
@param piType The token type
@return Logical value
*/
|
|
|
|
LOGICAL IsWithDownExpressionAhead ()
|
Returns whether the tokens at the cursor form an expression
followed by DOWN (the reference's frame_exp_down form)
Notes : Cheap token scan standing in for the reference's syntactic
predicate "(expression DOWN)=>" (proparse.g framephrase): walks
the natural tokens alternating between operand and operator
positions and succeeds when DOWN is reached outside parentheses.
A reserved keyword counts as an operand only when an operator or
an argument list follows (a no-argument builtin such as
SCREEN-LINES in "SCREEN-LINES - 8 DOWN"), so a keyword frame
option directly followed by a lone DOWN option stays a flat
child of the WITH node (SCL-5555).
@return True when an "expression DOWN" form starts at the cursor
*/
|
|
|
|
LoadTokens (ListProToken)
|
Adopts the token list as the current parse stream
Notes :
@param poTokens The token list
*/
|
|
|
|
INTEGER NaturalTypeAhead (integer)
|
Returns the type of the n-th natural token following the current
one (both skipping hidden), without moving the cursor
Notes : Offset 1 is the token right after the current natural token, so
NaturalTypeAhead (1) is NextNaturalType. Offset 2 is needed to
recognize the labelled form of the editing phrase, whose EDITING
keyword sits behind an identifier and a LEXCOLON (SCL-5516).
@param piOffset The number of natural tokens to look ahead
@return The token type, or 0 when there is no such token
*/
|
|
|
|
INTEGER NextNaturalType ()
|
Returns the type of the natural token following the current one
(both skipping hidden), without moving the cursor
Notes : One-token natural lookahead used for block-label detection.
@return The token type, or 0 when there is no such token
*/
|
|
|
|
ParseAggregatePhrase (integer)
|
Parses a DISPLAY-item aggregate phrase into an Aggregate_phrase
node
Notes : Shape per the reference grammar:
Aggregate_phrase > { LEFTPAREN,
<accum keyword> > { [ LABEL > <constant> ] },
...,
BY > { <expression>, [DESCENDING] }, ...,
RIGHTPAREN }.
aggregate_opt roots each option on its accumulate keyword, with
the optional label constant - itself rooted on LABEL /
COLUMN-LABEL - as its child (SCL-5540).
@param piItemId The Form_item node the phrase belongs to
*/
|
|
|
|
ParseAnnotationBody (integer)
|
Structures the attribute list of an annotation (after the @ token)
Notes : Shape (all flat under the ANNOTATION head, as in the reference):
[FILE], LEFTPAREN, { ID, EQUAL, <constant> } separated by COMMA,
RIGHTPAREN, PERIOD - mirroring anno_att_list / anno_att
(proparse.g ~1220).
*
The point of the dedicated handler is the attribute NAME: the
reference reads it as a new_identifier, which re-types ANY token
to ID, so a reserved keyword used as an attribute name stays a
plain identifier - @Foo (fields="a") is an N_ID 'fields', not an
N_FIELDS (SCL-5519). A name is recognized by the EQUAL that
follows it, so a value is never re-typed.
@param piHeadId The ANNOTATION node id
*/
|
|
|
|
ParseAnyOrValue (integer)
|
Consumes an anyorvalue argument under an option node
Notes : VALUE keeps its parenthesised expression (with the parens flat
children of the VALUE node); any other single token is re-typed
to TYPELESS_TOKEN, keeping its text, per the reference's
anyorvalue rule (SCL-5548).
@param piParentId The option node the argument belongs to
*/
|
|
|
|
ParseApplyBody (integer)
|
Structures the body of an APPLY statement (after its head token)
Notes : Shape: APPLY > { <expression>, TO > Widget_ref, PERIOD },
matching the reference grammar's applystate (APPLY^ expression
(TO^ gwidget)? state_end, SCL-5511). The applied event is a
plain expression - not Widget_ref-wrapped; the TO target roots
under the TO node and nests in a Widget_ref (a system handle
directly, an identifier additionally in a Field_ref) - the
shape ParseOnWidgets builds for ON ... OF (SCL-5491).
@param piHeadId The APPLY statement head node id
*/
|
|
|
|
ParseAsClause (integer, logical)
|
Parses an AS clause (AS keyword + data type)
Notes : When plNest is true the data type nests under the AS node (the
DEFINE VARIABLE / FIELD / scalar PARAMETER shape); when false the
AS node and the data type are siblings under the parent (the
DEFINE PROPERTY and Parameter_list INPUT shape).
@param piParentId The parent node id
@param plNest Whether the data type nests under the AS node
*/
|
|
|
|
ParseAssignBody (integer)
|
Structures the body of an ASSIGN statement (after its head token)
Notes : Shape: ASSIGN > { <operator> > { <reference>, <expression>,
[ WHEN > <condition> ] }, ..., PERIOD }. The operator is the
plain "=" or one of the compound operators (SCL-5476) - an
ASSIGN statement may combine several of them. A reference without
a following assignment operator and any unrecognized token stay
flat children.
@param piHeadId The ASSIGN statement head node id
*/
|
|
|
|
ParseAssignmentList (integer)
|
Parses an assignment list: <target> <operator> <value>
[WHEN <condition>] ... up to NO-ERROR or the period
Notes : The reference grammar's assignment_list, shared by the ASSIGN
statement and the ASSIGN clause of BUFFER-COPY. The operator
- "=" or a compound operator (+=, -=, *=, /=) - roots the
target and the value; a bare target is wrapped in a synthetic
Assign_from_buffer (SCL-5537, SCL-5758).
@param piParentId The ASSIGN node the assignments nest under
*/
|
|
|
|
ParseAsyncClauses (integer)
|
Parses the clauses qualifying the ASYNCHRONOUS option of a RUN
Notes : Shape: ASYNCHRONOUS > { [ SET > <reference> ],
[ EVENT_HANDLER > <procedure name> ],
[ EVENT_HANDLER_CONTEXT > <reference> ] }. Each clause keyword
owns its own argument rather than sitting next to it as a flat
sibling of the RUN head (SCL-5476). The event handler name is a
quoted string or an expression; the context is a reference, so it
picks up the synthetic Field_ref wrapper the .NET AST has.
@param piAsyncId The ASYNCHRONOUS node id
*/
|
|
|
|
INTEGER ParseBareExpressionStatement (integer)
|
Parses a bare expression statement into a synthetic
Expr_statement: [NO-RETURN-VALUE] <expression> PERIOD
Notes : The reference grammar's expression_statement - a comparison
such as "1 = 2." (whose operator is typed EQ / GTHAN / ...
by the expression parser), a literal, a parenthesized
expression or a NO-RETURN-VALUE call; the Expr_statement is
the statement head (SCL-5759). A reference-headed statement
takes ParseExprStatement instead.
@param piParentId The parent node id
@return The statement head node id
*/
|
|
|
|
ParseBlockBody (integer)
|
Parses a block body (Code_block) and its closing END clause
Notes : Called after the block header's LEXCOLON has been consumed. The
body statements are recursively parsed into a synthetic Code_block
child; the END keyword and the tokens up to (and including) the
PERIOD are added to the block head after the Code_block.
@param piHeadId The block statement head node id
*/
|
|
|
|
ParseBlockBody (integer, logical)
|
Parses a block body (Code_block) and its closing END clause
Notes : Called after the block header's LEXCOLON has been consumed. The
body statements are recursively parsed into a synthetic Code_block
child; the END keyword and the tokens up to (and including) the
PERIOD are added to the block head after the Code_block.
@param piHeadId The block statement head node id
@param plFlatEnd Whether the tokens after END stay siblings of the END
node instead of nesting under it - a property accessor
keeps its closing END a leaf (the reference grammar has
no caret on the accessor END, unlike the block ends,
SCL-5504)
*/
|
|
|
|
ParseBrowseDisplayItem (integer)
|
Parses one display item of a DEFINE BROWSE statement
Notes : The reference def_browse_display_item rule: Form_item >
{ <expression>, [Format_phrase > <column format options>],
[VIEWAS > <widget type>] } or Form_item > SPACE > [( expr )].
Unlike the form items of the DISPLAY statement, the VIEW-AS is
not a format option - it sits directly under the Form_item,
after the Format_phrase the columnformat options are wrapped
in (SCL-5786).
@param piParentId The DISPLAY node id
*/
|
|
|
|
ParseBrowseEnableItem (integer)
|
Parses one enable item of a DEFINE BROWSE statement
Notes : The reference def_browse_enable_item rule: Form_item >
{ Field_ref, [HELP > <constant>], [VALIDATE > ( ... )],
[AUTO-RETURN], [DISABLE-AUTO-ZAP] } - the options sit directly
under the Form_item, without a Format_phrase (SCL-5786).
@param piParentId The ENABLE node id
*/
|
|
|
|
ParseBufferCopyBody (integer)
|
Structures the body of a BUFFER-COMPARE / BUFFER-COPY statement
Notes : The records resolve as RECORD_NAME (after the head and after
TO); EXCEPT / USING root their fields; TO and the remaining
options (CASE-SENSITIVE, BINARY, EXPLICIT, NO-LOBS, NO-ERROR)
stay flat (SCL-5545).
@param piHeadId The statement head node id
*/
|
|
|
|
ParseCaseBody (integer)
|
Structures the body of a CASE statement (after its head token)
Notes : Builds the selector, the LEXCOLON, a synthetic Code_block holding
the WHEN clauses, an optional OTHERWISE (a child of CASE after the
Code_block, its branch nested under it), and the closing
END [CASE] PERIOD.
@param piHeadId The CASE statement head node id
*/
|
|
|
|
ParseCatchBody (integer)
|
Structures the body of a CATCH statement (after its head token)
Notes : Shape: CATCH > { ID, AS, TYPE_NAME, LEXCOLON, Code_block, END,
PERIOD }. The error class after AS is a type name and is
re-typed to TYPE_NAME as at the other type-name positions
(SCL-5487); the generic framer used to leave it an ID.
@param piHeadId The CATCH statement head node id
*/
|
|
|
|
ParseChooseBody (integer)
|
Structures the body of a CHOOSE statement
Notes : Shape per the reference (choosestate): CHOOSE > { ROW | FIELD
(FIELDS re-typed to FIELD), Form_item > { Field_ref, [HELP >
<constant>] } per chosen field, the options - COLOR >
<anyorvalue>, KEYS > Field_ref, GO-ON > (flat key list),
PAUSE > <expression>, AUTO-RETURN / NO-ERROR flat - and the
WITH frame phrase } (SCL-5548).
@param piHeadId The CHOOSE statement head node id
*/
|
|
|
|
ParseClassBody (integer)
|
Structures the body of a CLASS / INTERFACE statement (after its
head token)
Notes : Shape: CLASS > { TYPE_NAME, INHERITS > TYPE_NAME, IMPLEMENTS >
{ TYPE_NAME, COMMA, TYPE_NAME }, <modifiers>, LEXCOLON,
Code_block, END > CLASS, PERIOD }, verified against the .NET AST.
@param piHeadId The CLASS / INTERFACE statement head node id
*/
|
|
|
|
ParseClearBody (integer)
|
Structures the body of a CLEAR statement
Notes : FRAME roots the frame name (an identifier position); ALL and
NO-PAUSE stay flat (SCL-5546).
@param piHeadId The CLEAR statement head node id
*/
|
|
|
|
ParseColorBody (integer)
|
Structures the body of a COLOR statement
Notes : Shape per the reference (colorstate): COLOR > { [DISPLAY >
<anyorvalue>], [PROMPT > <anyorvalue>] (PROMPT-FOR re-typed to
PROMPT), Form_item > Field_ref (+ Format_phrase) per target
field, WITH frame phrase } (SCL-5548).
@param piHeadId The COLOR statement head node id
*/
|
|
|
|
ParseColorOption (integer)
|
Parses a widget color option (BGCOLOR / DCOLOR / FGCOLOR /
PFCOLOR) rooting its argument expression
Notes : The reference's color_expr rule ("(BGCOLOR^|DCOLOR^|FGCOLOR^|
PFCOLOR^) expression") makes the option node the parent of its
argument, so a variable argument nests as a Field_ref child
under the option node (SCL-5556).
@param piParentId The parent node id
*/
|
|
|
|
ParseColumnFormatOption (integer)
|
Parses one browse column format option and the arguments it owns
Notes : Per the reference columnformat_opt rule (SCL-5786):
*
FORMAT > <expression> (format_expr)
LABEL > <constant> [, ...] (label_constant, also
COLUMN-LABEL COLUMN-LABEL)
NO-LABELS (flat)
HEIGHT[-CHARS|-PIXELS] > NUMBER
WIDTH[-CHARS|-PIXELS] > NUMBER
COLUMN-FONT / COLUMN-*COLOR / LABEL-FONT / LABEL-*COLOR
> <expression>
LEXAT > { <base field>, [Format_phrase] }
@param piPhraseId The Format_phrase node id
*/
|
|
|
|
ParseCompileBody (integer)
|
Structures the body of a COMPILE statement
Notes : Shape per the reference (compilestate): COMPILE > { the
compiled file (a VALUE root or a glued FILENAME), one root per
option - SAVE > { [EQUAL > <expression>], [INTO >
<filenameorvalue>] }, LISTING > { <filenameorvalue>, APPEND,
PAGE-SIZE / PAGE-WIDTH > <expression> }, XREF / STRING-XREF >
{ <filenameorvalue>, [APPEND] }, XREF-XML / DEBUG-LIST /
PREPROCESS > <filenameorvalue>, XCODE > <expression>,
LANGUAGES > its parenthesised list - any option taking a
compile_equal roots EQUAL > <expression>; NO-ERROR /
NO-ATTR-SPACE stay flat } (SCL-5574).
@param piHeadId The COMPILE statement head node id
*/
|
|
|
|
ParseCompileEqual (integer)
|
Consumes an optional "= <expression>" under a COMPILE option
Notes : The reference's compile_equal rule roots the expression under
the EQUAL node (SCL-5574).
@param piParentId The option node id
*/
|
|
|
|
ParseCompileFileArg (integer)
|
Consumes a filenameorvalue argument under a COMPILE option node
Notes : A VALUE ( expression ) roots under the VALUE node; any other
token sequence glues into a FILENAME - a quoted name keeps its
quotes - per the reference's filenameorvalue rule (SCL-5574).
@param piParentId The option node id
*/
|
|
|
|
ParseCompileLanguages (integer)
|
Consumes the parenthesised language list of a COMPILE LANGUAGES
option
Notes : Each language segment re-types to TYPELESS_TOKEN, the colon
between sub-language segments re-types to LEXCOLON, a VALUE (
expression ) roots under its VALUE node; the parentheses and
commas stay flat, per the reference's compile_lang rules
(SCL-5574).
@param piLanguagesId The LANGUAGES node id
*/
|
|
|
|
ParseConditionInto (integer, integer)
|
Parses a condition / selector expression up to a delimiter
Notes : Runs the operator-precedence ExpressionParser for the part it
understands (producing the Proparse expression subtree), then
consumes any remaining tokens up to the delimiter (paren-aware,
never crossing a PERIOD) as flat children - so an expression form
the ExpressionParser does not yet cover never loses tokens or
misframes the statement.
@param piParentId The node the condition is added under
@param piStopType The delimiter token type (THEN for IF, LEXCOLON for CASE)
*/
|
|
|
|
ParseCopyLobBody (integer)
|
Structures the body of a COPY-LOB statement
Notes : All option keywords (FROM, FILE, OBJECT, TO, APPEND, OVERLAY,
AT, TRIM, ...) stay flat; the source / target / position
expressions parse through the expression parser (SCL-5545).
@param piHeadId The COPY-LOB statement head node id
*/
|
|
|
|
ParseCreateAliasBody (integer)
|
Structures the body of a CREATE ALIAS statement (after the
CREATE head token, at the ALIAS keyword)
Notes : Shape per the reference createaliasstate rule: CREATE > {
ALIAS, <anyorvalue>, FOR, DATABASE, <anyorvalue>, [NO-ERROR],
PERIOD } - each anyorvalue is a TYPELESS_TOKEN or a VALUE
node rooting its parenthesized expression (SCL-5565).
@param piHeadId The CREATE statement head node id
*/
|
|
|
|
ParseCreateBody (integer)
|
Structures the body of a CREATE statement (after its head token)
Notes : CREATE <table> makes the table name a RECORD_NAME - for a database
table and for a temp-table alike, so this is a positional decision
and not a schema lookup (SCL-5468).
*
Only a plain ID is re-typed, deliberately not every token that
IsIdentifierToken accepts: the object forms lead with a keyword
that may also serve as an identifier (CREATE WIDGET-POOL lexes
WIDGET-POOL as an identifier keyword), and the reference engine
keeps the keyword type there. The cost is that a table whose name
is a reserved keyword (CREATE Order.) is not re-typed; that case
was not handled before either, so nothing regresses, and it needs
the schema to be decided properly.
@param piHeadId The CREATE statement head node id
*/
|
|
|
|
ParseCreateIndexBody (integer)
|
Structures the embedded-SQL CREATE (UNIQUE)? INDEX statement
Notes : Shape per the reference: CREATE > { [UNIQUE], INDEX, ID (the
index name - a plain ID, not a Field_ref), ON, RECORD_NAME,
Field_list, PERIOD } (SCL-5542).
@param piHeadId The CREATE statement head node id
*/
|
|
|
|
ParseCtorBody (integer, logical)
|
Structures the body of a CONSTRUCTOR / DESTRUCTOR statement
(after its head token)
Notes : Shape: CONSTRUCTOR > { <modifiers>, TYPE_NAME, Parameter_list,
LEXCOLON, Code_block, END > CONSTRUCTOR, PERIOD }. A destructor
keeps its (empty) parentheses flat - the .NET AST builds no
Parameter_list for a destructor.
@param piHeadId The CONSTRUCTOR / DESTRUCTOR statement head node id
@param plParameterList Whether a parenthesis opens a Parameter_list
*/
|
|
|
|
ParseDataRelation (integer)
|
Parses a DATA-RELATION clause of a DEFINE DATASET statement
Notes : Structure: DATA-RELATION > { ID, FOR record list,
RELATION-FIELDS ( ... ), <options> }. Spans until the next
DATA-RELATION clause or the terminating PERIOD.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefBrowse (integer)
|
Structures a DEFINE BROWSE statement (after BROWSE)
Notes : name + QUERY > id + DISPLAY > Form_item(s) + WITH frame phrase.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefBuffer (integer)
|
Structures a DEFINE BUFFER statement (after BUFFER)
Notes :
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefDataset (integer)
|
Structures a DEFINE DATASET statement (after DATASET)
Notes : name + FOR record list + DATA-RELATION clauses.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefEnum (integer)
|
Structures a DEFINE ENUM member statement (after ENUM)
Notes : Shape: DEFINE > { ENUM, TYPE_NAME, ..., PERIOD }. Each member
name is a TYPE_NAME in the reference AST, not an ID (SCL-5470).
A member may carry an "= <value>" initializer, which stays flat.
The reference grammar's enum_member rule types every member
and every member named in a value list as TYPE_NAME whatever
token it is, so a member named like a keyword - reserved or
not (Default, Write, Update, Create, Delete) - is re-typed as
well (SCL-5751).
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefEvent (integer)
|
Structures a DEFINE EVENT statement (after EVENT)
Notes : name + SIGNATURE ( return type + Parameter_list ) or DELEGATE
type, plus any remaining options flat.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefForList (integer)
|
Structures a DEFINE QUERY / DATA-SOURCE statement (after the
object-type keyword)
Notes : name + FOR record list + any remaining options flat.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefFrame (integer)
|
Structures a DEFINE FRAME statement (after FRAME)
Notes : name + Form_item(s) for the displayed fields + WITH frame phrase.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefineBody (integer)
|
Structures the body of a DEFINE statement (after its head token)
Notes : Consumes any leading modifiers (access modifiers, INPUT / OUTPUT,
NEW / SHARED / STATIC / ABSTRACT, ...) as flat children, then
dispatches on the object-type keyword. Each handler consumes the
statement through its terminating PERIOD.
@param piHeadId The DEFINE statement head node id
*/
|
|
|
|
ParseDefMenu (integer)
|
Structures a DEFINE MENU / SUB-MENU statement (after the
object-type keyword)
Notes : name + MENU-ITEM clauses (each MENU-ITEM > { ID, options }).
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefParameter (integer)
|
Structures a DEFINE PARAMETER statement (after PARAMETER)
Notes : Handles the scalar parameter form (name + AS type) and the
BUFFER / TABLE / TABLE-HANDLE / DATASET / DATASET-HANDLE forms.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefProperty (integer)
|
Structures a DEFINE PROPERTY statement (after PROPERTY)
Notes : name + AS data type (flat, not nested under AS) + options, then
the Property_getter / Property_setter accessors.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefTable (integer)
|
Structures a DEFINE TEMP-TABLE / WORK-TABLE statement (after the
object-type keyword)
Notes : FIELD and INDEX clauses build their own sub-structure; LIKE
references a table (RECORD_NAME); BEFORE-TABLE wraps its name.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefVariable (integer)
|
Structures a DEFINE VARIABLE statement (after VARIABLE)
Notes :
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDefWidget (integer)
|
Structures a DEFINE statement for a generic widget / stream
(IMAGE / RECTANGLE / BUTTON / STREAM / ...) after the object-type
keyword
Notes : name + clause options (FILE / LABEL / EDGE-PIXELS wrap a value;
SIZE wraps its dimension; a color option roots its argument
expression per the reference's color_expr rule, SCL-5556;
anything else is flat).
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDeleteBody (integer)
|
Structures the body of a DELETE statement (after its head token)
Notes : The DELETE PROCEDURE and DELETE OBJECT forms are structured
here: their operand is an expression in the reference grammar
(deleteprocedurestate / deleteobjectstate: DELETE_KW^
PROCEDURE | OBJECT expression), so a handle variable target
carries the synthetic Field_ref wrapper of the .NET AST
(SCL-5476 / SCL-5513). Every other keyword-led DELETE form -
DELETE WIDGET, DELETE WIDGET-POOL, DELETE ALIAS, DELETE FROM -
is left to the generic framer, because the shape has not been
verified against the reference engine.
@param piHeadId The DELETE statement head node id
*/
|
|
|
|
ParseDisableTriggersBody (integer)
|
Structures the body of a DISABLE TRIGGERS statement (after
DISABLE, at the TRIGGERS keyword)
Notes : Shape per the reference disabletriggersstate rule: DISABLE >
{ TRIGGERS, FOR, DUMP | LOAD, OF, RECORD_NAME,
[ALLOW-REPLICATION], PERIOD } - all flat, the DUMP / LOAD
keyword keeps its type and the table is re-typed to
RECORD_NAME (SCL-5743)
@param piHeadId The DISABLE statement head node id
*/
|
|
|
|
ParseDisplayClause (integer)
|
Parses a DISPLAY or ENABLE clause of a DEFINE BROWSE statement
Notes : Structure: DISPLAY > Form_item (one per item), up to the ENABLE
clause, a WITH clause or the terminating PERIOD. The ENABLE list
is a sibling of the DISPLAY clause under the DEFINE head, per
the reference definebrowsestate rule (SCL-5755). The items take
the browse column shapes of the reference def_browse_display_item
/ def_browse_enable_item rules rather than the DISPLAY
statement's format phrase (SCL-5786).
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseDoBody (integer)
|
Structures the body of a DO / REPEAT statement (after its head
token)
Notes : Shape: DO > { FOR > { RECORD_NAME, [COMMA, RECORD_NAME] },
Block_iterator > { Field_ref, EQUAL, <from>, TO,
<to>, [BY, <by>] }, WHILE > <expression>, STOPAFTER >
<expression>, ON > <on phrase>, LEXCOLON, Code_block, END,
PERIOD }. The iterator bounds are flat children of the
Block_iterator, verified against the .NET AST. The STOP-AFTER
timeout roots under the STOPAFTER node, matching the reference
grammar's stop_after rule (STOPAFTER^ expression, SCL-5509).
The FOR record list nests under the FOR node per the reference
block_for rule ("FOR^ record (COMMA record)*", SCL-5559). The
PRESELECT record search nests under the PRESELECT node per the
reference block_preselect rule ("PRESELECT^ for_record_spec"):
EACH / FIRST / LAST, the record phrase and the commas of a join
are its flat children, like the record specs of an OPEN QUERY
(SCL-5742).
@param piHeadId The DO / REPEAT statement head node id
*/
|
|
|
|
ParseDownUpBody (integer)
|
Structures the body of a DOWN / UP / SCROLL statement
Notes : Stream options root their argument, a bare expression stays a
direct child of the head (the stream phrase may come before or
after it), a WITH clause builds the frame phrase; the SCROLL
options (FROM-CURRENT / UP / DOWN) stay flat (SCL-5544).
@param piHeadId The DOWN / UP / SCROLL statement head node id
*/
|
|
|
|
ParseEditingPhrase (integer)
|
Parses the editing phrase of a PROMPT-FOR / SET / UPDATE statement
Notes : Shape: Editing_phrase > { [ID, LEXCOLON], EDITING, block_colon,
<nested statements>, END }. The reference wraps the phrase in a
synthetic Editing_phrase node and keeps the nested statements
direct children of it - unlike a real block it opens no
Code_block, and its optional label stays a plain ID rather than
becoming a BLOCK_LABEL (SCL-5516). The statement's own state_end
(and a trailing NO-ERROR) follow the phrase and stay children of
the statement head.
@param piParentId The statement head node id
*/
|
|
|
|
ParseEnumBody (integer)
|
Structures the body of an ENUM statement (after its head token)
Notes : Shape: ENUM > { TYPE_NAME, [FLAGS], LEXCOLON, <member statements>,
END > ENUM, PERIOD }. Unlike the other block statements an ENUM
body is NOT wrapped in a synthetic Code_block in the reference
AST - the member DEFINE statements are direct children of the
ENUM head (SCL-5470).
@param piHeadId The ENUM statement head node id
*/
|
|
|
|
ParseEventListOf (integer)
|
Parses an "<event list> OF <widget list>" group of a WAIT-FOR
Notes : Shape: Event_list > { <event token>, COMMA, ... }, then OF and
the Widget_ref(s) as flat siblings under the given parent - the
statement head for the leading group, the OR node for a chained
one (SCL-5543). Event tokens keep their natural type.
@param piParentId The node the group belongs to
*/
|
|
|
|
ParseExceptFields (integer)
|
Consumes an EXCEPT <fields> option
Notes : EXCEPT roots its field references (except_fields) (SCL-5543).
@param piParentId The statement node the option belongs to
*/
|
|
|
|
ParseExportBody (integer)
|
Structures the body of an EXPORT statement
Notes : Shape per the reference: EXPORT > { [stream], [DELIMITER >
<constant>], Form_item > <expression> per item, [EXCEPT >
<fields>] } - unlike IMPORT, the items ARE wrapped in
Form_item (SCL-5543).
@param piHeadId The EXPORT statement head node id
*/
|
|
|
|
ParseExpressionFormItem (integer)
|
Parses a form item that is an expression (a literal, or a
field with an INPUT option) as Form_item > <expression> with
its aggregate / format phrases
Notes : The display_item / form_item shape of the reference grammar:
(expression | ...) (aggregatephrase | formatphrase)* (SCL-5757)
@param piParentId The parent node id
*/
|
|
|
|
ParseExpressionInto (integer)
|
Parses one full (OR-level) expression at the cursor into a parent
Notes : Delegates to the shared ExpressionParser over this parse's node
store and token stream, then advances the cursor past it.
@param piParentId The parent node id
*/
|
|
|
|
INTEGER ParseExprStatement (integer)
|
Parses a statement led by a reference: an assignment
(x = <expr>.), a DYNAMIC-NEW assignment or a bare expression
statement (x:Method ().)
Notes : The head is created as a natural ASSIGN first; when the parsed
reference is not followed by an assignment operator the head is
re-typed to the imaginary Expr_statement (SCL-5469), and when
the assigned value is a DYNAMIC-NEW the head is re-typed to the
imaginary Assign_dynamic_new (SCL-5535). Both re-typed heads
leave the natural node stream.
@param piParentId The parent node id
@return The statement head node id
*/
|
|
|
|
ParseExtentClause (integer)
|
Parses an EXTENT clause (EXTENT keyword + optional dimension)
Notes : The dimension NUMBER, when present, nests under the EXTENT node.
@param piParentId The parent node id
*/
|
|
|
|
ParseFieldClause (integer)
|
Parses a FIELD clause of a temp-table / work-table definition
Notes : Structure: FIELD > { ID, (AS > type | LIKE > Field_ref),
<field options> }. The field spans until the next FIELD / INDEX /
BEFORE-TABLE clause or the terminating PERIOD.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseFilenameRun (integer)
|
Consumes the program name and the arguments of an INPUT / OUTPUT
THROUGH phrase, each merged into a FILENAME of its own
Notes : The first token is always a name (even a keyword such as
ECHO); the following tokens are names as long as they are
not keywords - the io options (NO-ECHO, APPEND, ...) end the
list. Mirrors the reference's "filenameorvalue (anyorvalue)*"
tail of the THROUGH form as it appears in the .NET AST
(SCL-5760).
@param piParentId The parent node id
*/
|
|
|
|
ParseFindBody (integer)
|
Structures the body of a FIND statement (after its head token)
Notes : Shape: FIND > { [FIRST | LAST | NEXT | PREV | CURRENT],
RECORD_NAME > <record phrase>, <options>, PERIOD }. The record
phrase carries the WHERE condition and the lock / NO-ERROR
options; anything the record phrase does not claim stays flat.
@param piHeadId The FIND statement head node id
*/
|
|
|
|
ParseForBody (integer)
|
Structures the body of a FOR statement (after its head token)
Notes : Shape: FOR > { EACH | FIRST | LAST, RECORD_NAME > <record
phrase>, COMMA, ..., BY > <expression> [DESCENDING], WHILE >
<expression>, STOPAFTER > <expression>, ON > <on phrase>,
LEXCOLON, Code_block, END, PERIOD }. Unrecognized header
options stay flat. The STOP-AFTER timeout roots under the
STOPAFTER node (stop_after rule, SCL-5509).
@param piHeadId The FOR statement head node id
*/
|
|
|
|
ParseForList (integer, logical)
|
Parses a FOR record list (FOR keyword + comma-separated tables)
Notes : Each table name is re-typed to RECORD_NAME when plAsRecord is
true (buffer / query / temp-table / data-source / dataset tables);
otherwise consumed as an identifier (a DATASET name in a
parameter). A leading TEMP-TABLE keyword (FOR TEMP-TABLE x) is
consumed flat.
@param piParentId The parent node id
@param plAsRecord Whether the table names become RECORD_NAME
*/
|
|
|
|
ParseFormatOption (integer)
|
Parses one format phrase option and the arguments it owns
Notes : Verified against the reference engine for the AppBuilder widget
phrase (SCL-5442):
*
AT > { ROW > NUMBER, COLUMN > NUMBER, COLON-ALIGNED }
AT > <expression> (the position form, SCL-5548)
NO-LABEL (its own option - the reference's format_opt
rule, a direct Format_phrase child, SCL-5492)
WIDGET-ID > NUMBER
VIEW-AS > <widget type> > <its own options>
SIZE > { NUMBER, BY, NUMBER }
LABEL > <constant> [, <constant> ...]
(label_constant, SCL-5548; also
COLUMN-LABEL COLUMN-LABEL, SCL-5787)
HELP > <constant> (help_const, SCL-5548)
FORMAT > <expression> (format_expr, SCL-5548)
WHEN > <expression> (when_exp, SCL-5787)
*
An option this method does not know keeps its arguments flat
rather than guessing at a shape.
@param piPhraseId The Format_phrase node id
*/
|
|
|
|
ParseFormatPhrase (integer)
|
Parses the format phrase following a form item
Notes : Shape: Format_phrase > { AT > { ROW > NUMBER, COLUMN > NUMBER } }.
Only the AT position phrase is structured - each of ROW and
COLUMN owns its dimension. Before SCL-5472 the AT stayed a flat
sibling of the form item and ROW / COLUMN were consumed as
further form items, which re-typed the two keywords to ID.
@param piItemId The Form_item node id
*/
|
|
|
|
ParseFormBody (integer)
|
Structures the body of a FORM statement
Notes : Shape per the reference (formstate - FORM lexes as an
abbreviation of FORMAT): FORMAT > { Form_item per item (a
field roots Field_ref + Format_phrase, a constant stays bare,
SKIP / SPACE own their parenthesised dimension), [HEADER |
BACKGROUND > its own Form_item list], [EXCEPT > <fields>],
WITH frame phrase } (SCL-5548).
@param piHeadId The FORM statement head node id
*/
|
|
|
|
LOGICAL ParseFormDisplayItem (integer)
|
Parses one FORM display item into a synthetic Form_item
Notes : A field roots Field_ref plus an optional Format_phrase (the
ParseFormItem shape); SKIP / SPACE own their parenthesised
dimension; a constant stays a bare Form_item child, again with
an optional Format_phrase (SCL-5548).
@param piParentId The node the Form_item belongs to
@return TRUE when an item was consumed, FALSE when the cursor does not
sit on a display item
*/
|
|
|
|
ParseFormItem (integer)
|
Parses a form item (a displayed field) as Form_item > Field_ref > ID
Notes :
@param piParentId The parent node id
*/
|
|
|
|
ParseFormItemBody (integer)
|
Structures the body of a MESSAGE / DISPLAY / PROMPT-FOR
statement (after its head token)
Notes : Each displayed expression is wrapped in a synthetic Form_item;
SKIP / SPACE (with an optional parenthesized dimension) form
their own Form_item; VIEW-AS and WITH build their phrase
sub-structure; UPDATE / SET wrap the following reference. Any
other option token stays a flat child.
@param piHeadId The MESSAGE / DISPLAY statement head node id
*/
|
|
|
|
ParseFunctionBody (integer)
|
Structures the body of a FUNCTION statement (after its head
token)
Notes : Shape: FUNCTION > { ID, RETURNS, <return type>, Parameter_list,
LEXCOLON, Code_block, END > FUNCTION, PERIOD } - a FORWARD
declaration (FORWARDS) or an IN-handle mapping ends with the
PERIOD instead of the block. The function name is registered
with the ExpressionParser so later references parse as
USER_FUNC calls.
@param piHeadId The FUNCTION statement head node id
*/
|
|
|
|
ParseGoOnList (integer)
|
Consumes the parenthesised key list of a GO-ON option as flat
children of the GO-ON node
Notes : The reference's goonphrase keeps every key label (and the
optional OF widget) a flat child - an identifier here is NOT a
field reference, so the tokens must not run through the
expression path (SCL-5548).
@param piGoOnId The GO-ON node id
*/
|
|
|
|
ParseIfBody (integer)
|
Structures the body of an IF statement (after its head token)
Notes : Builds the condition, the THEN keyword and the then-branch (a
child of the IF head, following THEN), and an optional ELSE whose
branch nests under the ELSE node.
@param piHeadId The IF statement head node id
*/
|
|
|
|
ParseImportBody (integer)
|
Structures the body of an IMPORT statement
Notes : Shape per the reference: IMPORT > { [stream], [DELIMITER >
<constant> | UNFORMATTED], <field references> (NOT wrapped in
Form_item, unlike EXPORT), CARET, [EXCEPT > <fields>],
[NO-ERROR] } (SCL-5543).
@param piHeadId The IMPORT statement head node id
*/
|
|
|
|
ParseIndexClause (integer)
|
Parses an INDEX clause of a temp-table / work-table definition
Notes : Structure: INDEX > { ID, [AS | IS] [UNIQUE] [PRIMARY]
[WORD-INDEX], ID (field), [ASCENDING | DESCENDING], ... } - all
flat children.
The index spans until the next FIELD / INDEX / BEFORE-TABLE clause
or the terminating PERIOD. The index name and the field names are
identifier positions: an unreserved keyword there is re-typed to
ID (matching the .NET AST), while the unreserved option keywords
AS / PRIMARY / WORD-INDEX keep their keyword type (IS / UNIQUE /
ASCENDING / DESCENDING are reserved and never collide). The
reference grammar's def_table_index accepts AS as a synonym of
IS - "Yes, the compiler really lets you use AS instead of IS
here." - and keeps its AS keyword node (SCL-5525).
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseInitialClause (integer)
|
Parses an INITIAL clause, nesting the value - or the whole
bracketed array value list - under the INITIAL node
Notes : The reference's initial_constant rule ("INITIAL^ ( LEFTBRACE
(TODAY|NOW|constant) (COMMA (TODAY|NOW|constant))* RIGHTBRACE
| (TODAY|NOW|constant) )") roots the bracket pair, the values
and the separating commas under the INITIAL node (SCL-5564).
The single-value form keeps the ParseWrapValue shape,
including its signed-number handling.
@param piParentId The parent node id
*/
|
|
|
|
ParseInsertBody (integer)
|
Structures the embedded-SQL INSERT INTO statement
Notes : Shape per the reference: INSERT > { INTO, RECORD_NAME,
[Field_list], VALUES > { LEFTPAREN, <constants>, RIGHTPAREN },
PERIOD } (SCL-5542).
@param piHeadId The INSERT statement head node id
*/
|
|
|
|
ParseInUicTail (integer)
|
Consumes the optional IN FRAME / MENU / BROWSE / SUB-MENU /
BUFFER tail of a widget reference
Notes : The reference grammar's inuic roots IN_KW over the object
keyword and the widget name (a plain identifier, re-typed to
ID) and belongs INSIDE the Widget_ref - gwidget is
s_widget (inuic)? (SCL-5533). IN WINDOW is NOT an inuic form
and stays with the statement's own IN WINDOW handling.
@param piWidgetId The Widget_ref node id
*/
|
|
|
|
ParseInWindowOption (integer)
|
Consumes an IN [WINDOW] <reference> option
Notes : IN roots its argument; the WINDOW keyword, when present, stays
a flat child inside it (in_window_expr / in_expr) (SCL-5545).
@param piParentId The statement node the option belongs to
*/
|
|
|
|
ParseIoRedirectBody (integer)
|
Structures the body of an INPUT / OUTPUT / INPUT-OUTPUT
redirection statement
Notes : Stream options root their argument; FROM / TO / THROUGH /
CLOSE stay flat with a following quoted file name re-typed to
FILENAME; PAGE-SIZE roots its argument re-typed to
TYPELESS_TOKEN; the remaining io options (APPEND, PAGED,
NO-ECHO, ...) stay flat (SCL-5546). Unquoted multi-token file
names (the reference's filenameMerge) are a lexer-level
concern outside this handler.
@param piHeadId The statement head node id
*/
|
|
|
|
INTEGER ParseKeywordExpr (integer)
|
Consumes a keyword that roots the expression following it
Notes : The FORMAT / AT / TO / ROW / COLUMN / PAUSE / DELIMITER ...
option shape of the reference grammar's *_expr rules
(SCL-5543).
@param piParentId The statement node the option belongs to
@return The keyword node id
*/
|
|
|
|
ParseLeaveBody (integer)
|
Structures the body of a LEAVE / NEXT statement (after its head
token)
Notes : Shape: LEAVE > { [BLOCK_LABEL], PERIOD }, verified against the
.NET AST.
@param piHeadId The LEAVE / NEXT statement head node id
*/
|
|
|
|
ParseLikeClause (integer, logical)
|
Parses a LIKE clause (LIKE keyword + a like source)
Notes : When plAsRecord is true the source is a table name re-typed to
RECORD_NAME (temp-table LIKE); otherwise it is a field reference
built as Field_ref > ID (variable / field LIKE).
@param piParentId The parent node id
@param plAsRecord Whether the like source is a table (RECORD_NAME)
*/
|
|
|
|
ParseMenuItem (integer)
|
Parses a MENU-ITEM clause of a DEFINE MENU / SUB-MENU statement
Notes : Structure: MENU-ITEM > { ID, LABEL > value, <options> }. Spans
until the next MENU-ITEM / SUB-MENU clause or the terminating
PERIOD.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseMessageUpdatePhrase (integer)
|
Parses the format phrase of a MESSAGE ... UPDATE / SET field
option: AS datatype, LIKE field and the other format options
Notes : The reference's formatphrase roots the AS clause ("AS^
datatype_var") and the LIKE clause ("LIKE^ field") like the
other format options; the phrase is only built when at least
one option follows the field. A VIEW-AS ALERT-BOX belongs to
the MESSAGE statement and ends the phrase (SCL-5756).
@param piUpdateId The UPDATE / SET node id
*/
|
|
|
|
ParseMethodBody (integer)
|
Structures the body of a METHOD statement (after its head token)
Notes : Shape: METHOD > { <modifiers>, VOID | <return type>, ID,
Parameter_list, LEXCOLON, Code_block, END > METHOD, PERIOD } -
an abstract / interface method ends with the PERIOD instead of
the block. Verified against the .NET AST.
@param piHeadId The METHOD statement head node id
*/
|
|
|
|
ParseNextPromptBody (integer)
|
Structures the body of a NEXT-PROMPT statement
Notes : The field is a bare Field_ref (not wrapped in Form_item, unlike
the display statements), followed by an optional frame phrase
(SCL-5544).
@param piHeadId The NEXT-PROMPT statement head node id
*/
|
|
|
|
ParseNumberOption (integer)
|
Parses an option keyword that owns a single numeric argument
Notes :
@param piParentId The parent node id
*/
|
|
|
|
ParseOnBody (integer)
|
Structures the body of a standalone ON statement (after ON)
Notes : Only a database event trigger makes the name after OF a
RECORD_NAME. A widget event (ON CHOOSE OF btnGo) leaves it an
identifier, and ON ASSIGN OF names a field rather than a table -
all three verified against the reference engine (SCL-5468).
*
The block ON phrase (DO ... ON ERROR UNDO, THROW) never reaches
here: there the statement head is DO / REPEAT and the phrase is
handled by ParseDoBody.
@param piHeadId The ON statement head node id
*/
|
|
|
|
ParseOneRecord (integer, logical)
|
Parses one table reference in a FOR record list
Notes : A leading TEMP-TABLE keyword (FOR TEMP-TABLE x) is consumed flat.
The table name is re-typed to RECORD_NAME when plAsRecord is true;
any identifier is accepted, including a table name the lexer typed
as a keyword (e.g. ORDER), so a reserved-keyword table name still
becomes a RECORD_NAME.
@param piParentId The parent node id
@param plAsRecord Whether the table name becomes RECORD_NAME
*/
|
|
|
|
ParseOnPhrase (integer)
|
Parses an ON phrase of a block header (ON ERROR UNDO, THROW ...)
Notes : Shape: ON > { ERROR | ENDKEY | STOP | QUIT, UNDO, COMMA, THROW |
LEAVE | NEXT | RETRY | RETURN, <labels> } - all flat children of
the ON node, verified against the .NET AST.
@param piHeadId The block statement head node id
*/
|
|
|
|
ParseOnWidgets (integer)
|
Parses the widget (list) after OF in a widget-event ON statement
Notes : Each widget nests in a synthetic Widget_ref - a plain name
additionally in a Field_ref, a system handle (THIS-PROCEDURE)
directly - matching the reference grammar's gwidget rule
(SCL-5491). A widget form this method does not recognize stays
flat in the ON header, as before.
@param piHeadId The ON statement head node id
*/
|
|
|
|
ParseOpenBody (integer)
|
Structures the body of an OPEN QUERY statement (after OPEN)
Notes : Shape: OPEN > { QUERY, ID, FOR | PRESELECT, EACH | FIRST | LAST,
RECORD_NAME > <record phrase>, COMMA, ..., PERIOD }, mirroring
the record specs of a FOR statement (SCL-5486). An OPEN that is
not OPEN QUERY (the ESQL open-cursor statement) stays flat.
@param piHeadId The OPEN statement head node id
*/
|
|
|
|
INTEGER ParseOperandInto (integer)
|
Parses one AND-level operand at the cursor into a parent
Notes : Used for a WHEN value-list operand (a top-level OR is the list
separator, grouped by ParseWhenValue). Advances the cursor.
@param piParentId The parent node id
@return The operand root node id, or 0 when there is no operand
*/
|
|
|
|
ParseOsFileBody (integer)
|
Structures the body of an OS-COPY / OS-RENAME / OS-APPEND /
OS-DELETE / OS-CREATE-DIR statement (after its head token)
Notes : Every file name argument is a filenameorvalue: a VALUE ( )
roots its expression, anything else is merged into a FILENAME
- a quoted name keeps its quotes in the text. OS-DELETE is the
exception: its arguments stay plain tokens and its RECURSIVE
option keeps its keyword (SCL-5760)
@param piHeadId The statement head node id
*/
|
|
|
|
ParseParameterDatasetOptions (integer)
|
Consumes the optional APPEND / BY-VALUE / BY-REFERENCE / BIND
options of a TABLE / DATASET style call parameter
Notes : The reference grammar's parameter_dataset_options rule -
"(APPEND)? (BYVALUE|BYREFERENCE|BIND)?" - the option keywords
sit flat inside the parameter's mode node (SCL-5553).
@param piModeId The parameter mode node id
*/
|
|
|
|
ParseParameterItems (integer)
|
Parses the items of a parameter list into a node: LEFTPAREN,
<mode> > <argument>, COMMA, ..., RIGHTPAREN
Notes : An explicit INPUT / OUTPUT / INPUT-OUTPUT keyword is the mode
node; a mode-less argument gets a synthetic INPUT wrapper.
TABLE / DATASET / BUFFER / handle argument forms are consumed
flat inside their mode node. Shared by the RUN parameter list
(rooted in a Parameter_list) and the THIS-OBJECT ( ... )
constructor chaining statement, whose parameterlist_noroot
puts the items directly under the statement head (SCL-5763).
@param piListId The node the items are added to
*/
|
|
|
|
ParseParameterList (integer)
|
Parses a Parameter_list ( ( mode name AS type, ... ) )
Notes : Structure: Parameter_list > { LEFTPAREN, <mode> > { ID, AS, type },
COMMA, ..., RIGHTPAREN }. Each parameter is grouped under its mode
node (INPUT / OUTPUT / INPUT-OUTPUT; a synthetic INPUT when the
mode is omitted). The parameter data type is flat (a sibling of
the AS node), matching Proparse. Used by property setters and
event signatures.
@param piParentId The parent node id
*/
|
|
|
|
ParseParameterListItem (integer)
|
Parses one item of a Parameter_list (mode + name + AS type)
Notes :
@param piListId The Parameter_list node id
*/
|
|
|
|
ParseParentIdRelation (integer)
|
Parses a PARENT-ID-RELATION clause of a DEFINE DATASET statement
Notes : Shape per the reference parentIdRelation rule:
PARENT-ID-RELATION > { [ID], FOR, RECORD_NAME, COMMA,
RECORD_NAME, PARENT-ID-FIELD, Field_ref,
[PARENT-FIELDS-BEFORE, LEFTPAREN, Field_ref, ..., RIGHTPAREN],
[PARENT-FIELDS-AFTER, LEFTPAREN, Field_ref, ..., RIGHTPAREN] }
- everything flat under the relation node, the FOR record list
like a DATA-RELATION's (SCL-5744)
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParsePauseBody (integer)
|
Structures the body of a PAUSE statement
Notes : The timeout expression stays a direct child; MESSAGE roots its
text; IN WINDOW roots its argument; the remaining options
(BEFORE-HIDE, NO-MESSAGE, ...) stay flat (SCL-5545).
@param piHeadId The PAUSE statement head node id
*/
|
|
|
|
ParseProcedureBody (integer)
|
Structures the body of a PROCEDURE statement (after its head
token)
Notes : Shape: PROCEDURE > { ID, <options>, LEXCOLON, Code_block,
END > PROCEDURE, PERIOD }, verified against the .NET AST.
The reference's block_colon accepts a PERIOD in place of the
LEXCOLON - the legacy AppBuilder "PROCEDURE FileMenu." form -
so the body block opens after the period just as after a
colon (SCL-5530).
@param piHeadId The PROCEDURE statement head node id
*/
|
|
|
|
ParseProgram ()
|
Parses the whole token stream into Program_root > <statements>
Notes : Sets RootNodeId to the Program_root node.
*
The top level statements are direct children of Program_root and
the program is terminated by a Program_tail node - the shape the
Java engine produces, so that consumers can reach a top level
statement with GetTopNode():FirstDirectChild (...). Program_root
and Program_tail are synthetic (Natural = FALSE) and carry no
text, again matching the reference engine (SCL-5466).
*
Program_root is a block node, but Program_tail is a plain JPNode
in the reference engine - it closes the program rather than
opening a scope (SCL-5475).
*/
|
|
|
|
ParsePropertyAccessor (integer)
|
Parses one property accessor (Property_getter / Property_setter)
Notes : Structure: <accessor> > { [access modifiers], GET | SET,
[Parameter_list], (PERIOD | LEXCOLON Code_block END GET|SET
PERIOD) }. The accessor kind is resolved by looking past any
leading access modifiers to the GET / SET keyword.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParsePublishBody (integer)
|
Structures the body of a PUBLISH statement
Notes : Shape per the reference: PUBLISH > { <event expression>,
[FROM > <expr>], [Parameter_list] } - the parameter list is the
RUN statement's shape with synthetic INPUT mode wrappers
(SCL-5545).
@param piHeadId The PUBLISH statement head node id
*/
|
|
|
|
ParsePutBody (integer)
|
Structures the body of a PUT statement
Notes : Shape per the reference: PUT > { [STREAM > ID |
STREAM-HANDLE > <expr>], [CONTROL | UNFORMATTED | SCREEN],
<items>, with FORMAT / AT / TO / ROW / COLUMN / COLOR each
rooting its expression and SKIP / SPACE owning an optional
parenthesised dimension } (SCL-5543).
@param piHeadId The PUT statement head node id
*/
|
|
|
|
ParseReadKeyBody (integer)
|
Structures the body of a READKEY statement
Notes : A stream option and PAUSE root their argument (SCL-5546).
@param piHeadId The READKEY statement head node id
*/
|
|
|
|
ParseRecordFields (integer)
|
Parses the FIELDS / FIELD / EXCEPT field list of a record phrase
Notes : Shape per the reference record_fields rule: <keyword> > {
LEFTPAREN, Field_ref [WHEN > <expression>], ..., RIGHTPAREN } -
the parenthesis pair is optional, and the FIELD synonym is
re-typed to FIELDS (SCL-5745)
@param piRecordId The RECORD_NAME node id
*/
|
|
|
|
ParseRecordFormItem (integer)
|
Parses a record used as the single form item into
Form_item > RECORD_NAME
Notes : SCL-5741
@param piParentId The parent node id
*/
|
|
|
|
ParseRecordPhrase (integer)
|
Parses one record phrase (RECORD_NAME with its nested options)
Notes : Shape: RECORD_NAME > { FIELDS | FIELD | EXCEPT > { LEFTPAREN,
Field_ref [WHEN > <expression>], ..., RIGHTPAREN }, WHERE >
<expression>, USE-INDEX > ID, OF > RECORD_NAME, USING >
{ Field_ref, [AND, Field_ref, ...] }, <lock / wait / error
options> }, verified against the .NET AST. The field list
follows the reference record_fields rule (SCL-5745), the USING
option its record_opt alternative (SCL-5785). The phrase ends
at the first token that is not a record-phrase option.
@param piParentId The parent node id (the statement head)
*/
|
|
|
|
ParseRecordSearch (integer)
|
Parses a multi-record search (the record specs of a PRESELECT
block option or an OPEN QUERY) into a node
Notes : Shape: <parent> > { EACH | FIRST | LAST, RECORD_NAME > <record
phrase>, COMMA, ... } - the reference for_record_spec /
multiRecordSearch, whose parts stay flat under the node that
roots the search (SCL-5486, SCL-5742)
@param piParentId The node the record search nests under
*/
|
|
|
|
INTEGER ParseReferenceInto (integer)
|
Parses one primary-level reference (Field_ref / Widget_ref chain)
at the cursor into a parent
Notes : Used for an assignment left-hand side and a block-iterator
variable, where a following "=" must not be consumed as a
comparison operator. Advances the cursor.
@param piParentId The parent node id
@return The reference root node id, or 0 when there is no reference
*/
|
|
|
|
ParseRelationFields (integer)
|
Parses a RELATION-FIELDS clause of a DATA-RELATION
Notes : Structure: RELATION-FIELDS > { LEFTPAREN, Field_ref > ID, COMMA,
Field_ref > ID, ..., RIGHTPAREN }.
@param piRelId The DATA-RELATION node id
*/
|
|
|
|
ParseReleaseBody (integer)
|
Structures the body of a RELEASE statement (after its head token)
Notes : RELEASE <table> makes the table name a RECORD_NAME - like CREATE
this is a positional decision on a plain ID: the object forms
(RELEASE OBJECT / RELEASE EXTERNAL) lead with a keyword and stay
flat (SCL-5486).
@param piHeadId The RELEASE statement head node id
*/
|
|
|
|
ParseRepositionBody (integer)
|
Structures the body of a REPOSITION statement
Notes : The query name stays a plain ID; TO roots the target kind
keyword (ROW / ROWID / RECID) and its expression; FORWARDS /
BACKWARDS / ROW root their expression; NO-ERROR stays flat
(SCL-5545).
@param piHeadId The REPOSITION statement head node id
*/
|
|
|
|
ParseReturnBody (integer)
|
Structures the body of a RETURN statement (after its head token)
Notes : Shape: RETURN > { [ERROR | NO-APPLY], <expression>, PERIOD }.
NO-APPLY is consumed as its keyword - it is an unreserved
keyword, so the expression parser would otherwise claim it as a
Field_ref and re-type it to ID (SCL-5491).
@param piHeadId The RETURN statement head node id
*/
|
|
|
|
ParseRunBody (integer)
|
Structures the body of a RUN statement (after its head token)
Notes : Shape: RUN > { FILENAME | SUPER | VALUE > { LEFTPAREN, <expr>,
RIGHTPAREN }, Parameter_list > { LEFTPAREN, <mode> > <argument>,
COMMA, ..., RIGHTPAREN }, PERSISTENT > SET > <reference>,
<options>, PERIOD }. The run target is re-typed to FILENAME,
matching the .NET AST.
@param piHeadId The RUN statement head node id
*/
|
|
|
|
ParseRunParameterList (integer)
|
Parses the parameter list of a RUN statement
Notes : Shape: Parameter_list > { LEFTPAREN, <mode> > <argument>, COMMA,
..., RIGHTPAREN }. An explicit INPUT / OUTPUT / INPUT-OUTPUT
keyword is the mode node; a mode-less argument gets a synthetic
INPUT wrapper. TABLE / DATASET / BUFFER / handle argument forms
are consumed flat inside their mode node.
@param piHeadId The RUN statement head node id
*/
|
|
|
|
ParseSeekBody (integer)
|
Structures the body of a SEEK statement
Notes : INPUT / OUTPUT / TO / END stay flat; a stream option roots its
argument; the position parses as an expression (SCL-5546).
@param piHeadId The SEEK statement head node id
*/
|
|
|
|
ParseSelectBody (integer, integer)
|
Structures the embedded-SQL SELECT statement
Notes : Shape per the reference: SELECT > { Sql_select_what > <exprs>,
[ INTO > <field refs> ], [ FROM > { RECORD_NAME,
[ WHERE > <condition> ] } ] } - and, deliberately, the
terminating PERIOD is a SIBLING of the SELECT head (a child of
the enclosing Code_block), not a child of it (SCL-5542).
@param piHeadId The SELECT statement head node id
@param piParentId The enclosing block node id (receives the PERIOD)
*/
|
|
|
|
ParseSignature (integer)
|
Parses a SIGNATURE clause of a DEFINE EVENT statement
Notes : Structure: SIGNATURE > { VOID | return type, Parameter_list }.
@param piHeadId The DEFINE head node id
*/
|
|
|
|
ParseSizeClause (integer)
|
Parses a SIZE / SIZE-PIXELS / SIZE-CHARS clause (n BY n)
Notes : The dimension tokens (NUMBER BY NUMBER) nest under the SIZE node.
@param piParentId The parent node id
*/
|
|
|
|
INTEGER ParseSource (longchar, character)
|
Lexes and parses an in-memory source string into a record AST
Notes : Runs the folded lexer / preprocessor, then frames the resulting
token stream into statements and blocks.
@param plcSource The source code
@param pcFileName The (nominal) file name for position reporting
@return The Program_root node id
*/
|
|
|
|
ParseSqlFieldList (integer)
|
Parses an embedded-SQL field list into a Field_list node
Notes : Shape per the reference: Field_list > { LEFTPAREN,
Field_ref > ID, COMMA, Field_ref > ID, ..., RIGHTPAREN }
(SCL-5542).
@param piParentId The statement node the list belongs to
*/
|
|
|
|
INTEGER ParseStatement (integer)
|
Parses a single statement (simple or block) under a parent
Notes : The head token is marked STATEHEAD. A leading ID + LEXCOLON is
consumed as a block label attached to the head. The header is read
up to a PERIOD (simple statement) or a LEXCOLON (block); a block's
body is a synthetic Code_block of the recursively parsed body
statements, closed by the matching END and its trailing tokens up
to the PERIOD.
@param piParentId The parent node id (a Code_block)
@return The statement head node id, or 0 at end of the stream
*/
|
|
|
|
ParseStatusBody (integer)
|
Structures the body of a STATUS statement
Notes : Shape per the reference: STATUS > { DEFAULT > <expr> |
INPUT > [OFF | <expr>], [IN WINDOW <expr>] } (SCL-5544).
@param piHeadId The STATUS statement head node id
*/
|
|
|
|
ParseStreamClause (integer)
|
Consumes a leading STREAM / STREAM-HANDLE clause when present
Notes : Shape: STREAM > <name> - the stream name nests under the STREAM
keyword, as the reference grammar's stream_name_or_handle
(STREAM^ n:identifier | STREAMHANDLE^ expression) roots it there
(SCL-5521).
@param piParentId The parent node id
*/
|
|
|
|
LOGICAL ParseStreamOption (integer)
|
Consumes a STREAM <name> / STREAM-HANDLE <expression> option
Notes : The stream keyword roots its argument, per the reference
grammar's stream_name_or_handle (SCL-5543).
@param piParentId The statement node the option belongs to
@return TRUE when a stream option was consumed
*/
|
|
|
|
ParseSubscribeBody (integer)
|
Structures the body of a SUBSCRIBE / UNSUBSCRIBE statement
Notes : PROCEDURE / IN / RUN-PROCEDURE root their argument; TO,
ANYWHERE, ALL and NO-ERROR stay flat; the event name parses as
an expression (SCL-5545).
@param piHeadId The SUBSCRIBE / UNSUBSCRIBE statement head node id
*/
|
|
|
|
ParseSystemDialogBody (integer)
|
Structures the body of a SYSTEM-DIALOG statement
Notes : Shape per the reference (systemdialogcolorstate / -fontstate /
-getdirstate / -getfilestate / -printersetupstate): the
discriminator keyword stays flat, COLOR / FONT take a leading
expression and GET-DIR / GET-FILE a leading Field_ref; the
options - MAX-SIZE / MIN-SIZE / NUM-COPIES / INITIAL-DIR /
DEFAULT-EXTENSION / TITLE > <expression>, UPDATE > Field_ref,
IN > { WINDOW, <expression> }, FILTERS > its label / pattern
expression pairs (COMMA flat) with the optional
INITIAL-FILTER > <expression> nested inside - and the flat
toggles (ANSI-ONLY, RETURN-TO-START-DIR, LANDSCAPE, ...)
(SCL-5575).
@param piHeadId The SYSTEM-DIALOG statement head node id
*/
|
|
|
|
ParseSystemDialogFilters (integer)
|
Consumes the FILTERS option of a SYSTEM-DIALOG GET-FILE
statement
Notes : Shape per the reference (sysdiagetfile_opt): FILTERS roots its
label / pattern expression pairs, the COMMA between pairs stays
a flat child, and the optional INITIAL-FILTER > <expression>
nests inside the FILTERS subtree. The pair count is fixed by
the grammar ("expression expression (COMMA expression
expression)*"), so the loop never swallows a following
unreserved option keyword as an expression (SCL-5575).
@param piHeadId The SYSTEM-DIALOG statement head node id
*/
|
|
|
|
ParseSystemHelpBody (integer)
|
Structures the body of a SYSTEM-HELP statement
Notes : Shape per the reference (systemhelpstate): SYSTEM-HELP > { the
help file expression, [WINDOW-NAME > <expression>], the option
- the expression-taking options root their argument,
MULTIPLE-KEY > { <expression>, TEXT, <expression> },
POSITION > { MAXIMIZE | X / Y / WIDTH / HEIGHT with their
expressions flat }, CONTENTS / FINDER / FORCE-FILE / HELP /
QUIT stay flat } (SCL-5574).
@param piHeadId The SYSTEM-HELP statement head node id
*/
|
|
|
|
ParseThisObjectBody (integer)
|
Structures the body of a THIS-OBJECT ( ... ) constructor
chaining statement (after its head token)
Notes : Shape per the reference thisobjectstate: THISOBJECT >
{ LEFTPAREN, INPUT > <argument>, COMMA, ..., RIGHTPAREN,
PERIOD } - a parameterlist_noroot, so the items sit directly
under the head with their INPUT wrappers (SCL-5763)
@param piHeadId The THIS-OBJECT statement head node id
*/
|
|
|
|
INTEGER ParseTokens (ListProToken)
|
Parses an already lexed token stream into a record AST
Notes : Hidden tokens (whitespace / comments / markers) are attached to
the following natural node; they are not required to be filtered
out by the caller.
@param poTokens The token stream (as produced by FoldedLexer:GetTokenList)
@return The Program_root node id
*/
|
|
|
|
ParseTriggerBody (integer)
|
Structures the body of a TRIGGER PROCEDURE statement (after
TRIGGER)
Notes : Shape: TRIGGER > { PROCEDURE, FOR, <event>, OF, RECORD_NAME,
..., PERIOD }. Only a database event makes the name after OF a
RECORD_NAME - the ASSIGN trigger names a field, mirroring the
ON statement (SCL-5486, SCL-5468). The NEW / OLD BUFFER clauses
stay flat.
@param piHeadId The TRIGGER statement head node id
*/
|
|
|
|
ParseTriggersPhrase (integer)
|
Parses a TRIGGERS phrase of a CREATE widget statement
Notes : Mirrors the reference grammar's triggerphrase rule:
TRIGGERS > { LEXCOLON, Code_block > (ON > { Event_list,
[ANYWHERE], PERSISTENT + RUN statement | <statement> })*,
END > [TRIGGERS] }. The trigger RUN is a full statement head
whose target merges into one FILENAME like any other RUN
(SCL-5530). The DEFINE BUTTON / IMAGE / MENU-ITEM / RECTANGLE
/ VARIABLE forms may carry the same phrase and still parse it
flat - wire them up when a fixture pins them.
@param piHeadId The CREATE statement head node id
*/
|
|
|
|
ParseTypelessTail (integer)
|
Consumes the remaining tokens of a statement up to the
terminating PERIOD as TYPELESS_TOKEN children of a node
Notes : The reference grammar's anyorvalue tail: once an option the
grammar does not know starts, every following token loses its
type (SCL-5754). A VALUE ( expression ) keeps its VALUE node.
@param piParentId The parent node id
*/
|
|
|
|
ParseUndoBody (integer)
|
Structures the body of an UNDO statement (after its head token)
Notes : Shape: UNDO > { [BLOCK_LABEL], COMMA, THROW > <expression> |
RETURN > <expression> | LEAVE / NEXT / RETRY > [BLOCK_LABEL],
PERIOD }, verified against the .NET AST for the THROW form.
@param piHeadId The UNDO statement head node id
*/
|
|
|
|
ParseUsingBody (integer)
|
Structures the body of a USING statement (after its head token)
Notes : Shape: USING > { TYPE_NAME, [ FROM > { PROPATH | ASSEMBLY } ],
PERIOD }. The reference engine folds the whole qualified name -
including a trailing wildcard - into a single TYPE_NAME node
(SCL-5470). The lexer already yields "Progress.Lang." as one
token, so only the "*" has to be folded in; it is skipped rather
than consumed, so it leaves no node of its own.
@param piHeadId The USING statement head node id
*/
|
|
|
|
ParseValueOption (integer)
|
Parses a VALUE option rooting its parenthesized argument
Notes : The reference's valueexpression rule ("VALUE^ LEFTPAREN
expression RIGHTPAREN") makes the VALUE node the parent of the
parenthesis pair and the argument expression, so a variable
argument nests as a Field_ref child (SCL-5560).
@param piParentId The parent node id
*/
|
|
|
|
ParseVarBody (integer)
|
Structures the body of a VAR statement (after its head token)
Notes : The OpenEdge 12 inline variable declaration, whose head token is
VARIABLE ("var" is an abbreviation of "variable"). Shape:
VARIABLE > { <access modifiers>, <data type>, [LEFTBRACE,
[NUMBER], RIGHTBRACE], ID, [EQUAL > <initializer>], COMMA, ID,
..., PERIOD }. Everything stays flat except the "=", which owns
its initializer - a plain expression, or a bracketed array
literal whose braces and commas stay flat inside the EQUAL.
*
Note the array marker of the TYPE ("var int[5] i") is flat under
the head; only the initializer nests.
@param piHeadId The VAR statement head node id
*/
|
|
|
|
ParseVarInitializer (integer)
|
Parses the initializer of one VAR statement variable
Notes : An array literal ( [ 1, 2, 3 ] ) is consumed flat into the EQUAL
node - the reference does not build an Array_subscript for it -
and anything else is a plain expression.
@param piEqualId The EQUAL node id
*/
|
|
|
|
ParseViewAsPhrase (integer)
|
Parses a VIEW-AS phrase (VIEW-AS ALERT-BOX ...) of a MESSAGE
statement
Notes : Shape: VIEWAS > { ALERTBOX, <alert-box options>, TITLE > <expr> }.
The phrase ends at the terminating PERIOD, an UPDATE / SET / WITH
clause or the next displayed expression.
@param piHeadId The MESSAGE statement head node id
*/
|
|
|
|
ParseViewHideBody (integer)
|
Structures the body of a VIEW / HIDE statement (after its head token)
Notes : Shape: <head> > { [ STREAM > <name> ], [ ALL | MESSAGE ],
<Widget_ref>*, ..., PERIOD }. viewstate and hidestate both take
a (gwidget)* list, so each widget nests in a synthetic
Widget_ref; HIDE ALL and HIDE MESSAGE are alternatives to that
list in the grammar and stay flat keywords (SCL-5521).
@param piHeadId The VIEW / HIDE statement head node id
*/
|
|
|
|
ParseWaitForBody (integer)
|
Structures the body of a WAIT-FOR statement
Notes : Two forms, decided - as in the reference grammar - by the token
after the first one: OF or COMMA means the classic
"<events> OF <widgets>" form; anything else is the .NET
"WAIT-FOR <expression> [SET <field>]" form, whose expression
the expression parser already shapes (Widget_ref chain with
Method_param_list) (SCL-5543).
@param piHeadId The WAITFOR statement head node id
*/
|
|
|
|
ParseWaitForWidget (integer)
|
Parses a widget reference into a Widget_ref wrapper node
Notes : The WAIT-FOR widget positions (OF / FOCUS) wrap the reference
in a Widget_ref: a system-handle keyword sits directly under
it, anything else parses as a reference (Field_ref, or a
chain) (SCL-5543).
@param piParentId The node the widget reference belongs to
*/
|
|
|
|
ParseWhenClause (integer)
|
Parses one WHEN clause of a CASE statement
Notes : Structure: WHEN > { <value>, THEN, <blockorstate> }. The branch is
a child of the WHEN node (sibling of THEN), framed by the ordinary
statement framer.
@param piBlockId The CASE Code_block node id
*/
|
|
|
|
ParseWhenValue (integer)
|
Parses the value list of a WHEN clause (up to THEN)
Notes : A top-level OR is the value-list separator (not a boolean
operator), so each operand is parsed at AND-level and the OR /
nested WHEN grouping is built here to match the .NET Proparse
shape: WHEN > { OR > { <val>, WHEN > <val> }, ... }. Any tokens
the ExpressionParser did not consume before THEN are added flat,
so no token is lost.
@param piWhenId The WHEN node id
*/
|
|
|
|
ParseWidgetAssignList (integer)
|
Parses a widget-attribute assignment list (HIDDEN = YES
TITLE = "..." ...) under an ASSIGN option node
Notes : Each assignment is shaped EQUAL > { <attribute>, <value
expression> }, matching the reference grammar's assign_opt2
rule. The attribute keeps its keyword token type - a widget
attribute is not an identifier position (SCL-5490). The list
ends at the first token that is not followed by "=".
@param piAssignId The ASSIGN option node id
*/
|
|
|
|
ParseWidgetList (integer)
|
Parses a run of widget references, each into its own Widget_ref
Notes : The (gwidget)* repetition of deletewidgetstate / viewstate /
hidestate - unlike the widgetlist of ON ... OF, these are not
comma separated (SCL-5521).
@param piParentId The parent node id
*/
|
|
|
|
LOGICAL ParseWidgetRef (integer)
|
Parses one widget reference into a synthetic Widget_ref node
Notes : gwidget = s_widget (inuic)?, wrapped in a Widget_ref
(proparse.g ~879). A plain name nests additionally in a
Field_ref; a system handle (THIS-PROCEDURE, SELF, ...) sits
directly under the Widget_ref; a keyword-prefixed widname form
(FRAME f, MENU m, BUFFER b, ...) puts the widget-kind keyword
and the name directly under the Widget_ref (SCL-5562).
@param piParentId The parent node id
@return TRUE when a widget reference was consumed
*/
|
|
|
|
ParseWidgetType (integer)
|
Parses the widget type of a VIEW-AS option and its own options
Notes : VIEW-AS FILL-IN SIZE 9 BY 1 nests the SIZE under the FILL-IN,
not under the VIEW-AS.
@param piViewAsId The VIEW-AS node id
*/
|
|
|
|
ParseWithClause (integer)
|
Parses a WITH frame phrase
Notes : Recognizes the "expression DOWN" (With_down, the reference's
frame_exp_down) and "n COLUMN[S]" (With_columns, frame_exp_col)
forms and the expression-rooting ROW option (SCL-5555); any
other frame-phrase option is added as a flat child of the WITH
node.
@param piParentId The parent node id
*/
|
|
|
|
ParseWrapValue (integer)
|
Parses a keyword clause whose value nests under it
Notes : Consumes the clause keyword, then wraps a single following value
token (INITIAL / FORMAT / LABEL / FILE / EDGE-PIXELS / ...) as its
child.
@param piParentId The parent node id
*/
|
|
|
|
INTEGER PeekAccessorKind ()
|
Looks ahead past access modifiers to the GET / SET keyword that
begins an accessor, without moving the cursor
Notes :
@return iTypeGet or iTypeSet, or 0 when neither follows
*/
|
|
|
|
RegisterMethodName (character)
|
Registers a keyword-colliding method name of the current unit
Notes : Shared with the ExpressionParser: a call to such a method is
typed LOCAL_METHOD_REF, beating the same-named built-in
function ("methods take precedent over built-in functions",
SCL-5499)
@param pcName The method name as written
*/
|
|
|
|
RegisterTableName (integer)
|
Registers a declared temp-table / work-table / buffer name
Notes : The name node is the one ConsumeName returned for the
definition (SCL-5741)
@param piNameNodeId The name node id (0 when no name was consumed)
*/
|
|
|
|
RegisterVariableName (integer)
|
Registers a declared variable / parameter name
Notes : The name node is the one ConsumeName returned for the
definition; a variable named like a table shadows the table
in the isTableName predicate from here on (SCL-5781)
@param piNameNodeId The name node id (0 when no name was consumed)
*/
|
|
|
|
RegisterVariableNameText (character)
|
Registers a declared variable / parameter name by its text
Notes : See RegisterVariableName (SCL-5781)
@param pcName The variable name
*/
|
|
|
|
ResolveAaTraceState2 (integer)
|
Sets the STATE2 attribute of an AATRACE statement head
Notes : AATRACE splits three ways in the reference grammar: OFF and ON
(aatraceonoffstate) and CLOSE (aatraceclosestate). CLOSE may be
preceded by a stream name or handle, so the discriminator is not
necessarily the second token and the remaining header tokens are
scanned for it (SCL-5532).
@param piHeadId The AATRACE statement head node id
*/
|
|
|
|
ResolveCreateState2 (integer, integer)
|
Sets the STATE2 attribute of a CREATE statement head
Notes : CREATE has three sub-type shapes the reference distinguishes:
a QSTRING second element is the automation-object form
(state2 = Automationobject, a synthetic node type - the token
itself is a quoted ProgID); a widget-kind keyword is the widget
form (state2 = WIDGET, which never appears in the source); and
the remaining object-type keywords are their own state2.
*
A plain CREATE <record> gets NO state2. The dynamic widget form
CREATE <value-expression> <field> is not recognised here: it is
indistinguishable from CREATE <record> without resolving the
following element, so it currently keeps state2 = 0 rather than
risk mis-typing a record create (SCL-5532).
@param piHeadId The CREATE statement head node id
@param piNextType The token type of the second natural token
*/
|
|
|
|
ResolveState2 (integer, integer)
|
Sets the STATE2 attribute of a freshly framed statement head
Notes : Called after the head token has been consumed, so CurrentType ()
is the statement's second natural token - which is the state2
value for every family in cState2Map. CREATE and AATRACE are
resolved by their own handlers; DEFINE by ParseDefineBody.
A statement with no sub-type keeps state2 = 0, matching the
reference engine (SCL-5532).
@param piHeadId The statement head node id
@param piHeadType The token type of the statement head
*/
|
|
|
|
ScanFlatToPeriod (integer)
|
Consumes remaining tokens flat as children of a node up to (but
not including) the terminating PERIOD
Notes :
@param piParentId The parent node id
*/
|
|
|
|
ScanParameterItemOptions (integer)
|
Consumes the remaining options of one parameter definition
flat, up to the comma or the closing parenthesis
Notes : APPEND / BY-VALUE / BY-REFERENCE / BIND / NO-UNDO / INITIAL
and the like (SCL-5775)
@param piModeId The mode (or BUFFER) node of the parameter
*/
|
|
|
|
ScanScalarOptions (integer, logical)
|
Scans the option clauses of a scalar definition (variable /
scalar parameter): AS / LIKE / EXTENT / INITIAL / FORMAT / LABEL
and any other option token (flat), up to the terminating PERIOD
Notes :
@param piParentId The node the options are added under
@param plNestAs Whether an AS data type nests under the AS node
*/
|
|
|
|
SkipHidden ()
|
Skips hidden tokens at the cursor, queueing them in the node
store as pending leading hidden segments
Notes : The segments keep the token type and origin (file index / macro
source number), which the source writer needs to reproduce the
original top-level source (SCL-5479)
*/
|
|
|
|
SkipToken ()
|
Skips the current natural token without creating a node for it
Notes : Used when a token's text is folded into a node that was already
created, so the token must not appear as a node of its own.
*/
|
|
|
|
LOGICAL StartsEditingPhrase (integer)
|
Returns whether an editing phrase starts at the current token
Notes : editingphrase = (identifier LEXCOLON)? EDITING block_colon
(blockorstate)* END (proparse.g ~2716), so the phrase starts
either at the EDITING keyword itself or at the optional block
label in front of it (SCL-5516).
@param piType The current token type
@return Logical value
*/
|
|
|
|
LOGICAL StartsExpression (integer)
|
Returns whether a token type can start an expression
Notes : Used at statement positions where an expression must be told
apart from an option keyword (a form item vs. VIEW-AS, ...). A
keyword directly followed by "(" is a built-in function call and
also starts an expression.
@param piType The token type
@return Logical value
*/
|
|
|
|
Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.ProToken TokenAt (integer)
|
Returns the token at a 1-based index in the stream
Notes : The list stores the ProToken references created by the lexer; no
new object is allocated per access.
@param piIndex The 1-based token index
@return The ProToken
*/
|