|
Options |
Name |
Purpose |
|
|
|
INTEGER AmpIfDefArg ()
|
Gathers a raw DEFINED() argument up to the closing paren
Notes : Mirrors Lexer:AmpIfDefArg. Skips block comments.
@return PREPROCESSTOKEN (carrying the raw argument text)
*/
|
|
|
|
INTEGER AmpText ()
|
Scans an ampersand word and dispatches to a directive
Notes : Mirrors Lexer:AmpText / Directive. The leading '&' is already in
the text buffer and the current char is the char after it.
@return the directive token type, or FILENAME for an unrecognized &word
*/
|
|
|
|
Append ()
|
Appends the raw current character to the token text buffer
Notes : Mirrors Lexer:Append.
*/
|
|
|
|
AppendComment ()
|
Consumes a block comment embedded in a directive line,
appending its text to the accumulated directive text
Notes : Mirrors the Lexer:Comment call from Lexer:AppendToEOL: the same
nesting-aware scan with escapes preserved and macros not
expanded, but no COMMENT token is emitted - the reference
discards the token object comment() builds, while MakeToken
here writes straight into the token stream (SCL-5527).
Expects the current char to be the '*' after the already
appended '/'; finishes on the char after the closing slash.
*/
|
|
|
|
AppendToEOL ()
|
Appends characters up to an unescaped end of line
Notes : Mirrors Lexer:AppendToEOL. A comment embedded in the directive
text is consumed as part of it - however many lines it spans -
so its continuation lines never leak into the token stream
(SCL-5527); MacroDefine strips it from the value again.
Brace expansion is suppressed for the rest of the line: a macro
reference in a directive definition stays raw in the directive
text and in the stored macro value, and is expanded when the
define is referenced - as in the reference engine (SCL-5479).
*/
|
|
|
|
INTEGER AtStart ()
|
Scans an @ token (LEXAT or an annotation)
Notes : Mirrors the '@' branch of Lexer:NextToken.
@return LEXAT / ANNOTATION
*/
|
|
|
|
CaptureStart ()
|
Captures the current preprocessor position as the token start
Notes :
*/
|
|
|
|
INTEGER Colon ()
|
Scans a colon token (::, LEXCOLON or OBJCOLON)
Notes : Mirrors Lexer:Colon. Assumes the ':' was consumed.
@return DOUBLECOLON / LEXCOLON / OBJCOLON
*/
|
|
|
|
INTEGER Comment ()
|
Scans a block comment (nesting-aware)
Notes : Mirrors Lexer:Comment. Assumes the leading '/' was consumed and
the current char is '*'.
@return COMMENT
*/
|
|
|
|
LONGCHAR CurrentText ()
|
Returns the accumulated token text as a longchar
Notes :
@return The token text
*/
|
|
|
|
INTEGER DigitStart ()
|
Scans a number / date / filename starting with a digit
Notes : Mirrors Lexer:DigitStart.
@return NUMBER, LEXDATE, ID or FILENAME
*/
|
|
|
|
INTEGER Directive ()
|
Recognizes an ampersand directive by its accumulated text
Notes : Mirrors Lexer:Directive. &DEFINE / &UNDEFINE are applied to the
preprocessor here; the &IF family is emitted as AMP* tokens for
the postlexer stage.
*
The three abbreviated directives test whether the accumulated
text is a PREFIX of the full directive name - the reference
lexer's "&global-define".startsWith (macroType) - not the other
way round, so &GLO / &GLOBAL / &SCO / &UNDEF are recognized and
an over-long name such as &GLOBALX is not (SCL-5517). The
minimum length is four characters for &GLOBAL-DEFINE and
&SCOPED-DEFINE and five for &UNDEFINE. Every other directive is
matched in full, as in the reference.
@return the directive token type, or FILENAME
*/
|
|
|
|
DropLastToken ()
|
Removes the most recently appended token record
Notes : AMP* / dead-branch tokens must not remain in the store.
*/
|
|
|
|
CHARACTER EvaluateDefined ()
|
Reduces a DEFINED() reference to its numeric status string
Notes : Mirrors Postlexer:EvaluateDefined. Reads (, the argument, ).
Named EvaluateDefined because a method named "Defined"
crashes the OpenEdge 11.7 compiler (SCL-5595).
@return "0".."3"
*/
|
|
|
|
GetChar ()
|
Reads the next cooked character from the preprocessor
Notes : iCurrInt keeps the raw code (with negative sentinels); iCurrChar
is the lowercased code (or the sentinel unchanged).
*/
|
|
|
|
Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.ListProToken GetTokenList ()
|
Materializes the stored tokens as a ProToken list
Notes : Lazy materialization from the record store.
@return The token list
*/
|
|
|
|
INTEGER GreaterStart ()
|
Scans a '>' token (RIGHTANGLE or GTOREQUAL)
Notes :
@return RIGHTANGLE / GTOREQUAL
*/
|
|
|
|
INTEGER Id (integer)
|
Scans an identifier / keyword (or filename) from the current char
Notes : Mirrors Lexer:Id.
@param piType The starting type (ID or FILENAME)
@return The resolved token type
*/
|
|
|
|
LOGICAL IfLastConsuming ()
|
Returns the Consuming flag of the top &IF frame
Notes :
@return Logical value
*/
|
|
|
|
LOGICAL IfLastDone ()
|
Returns the Done flag of the top &IF frame
Notes :
@return Logical value
*/
|
|
|
|
IfPop ()
|
Pops the top &IF state frame
Notes :
*/
|
|
|
|
IfPush ()
|
Pushes a new &IF state frame
Notes :
*/
|
|
|
|
IfSetLastConsuming (logical)
|
Sets the Consuming flag of the top &IF frame
Notes :
@param plValue The value
*/
|
|
|
|
IfSetLastDone (logical)
|
Sets the Done flag of the top &IF frame
Notes :
@param plValue The value
*/
|
|
|
|
INTEGER IfStateCol (integer)
|
Returns the source column of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-5648)
@param piLevel The level
@return The column number, or 0
*/
|
|
|
|
LOGICAL IfStateConsuming (integer)
|
Returns the Consuming flag of a given &IF level
Notes :
@param piLevel The level
@return Logical value
*/
|
|
|
|
CHARACTER IfStateFile (integer)
|
Returns the source file of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-3366)
@param piLevel The level
@return The file name, or the empty string
*/
|
|
|
|
INTEGER IfStateLine (integer)
|
Returns the source line of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-3366)
@param piLevel The level
@return The line number, or 0
*/
|
|
|
|
LOGICAL IsIdentifierPart (integer)
|
Returns whether the current char can extend an identifier
Notes : Letters, digits, _ - $ # % & and bytes 128..255.
@param piChar The character code
@return Logical value
*/
|
|
|
|
LOGICAL IsSpace (integer)
|
Returns whether a code is whitespace
Notes :
@param piChar The character code
@return Logical value
*/
|
|
|
|
INTEGER LessStart ()
|
Scans a '<' token (LEFTANGLE, GTORLT or LTOREQUAL)
Notes :
@return LEFTANGLE / GTORLT / LTOREQUAL
*/
|
|
|
|
INTEGER LookupKeyword (character)
|
Resolves an identifier to its token type, with caching
Notes :
@param pcText The identifier text
@return The keyword token type or ID
*/
|
|
|
|
MacroDefine (logical)
|
Applies a &SCOPED / &GLOBAL define from the accumulated text
Notes : Mirrors Lexer:MacroDefine. No-op while consuming a dead &IF branch.
@param plScoped True for &SCOPED-DEFINE, false for &GLOBAL-DEFINE
*/
|
|
|
|
MacroUndefine ()
|
Applies a &UNDEFINE from the accumulated text
Notes : Mirrors Lexer:MacroUndefine. No-op while consuming a dead branch.
*/
|
|
|
|
INTEGER MakeToken (integer)
|
Emits a token of the given type using the accumulated text
Notes :
@param piType The token type
@return The token type (for the caller's convenience)
*/
|
|
|
|
INTEGER MakeTokenAt (integer, character, integer, integer, integer, integer)
|
Emits a token with explicit text and explicit position
Notes : Used for the include / macro reference markers, whose position
is the origin of the reference captured by the preprocessor -
not the current scan position, which already sits inside the
referenced content (SCL-5479)
@param piType The token type
@param pcText The token text
@param piFile The file index of the reference
@param piLine The line of the reference
@param piCol The column of the reference
@param piSrc The source number of the frame containing the reference
@return The token type
*/
|
|
|
|
INTEGER MakeTokenText (integer, character)
|
Emits a token of the given type with explicit text
Notes :
@param piType The token type
@param pcText The token text
@return The token type
*/
|
|
|
|
MergeNameDots ()
|
Merges a qualified name whose dot is separated from the record
name by whitespace - customer .custnum - into one ID token
Notes : The OpenEdge compiler accepts the whitespace, and the reference
lexer yields the same ID token as for customer.custnum; the
whitespace between the name and the dot is dropped with the
dot and the field name (SCL-5776). Only a NAMEDOT that is
directly followed by the field name qualifies - the lexer
already merged the adjacent form while scanning the name.
*/
|
|
|
|
INTEGER NextMeaningfulToken ()
|
Returns the next meaningful token, resolving &IF regions
Notes : Mirrors Postlexer:NextToken. AMP* tokens and the tokens of dead
branches are consumed here and never returned.
@return The token type of the returned token, or EOF
*/
|
|
|
|
INTEGER NextTokenRaw ()
|
Produces the next raw token (including WS / COMMENT / AMP*)
Notes : Mirrors Lexer:NextToken. Returns the token type; the token is
stored as a record in ttToken.
@return The token type
*/
|
|
|
|
INTEGER PeriodStart ()
|
Scans a token starting with a period
Notes : Mirrors Lexer:PeriodStart. A leading-dot number is a NUMBER;
otherwise NAMEDOT (name-dot) or PERIOD.
@return NUMBER / NAMEDOT / PERIOD
*/
|
|
|
|
INTEGER PlusMinusStart (integer)
|
Scans a token starting with + or -
Notes : Mirrors Lexer:PlusMinusStart.
@param piSignType PLUS or MINUS (used when the text is a lone sign)
@return NUMBER / FILENAME / PLUS / MINUS
*/
|
|
|
|
PreproConsume ()
|
Skips the tokens of a compiled-out &IF branch
Notes : Mirrors Postlexer:PreproConsume.
*/
|
|
|
|
PreproElse ()
|
Handles an &ELSE directive
Notes : Mirrors Postlexer:PreproElse.
*/
|
|
|
|
PreproElseif ()
|
Handles an &ELSEIF directive
Notes : Mirrors Postlexer:PreproElseif.
*/
|
|
|
|
PreproEndif ()
|
Handles an &ENDIF directive
Notes : Mirrors Postlexer:PreproEndif.
*/
|
|
|
|
PreproIf ()
|
Handles an &IF directive
Notes : Mirrors Postlexer:PreproIf.
*/
|
|
|
|
LOGICAL PreproIfCond (logical)
|
Collects and evaluates an &IF / &ELSEIF condition up to &THEN
Notes : Mirrors Postlexer:PreproIfCond.
@param plEvaluate Whether to evaluate (false = just consume to &THEN)
@return The condition result
*/
|
|
|
|
INTEGER QuotedString ()
|
Scans a quoted string
Notes : Mirrors Lexer:QuotedString. Doubled quotes are embedded; string
attributes after the closing quote (":r12" etc.) are appended.
A macro reference inside the string is expanded into the token
text (the view the parser needs), while a parallel raw capture
keeps the verbatim source - the unexpanded reference and only
the characters of the string's own source frame - which the
source writer emits (SCL-5479).
@return QSTRING
*/
|
|
|
|
RawAppendByte (integer)
|
Appends a byte to the string raw capture when it belongs to the
string's own source frame
Notes : Characters produced by an expansion carry a different source
number and are represented by the reference text instead
@param piChar The character code
*/
|
|
|
|
RawAppendCurrent ()
|
Appends the current character (reconstructing a raw escape) to
the string raw capture when it belongs to the string's own frame
Notes : Mirrors UnEscapedAppend for the raw capture
*/
|
|
|
|
RawAppendString (character)
|
Appends text to the string raw capture, guarding the CHARACTER limit
Notes :
@param pcText The text to append
*/
|
|
|
|
RawDrainMarkers ()
|
Moves any macro / include reference markers that fired inside
the current string into its raw capture
Notes : A reference inside a string expands into the token text; the
raw capture keeps the verbatim reference instead, and the
marker must not surface as a stream token of its own (SCL-5479)
*/
|
|
|
|
INTEGER SingleCharToken (integer)
|
Emits a single-character token and advances
Notes :
@param piType The token type
@return The token type
*/
|
|
|
|
INTEGER SingleComment ()
|
Scans a single-line comment
Notes : Mirrors Lexer:SingleComment. Reads to an unescaped newline.
@return COMMENT
*/
|
|
|
|
SkipBlockComment ()
|
Consumes a block comment without emitting a token
Notes : Assumes the leading '/' was consumed and current char is '*'.
*/
|
|
|
|
INTEGER SlashStart ()
|
Scans a slash: block comment, single comment or slash operators
Notes : Mirrors the '/' branch of Lexer:NextToken.
@return COMMENT / SLASH / DIVIDE_EQUAL / FILENAME
*/
|
|
|
|
INTEGER StarStart ()
|
Scans a star token (STAR or MULTIPLY_EQUAL)
Notes :
@return STAR / MULTIPLY_EQUAL
*/
|
|
|
|
StringAttributes ()
|
Appends a trailing string attribute clause (:letters/digits)
Notes : The character that ended the attributes stays unconsumed in
iCurrInt, so it becomes the start of the next token.
*/
|
|
|
|
CHARACTER StripComments (character)
|
Removes (nesting-aware) block comments from a define value
Notes : Mirrors Lexer:StripComments.
@param pcText The text
@return The text with block comments removed
*/
|
|
|
|
INTEGER Symbol ()
|
Scans a single- or multi-character symbol / operator
Notes : Mirrors the punctuation branches of Lexer:NextToken.
@return The punctuation token type
*/
|
|
|
|
TextAppendByte (integer)
|
Appends a single character code to the token text buffer
Notes :
@param piChar The character code
*/
|
|
|
|
TextAppendRun (character)
|
Appends a whole run of characters to the token text buffer in one
operation (bulk PUT-STRING)
Notes : Used by the fast block-scan path to avoid a method call per
character. The run is raw text (no escapes), so it is copied
verbatim.
@param pcRun The run text
*/
|
|
|
|
TextAppendString (character)
|
Appends the characters of a string to the token text buffer
Notes :
@param pcText The text to append
*/
|
|
|
|
TextGrow (integer)
|
Grows the token text buffer, preserving its content
Notes :
@param piNewCap The new capacity
*/
|
|
|
|
TextReset ()
|
Resets the token text accumulation buffer
Notes :
*/
|
|
|
|
INTEGER Tokenize ()
|
Tokenizes the whole source into the record token store
Notes : Excludes the terminal EOF token from the store.
@return The number of tokens stored
*/
|
|
|
|
UnEscapedAppend ()
|
Appends the current character, reconstructing the raw escape text
Notes : Mirrors Lexer:UnEscapedAppend. Inside comments / strings the
original source bytes of an escape (~n etc.) are preserved.
*/
|
|
|
|
INTEGER Whitespace ()
|
Scans a whitespace run
Notes : Mirrors Lexer:Whitespace. Breaks the run at an include-file
boundary so a WS token never spans includes, and equally at a
macro-expansion boundary (a pending macro marker or a changed
source number), so a WS token never mixes top-level whitespace
with whitespace produced by an expansion (SCL-5479).
@return WS
*/
|