Top Method Summary
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 */

Top Constructor Summary
Options Name Purpose
FoldedLexer (FoldedPreprocessor) Constructor for the FoldedLexer class Notes : @param poPrepro The preprocessor character engine to tokenize */


Method Detail
Top

INTEGER AmpIfDefArg ()

Purpose: Gathers a raw DEFINED() argument up to the closing paren
Notes : Mirrors Lexer:AmpIfDefArg. Skips block comments.

Returns INTEGER
PREPROCESSTOKEN (carrying the raw argument text)
Top

INTEGER AmpText ()

Purpose: 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.

Returns INTEGER
the directive token type, or FILENAME for an unrecognized &word
Top

Append ()

Purpose: Appends the raw current character to the token text buffer
Notes : Mirrors Lexer:Append.

Top

AppendComment ()

Purpose: 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.

Top

AppendToEOL ()

Purpose: 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).

Top

INTEGER AtStart ()

Purpose: Scans an @ token (LEXAT or an annotation)
Notes : Mirrors the '@' branch of Lexer:NextToken.

Returns INTEGER
LEXAT / ANNOTATION
Top

CaptureStart ()

Purpose: Captures the current preprocessor position as the token start
Notes :

Top

INTEGER Colon ()

Purpose: Scans a colon token (::, LEXCOLON or OBJCOLON)
Notes : Mirrors Lexer:Colon. Assumes the ':' was consumed.

Returns INTEGER
DOUBLECOLON / LEXCOLON / OBJCOLON
Top

INTEGER Comment ()

Purpose: Scans a block comment (nesting-aware)
Notes : Mirrors Lexer:Comment. Assumes the leading '/' was consumed and
the current char is '*'.

Returns INTEGER
COMMENT
Top

LONGCHAR CurrentText ()

Purpose: Returns the accumulated token text as a longchar
Notes :

Returns LONGCHAR
The token text
Top

INTEGER DigitStart ()

Purpose: Scans a number / date / filename starting with a digit
Notes : Mirrors Lexer:DigitStart.

Returns INTEGER
NUMBER, LEXDATE, ID or FILENAME
Top

INTEGER Directive ()

Purpose: 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.

Returns INTEGER
the directive token type, or FILENAME
Top

DropLastToken ()

Purpose: Removes the most recently appended token record
Notes : AMP* / dead-branch tokens must not remain in the store.

Top

CHARACTER EvaluateDefined ()

Purpose: 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).

Returns CHARACTER
"0".."3"
Top

GetChar ()

Purpose: 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).

Top

Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.ListProToken GetTokenList ()

Purpose: Materializes the stored tokens as a ProToken list
Notes : Lazy materialization from the record store.

Returns Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.ListProToken
The token list
Top

INTEGER GreaterStart ()

Purpose: Scans a '>' token (RIGHTANGLE or GTOREQUAL)
Notes :

Returns INTEGER
RIGHTANGLE / GTOREQUAL
Top

INTEGER Id (integer)

Purpose: Scans an identifier / keyword (or filename) from the current char
Notes : Mirrors Lexer:Id.

Parameters:
piType INTEGER
The starting type (ID or FILENAME)
Returns INTEGER
The resolved token type
Top

LOGICAL IfLastConsuming ()

Purpose: Returns the Consuming flag of the top &IF frame
Notes :

Returns LOGICAL
Logical value
Top

LOGICAL IfLastDone ()

Purpose: Returns the Done flag of the top &IF frame
Notes :

Returns LOGICAL
Logical value
Top

IfPop ()

Purpose: Pops the top &IF state frame
Notes :

Top

IfPush ()

Purpose: Pushes a new &IF state frame
Notes :

Top

IfSetLastConsuming (logical)

Purpose: Sets the Consuming flag of the top &IF frame
Notes :

Parameters:
plValue LOGICAL
The value
Top

IfSetLastDone (logical)

Purpose: Sets the Done flag of the top &IF frame
Notes :

Parameters:
plValue LOGICAL
The value
Top

INTEGER IfStateCol (integer)

Purpose: Returns the source column of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-5648)

Parameters:
piLevel INTEGER
The level
Returns INTEGER
The column number, or 0
Top

LOGICAL IfStateConsuming (integer)

Purpose: Returns the Consuming flag of a given &IF level
Notes :

Parameters:
piLevel INTEGER
The level
Returns LOGICAL
Logical value
Top

CHARACTER IfStateFile (integer)

Purpose: Returns the source file of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-3366)

Parameters:
piLevel INTEGER
The level
Returns CHARACTER
The file name, or the empty string
Top

INTEGER IfStateLine (integer)

Purpose: Returns the source line of the &IF at the given stack level
Notes : Used by the unbalanced-conditional error message (SCL-3366)

Parameters:
piLevel INTEGER
The level
Returns INTEGER
The line number, or 0
Top

LOGICAL IsIdentifierPart (integer)

Purpose: Returns whether the current char can extend an identifier
Notes : Letters, digits, _ - $ # % & and bytes 128..255.

Parameters:
piChar INTEGER
The character code
Returns LOGICAL
Logical value
Top

LOGICAL IsSpace (integer)

Purpose: Returns whether a code is whitespace
Notes :

Parameters:
piChar INTEGER
The character code
Returns LOGICAL
Logical value
Top

INTEGER LessStart ()

Purpose: Scans a '<' token (LEFTANGLE, GTORLT or LTOREQUAL)
Notes :

Returns INTEGER
LEFTANGLE / GTORLT / LTOREQUAL
Top

INTEGER LookupKeyword (character)

Purpose: Resolves an identifier to its token type, with caching
Notes :

Parameters:
pcText CHARACTER
The identifier text
Returns INTEGER
The keyword token type or ID
Top

MacroDefine (logical)

Purpose: Applies a &SCOPED / &GLOBAL define from the accumulated text
Notes : Mirrors Lexer:MacroDefine. No-op while consuming a dead &IF branch.

Parameters:
plScoped LOGICAL
True for &SCOPED-DEFINE, false for &GLOBAL-DEFINE
Top

MacroUndefine ()

Purpose: Applies a &UNDEFINE from the accumulated text
Notes : Mirrors Lexer:MacroUndefine. No-op while consuming a dead branch.

Top

INTEGER MakeToken (integer)

Purpose: Emits a token of the given type using the accumulated text
Notes :

Parameters:
piType INTEGER
The token type
Returns INTEGER
The token type (for the caller's convenience)
Top

INTEGER MakeTokenAt (integer, character, integer, integer, integer, integer)

Purpose: 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)

Parameters:
piType INTEGER
The token type
pcText CHARACTER
The token text
piFile INTEGER
The file index of the reference
piLine INTEGER
The line of the reference
piCol INTEGER
The column of the reference
piSrc INTEGER
The source number of the frame containing the reference
Returns INTEGER
The token type
Top

INTEGER MakeTokenText (integer, character)

Purpose: Emits a token of the given type with explicit text
Notes :

Parameters:
piType INTEGER
The token type
pcText CHARACTER
The token text
Returns INTEGER
The token type
Top

MergeNameDots ()

Purpose: 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.

Top

INTEGER NextMeaningfulToken ()

Purpose: 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.

Returns INTEGER
The token type of the returned token, or EOF
Top

INTEGER NextTokenRaw ()

Purpose: 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.

Returns INTEGER
The token type
Top

INTEGER PeriodStart ()

Purpose: Scans a token starting with a period
Notes : Mirrors Lexer:PeriodStart. A leading-dot number is a NUMBER;
otherwise NAMEDOT (name-dot) or PERIOD.

Returns INTEGER
NUMBER / NAMEDOT / PERIOD
Top

INTEGER PlusMinusStart (integer)

Purpose: Scans a token starting with + or -
Notes : Mirrors Lexer:PlusMinusStart.

Parameters:
piSignType INTEGER
PLUS or MINUS (used when the text is a lone sign)
Returns INTEGER
NUMBER / FILENAME / PLUS / MINUS
Top

PreproConsume ()

Purpose: Skips the tokens of a compiled-out &IF branch
Notes : Mirrors Postlexer:PreproConsume.

Top

PreproElse ()

Purpose: Handles an &ELSE directive
Notes : Mirrors Postlexer:PreproElse.

Top

PreproElseif ()

Purpose: Handles an &ELSEIF directive
Notes : Mirrors Postlexer:PreproElseif.

Top

PreproEndif ()

Purpose: Handles an &ENDIF directive
Notes : Mirrors Postlexer:PreproEndif.

Top

PreproIf ()

Purpose: Handles an &IF directive
Notes : Mirrors Postlexer:PreproIf.

Top

LOGICAL PreproIfCond (logical)

Purpose: Collects and evaluates an &IF / &ELSEIF condition up to &THEN
Notes : Mirrors Postlexer:PreproIfCond.

Parameters:
plEvaluate LOGICAL
Whether to evaluate (false = just consume to &THEN)
Returns LOGICAL
The condition result
Top

INTEGER QuotedString ()

Purpose: 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).

Returns INTEGER
QSTRING
Top

RawAppendByte (integer)

Purpose: 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

Parameters:
piChar INTEGER
The character code
Top

RawAppendCurrent ()

Purpose: 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

Top

RawAppendString (character)

Purpose: Appends text to the string raw capture, guarding the CHARACTER limit
Notes :

Parameters:
pcText CHARACTER
The text to append
Top

RawDrainMarkers ()

Purpose: 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)

Top

INTEGER SingleCharToken (integer)

Purpose: Emits a single-character token and advances
Notes :

Parameters:
piType INTEGER
The token type
Returns INTEGER
The token type
Top

INTEGER SingleComment ()

Purpose: Scans a single-line comment
Notes : Mirrors Lexer:SingleComment. Reads to an unescaped newline.

Returns INTEGER
COMMENT
Top

SkipBlockComment ()

Purpose: Consumes a block comment without emitting a token
Notes : Assumes the leading '/' was consumed and current char is '*'.

Top

INTEGER SlashStart ()

Purpose: Scans a slash: block comment, single comment or slash operators
Notes : Mirrors the '/' branch of Lexer:NextToken.

Returns INTEGER
COMMENT / SLASH / DIVIDE_EQUAL / FILENAME
Top

INTEGER StarStart ()

Purpose: Scans a star token (STAR or MULTIPLY_EQUAL)
Notes :

Returns INTEGER
STAR / MULTIPLY_EQUAL
Top

StringAttributes ()

Purpose: 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.

Top

CHARACTER StripComments (character)

Purpose: Removes (nesting-aware) block comments from a define value
Notes : Mirrors Lexer:StripComments.

Parameters:
pcText CHARACTER
The text
Returns CHARACTER
The text with block comments removed
Top

INTEGER Symbol ()

Purpose: Scans a single- or multi-character symbol / operator
Notes : Mirrors the punctuation branches of Lexer:NextToken.

Returns INTEGER
The punctuation token type
Top

TextAppendByte (integer)

Purpose: Appends a single character code to the token text buffer
Notes :

Parameters:
piChar INTEGER
The character code
Top

TextAppendRun (character)

Purpose: 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.

Parameters:
pcRun CHARACTER
The run text
Top

TextAppendString (character)

Purpose: Appends the characters of a string to the token text buffer
Notes :

Parameters:
pcText CHARACTER
The text to append
Top

TextGrow (integer)

Purpose: Grows the token text buffer, preserving its content
Notes :

Parameters:
piNewCap INTEGER
The new capacity
Top

TextReset ()

Purpose: Resets the token text accumulation buffer
Notes :

Top

INTEGER Tokenize ()

Purpose: Tokenizes the whole source into the record token store
Notes : Excludes the terminal EOF token from the store.

Returns INTEGER
The number of tokens stored
Top

UnEscapedAppend ()

Purpose: 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.

Top

INTEGER Whitespace ()

Purpose: 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).

Returns INTEGER
WS


Constructor Detail
Top

FoldedLexer (FoldedPreprocessor)

Purpose: Constructor for the FoldedLexer class
Notes :

Parameters:
poPrepro Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.Lexer.FoldedPreprocessor
The preprocessor character engine to tokenize


©2006-2026 Consultingwerk Ltd.         info@consultingwerk.de         http://www.consultingwerk.de       19.09.2026 10:18:14