Top Method Summary
Options Name Purpose
CheckForNameDot () Determines whether a period is a name-dot Notes : Mirrors Preprocessor:CheckForNameDot. A '.' is a name-dot iff the next character is present and not whitespace. */
DefGlobal (character, character) Defines a global (&GLOBAL-DEFINE) macro Notes : @param pcName The macro name @param pcValue The macro value */
DefScoped (character, character) Defines a scoped (&SCOPED-DEFINE) macro in the current scope Notes : @param pcName The macro name @param pcValue The macro value */
EnqueueIncRef (character) Enqueues an include-file reference marker Notes : Captures the reference origin (TextStart*, the position of the opening brace) so the drained marker token reports where the reference appeared, not where the included content starts @param pcText The reference text */
EnqueueMakroRef (character, character) Enqueues a (&name) macro reference marker Notes : Captures the reference origin (TextStart*) as in EnqueueIncRef @param pcName The full reference text ((&name)) @param pcValue The resolved expansion text */
INTEGER Escape () Handles a backslash / tilde escape sequence Notes : Mirrors Preprocessor:Escape. Only ~n and ~r translate to control characters; ~ at end of line is a line continuation (SKIP_CHAR). @return The resulting character code, or SKIP_CHAR for a line continuation */
CHARACTER EvaluateDefined (character) Returns the DEFINED() status of a macro name Notes : "3" scoped define (local or ancestor), "2" named arg, "1" global, "0" none. Named EvaluateDefined because a method named "Defined" crashes the OpenEdge 11.7 compiler (SCL-5595). @param pcName The macro name @return The status digit as a string */
CHARACTER ExpandMacroReferences (character) Expands the macro / argument references in a text Notes : Used for a define value gathered raw (SuppressBraceExpansion): a &GLOBAL-DEFINE / &SCOPED-DEFINE value is expanded EAGERLY at definition time, the way the real preprocessor behaves - the idiom "&SCOPED-DEFINE ACCESS (&ACCESS)" re-declares an include argument as a scoped define and depends on the right-hand reference resolving to the OUTER value; storing it raw would make the define self-referential (SCL-5479). Only macro ((&name)) and numbered ((n) / (*)) references are expanded; any other brace reference stays verbatim. @param pcText The text to expand @return The expanded text */
CHARACTER ExpandMacroReferences (character, integer) Recursive worker of ExpandMacroReferences Notes : The depth guard stops a (then genuinely cyclic) reference chain @param pcText The text to expand @param piDepth The current expansion depth @return The expanded text */
CHARACTER FastScanRun (integer) Bulk-scans a run of bytes of a self-delimiting character class directly from the current top frame Notes : Convenience overload for the kinds whose run ends at a fixed set of bytes; only kind 4 needs a stop byte of its own. @param piKind 1 = whitespace run, 2 = identifier run, 3 = comment body run @return The scanned run text (empty string if none) */
CHARACTER FastScanRun (integer, integer) Bulk-scans a run of source bytes directly from the current top frame, bypassing the per-character cooked path Notes : None of the character classes contains the trigger bytes { ~ \, so scanning "while in class" stops at every trigger and at the frame boundary automatically; the caller then resumes the char-by-char cooked path for the boundary character. Advances the frame position and replicates FrameGet's line/column accounting exactly. The run is capped at 30000 bytes so the GET-STRING result never exceeds the CHARACTER limit (the caller's loop simply calls again for the remainder). Returns the run text, or the empty string when the fast path does not apply (a lookahead is buffered) or nothing was scanned. Because the run never leaves the current top frame, no macro or include reference can fire inside it and the source number cannot change - which is what lets the string scanner (kind 4) guard its verbatim capture once for the whole run (SCL-5666). @param piKind 1 = whitespace run, 2 = identifier run, 3 = comment body run, 4 = quoted string body run @param piStopByte The additional byte that ends the run (kind 4: the quote that opened the string); ignored by the other kinds @return The scanned run text (empty string if none) */
INTEGER FrameGet () Reads the next byte from the current top frame, advancing its position and (for non-macro sources) line / column Notes : The GET-BYTE fast path replacing InputSource:Get. @return The byte value, or EOF_CHAR when the frame is exhausted */
CHARACTER GetArgText (character) Resolves a macro name to its text (defines, args, built-ins) Notes : Mirrors Preprocessor:GetArgText. Precedence: local scoped define, named include arg, ancestor scoped defines, global define, all-args helpers and built-ins. A miss yields the empty string. @param pcName The macro name (or "*" / "&*") @return The resolved text */
CHARACTER GetArgTextByNum (integer) Resolves a numbered macro argument Notes : Mirrors Preprocessor:GetArgTextByNum. @param piNum The 0-based argument number (arg 0 = referenced name) @return The argument value (or the empty string when out of range) */
INTEGER GetChar () Returns the next cooked character (macro / escape / include handled), one at a time Notes : Mirrors Preprocessor:GetChar. Returns EOF_CHAR at end of input, PROPARSE_DIRECTIVE after a consumed (&_proparse_ directive) directive, or a character code. @return The next character code or a sentinel */
INTEGER GetColumn () Returns the source column of the current character Notes : @return The column number */
INTEGER GetFileIndex () Returns the file index of the current character Notes : @return The file index */
CHARACTER GetFilename (integer) Returns the file name for a given file index Notes : @param piIndex The file index @return The file name (or the empty string if unknown) */
CHARACTER GetFileNames () Returns every file name seen during preprocessing, by file index Notes : The result is a 1-based ABL array whose entry i + 1 holds the name of file index i, which is the layout NodeStore:FileNames expects (a node's FileIndex is zero based). Returns an indeterminate array when no file was opened at all. @return The file names, indexed by file index + 1 */
INTEGER GetLine () Returns the source line of the current character Notes : @return The line number */
GetRawChar () Reads the next raw (un-cooked) character from the source stack Notes : Mirrors Preprocessor:GetRawChar. Handles the pop cascade and the synthetic space injected at an include boundary. */
INTEGER GetSourceNum () Returns the source number of the current character Notes : @return The source number */
HandleIncludeReference (character, character) Handles an include-file reference [ filename args ] Notes : Mirrors Preprocessor:HandleIncludeReference. Parses the file name and numbered / named arguments, opens the include (unless in a consumed &IF branch) and enqueues an INCLUDEFILEREFERENCE marker. @param pcRefText The full (expanded) reference text including the braces @param pcMarkerText The original (unexpanded) reference text for the marker */
CHARACTER IncludeRefArg (character, integer, integer) Reads one include-reference argument (whitespace-delimited, honouring ~"-quoted runs) Notes : Mirrors Preprocessor:IncludeRefArg. @param pcText The text @param piPos The current 1-based position (advanced past the argument) @param piLen The text length @return The argument value */
CHARACTER IncRefDequeue () Dequeues the next include-file reference text Notes : @return The reference text */
CHARACTER IncRefDequeue (integer, integer, integer, integer) Dequeues the next include-file reference text with its origin Notes : The origin is the position of the reference (the opening brace) in the file that contains it (SCL-5479) @param piFile The file index the reference appeared in @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 reference text */
LOGICAL IncRefIsEmpty () Returns whether the include-reference queue is empty Notes : @return Logical value */
LOGICAL IsAllDigits (character) Returns whether a string consists solely of digits Notes : @param pcText The text to test @return Logical value */
LOGICAL IsWhitespaceCode (integer) Returns whether a character code is whitespace Notes : @param piChar The character code @return Logical value indicating whitespace */
LaGet () Reads one character of lookahead without consuming it Notes : Mirrors Preprocessor:LaGet. */
LaUse () Consumes the buffered lookahead character as the current char Notes : Mirrors Preprocessor:LaUse. */
LOGICAL MacroReference () Handles a macro / include / directive reference starting at a brace Notes : Mirrors Preprocessor:MacroReference. Gathers the full (recursively expanded) reference text and dispatches on its shape. @return True if a (&_proparse_ directive) directive was consumed (GetChar must return PROPARSE_DIRECTIVE); false otherwise (a source was pushed or the reference contributed nothing). */
MakroRefDequeue (character, character) Dequeues the next macro reference Notes : @param pcName The full reference text @param pcValue The resolved expansion text */
MakroRefDequeue (character, character, integer, integer, integer, integer) Dequeues the next macro reference with its origin Notes : The origin is the position of the reference (the opening brace) in the file that contains it (SCL-5479) @param pcName The full reference text @param pcValue The resolved expansion text @param piFile The file index the reference appeared in @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 */
LOGICAL MakroRefIsEmpty () Returns whether the macro-reference queue is empty Notes : @return Logical value */
LOGICAL NewInclude (character) Opens an include file, pushing a new scope and source Notes : Mirrors Preprocessor:NewInclude. Skipped inside a consumed &IF branch; a missing file raises an exception. @param pcFileName The include file name @return True if the include was opened, false otherwise */
INTEGER NextSourceNum () Returns the next unique source number Notes : Source numbers are consumed even for empty expansions, matching the original iSourceCounter behaviour. @return The next source number */
INTEGER PopSource () Pops the top source and reports what kind of boundary was crossed Notes : Mirrors Preprocessor:PopInput. @return 0 = nothing left, 1 = an include file boundary was crossed, 2 = a macro / argument expansion boundary was crossed */
PreprocessToMemptr (memptr, integer) Runs the preprocessor to the end, accumulating the cooked output into a MEMPTR (grown by doubling), returned by reference Notes : MEMPTR accumulation with PUT-BYTE is O(n); it avoids the O(n^2) per-character LONGCHAR concatenation. The caller owns the returned MEMPTR and must SET-SIZE it to 0 when done. @param pmResult The cooked output bytes @param piLength The number of cooked bytes written */
LONGCHAR PreprocessToText () Returns the fully preprocessed text of the source Notes : Mirrors ProparseAblLexer:PreprocessSource so the folded character engine can be verified for parity with the original pipeline independently of tokenization. Accumulates via a MEMPTR and converts to LONGCHAR once (O(n)). @return The preprocessed character stream */
PushExpansion (character) Pushes a macro / argument expansion as a new source Notes : Mirrors Preprocessor:NewMacroRef2. An empty expansion pushes no source but still consumes a source number. @param pcText The expansion text */
PushSource (longchar, integer, integer, logical, PreproScope, logical) Pushes a new character source onto the source stack Notes : @param plcContent The source content @param piFileIndex The file index for position reporting @param piSourceNum The unique source number @param plMacro Whether this is a macro / argument expansion (line/col stay fixed at the referencing position) @param poScope The include scope owning this source @param plResetPos Whether to start line / column at 1 (a real file) or to inherit the referencing position (a macro expansion) */
INTEGER RegisterFile (character) Registers a file name and returns its (0-based) index Notes : @param pcFileName The file name to register @return The file index */
INTEGER SkipWhitespace (character, integer, integer) Skips whitespace in a string, returning the next non-ws position Notes : @param pcText The text @param piPos The current 1-based position @param piLen The text length @return The next non-whitespace position */
Undef (character) Removes a macro definition (&UNDEFINE) Notes : Removal order: local scoped name, named argument, ancestor scoped names, global. @param pcName The macro name */
WriteTrace (character) Writes a diagnostic trace message to the log Notes : Only emitted when Trace is enabled. SCL-5877: Written unfiltered through the LogManager, so the message reaches the registered logging stream although FoldedPP is not an active custom log entry type. The default logging stream writes to LOG-MANAGER, whose writes are flushed (unbuffered), so the message is visible in the client log even while a run is still in progress. @param pcMessage The message text */

Top Constructor Summary
Options Name Purpose
FoldedPreprocessor (character, longchar) Constructor for the FoldedPreprocessor class Notes : @param pcFileName The (nominal) primary source file name @param plcSource The primary source content */

Top Property Summary
Options Name Purpose
LOGICAL BoundarySpace
INTEGER Consuming
LOGICAL DoingComment
LOGICAL DoingSingleLineComment
INTEGER EOF_CHAR
LOGICAL EscapeAppend
LOGICAL EscapeCurrent
CHARACTER EscapeText
LOGICAL NameDot
INTEGER ProparseDirectiveCol
INTEGER ProparseDirectiveFile
INTEGER ProparseDirectiveLine
LOGICAL ProparseDirectives
INTEGER ProparseDirectiveSrc
CHARACTER ProparseDirectiveText
INTEGER PROPARSE_DIRECTIVE
INTEGER SKIP_CHAR
LOGICAL SuppressBraceExpansion
INTEGER TextStartCol
INTEGER TextStartFile
INTEGER TextStartLine
INTEGER TextStartSrc
LOGICAL Trace
LOGICAL WasEscape


Method Detail
Top

CheckForNameDot ()

Purpose: Determines whether a period is a name-dot
Notes : Mirrors Preprocessor:CheckForNameDot. A '.' is a name-dot iff the
next character is present and not whitespace.

Top

DefGlobal (character, character)

Purpose: Defines a global (&GLOBAL-DEFINE) macro
Notes :

Parameters:
pcName CHARACTER
The macro name
pcValue CHARACTER
The macro value
Top

DefScoped (character, character)

Purpose: Defines a scoped (&SCOPED-DEFINE) macro in the current scope
Notes :

Parameters:
pcName CHARACTER
The macro name
pcValue CHARACTER
The macro value
Top

EnqueueIncRef (character)

Purpose: Enqueues an include-file reference marker
Notes : Captures the reference origin (TextStart*, the position of the
opening brace) so the drained marker token reports where the
reference appeared, not where the included content starts

Parameters:
pcText CHARACTER
The reference text
Top

EnqueueMakroRef (character, character)

Purpose: Enqueues a (&name) macro reference marker
Notes : Captures the reference origin (TextStart*) as in EnqueueIncRef

Parameters:
pcName CHARACTER
The full reference text ((&name))
pcValue CHARACTER
The resolved expansion text
Top

INTEGER Escape ()

Purpose: Handles a backslash / tilde escape sequence
Notes : Mirrors Preprocessor:Escape. Only ~n and ~r translate to control
characters; ~ at end of line is a line continuation (SKIP_CHAR).

Returns INTEGER
The resulting character code, or SKIP_CHAR for a line continuation
Top

CHARACTER EvaluateDefined (character)

Purpose: Returns the DEFINED() status of a macro name
Notes : "3" scoped define (local or ancestor), "2" named arg, "1"
global, "0" none. Named EvaluateDefined because a method
named "Defined" crashes the OpenEdge 11.7 compiler (SCL-5595).

Parameters:
pcName CHARACTER
The macro name
Returns CHARACTER
The status digit as a string
Top

CHARACTER ExpandMacroReferences (character)

Purpose: Expands the macro / argument references in a text
Notes : Used for a define value gathered raw (SuppressBraceExpansion):
a &GLOBAL-DEFINE / &SCOPED-DEFINE value is expanded EAGERLY at
definition time, the way the real preprocessor behaves - the
idiom "&SCOPED-DEFINE ACCESS (&ACCESS)" re-declares an include
argument as a scoped define and depends on the right-hand
reference resolving to the OUTER value; storing it raw would
make the define self-referential (SCL-5479). Only macro
((&name)) and numbered ((n) / (*)) references are expanded;
any other brace reference stays verbatim.

Parameters:
pcText CHARACTER
The text to expand
Returns CHARACTER
The expanded text
Top

CHARACTER ExpandMacroReferences (character, integer)

Purpose: Recursive worker of ExpandMacroReferences
Notes : The depth guard stops a (then genuinely cyclic) reference chain

Parameters:
pcText CHARACTER
The text to expand
piDepth INTEGER
The current expansion depth
Returns CHARACTER
The expanded text
Top

CHARACTER FastScanRun (integer)

Purpose: Bulk-scans a run of bytes of a self-delimiting character class
directly from the current top frame
Notes : Convenience overload for the kinds whose run ends at a fixed set
of bytes; only kind 4 needs a stop byte of its own.

Parameters:
piKind INTEGER
1 = whitespace run, 2 = identifier run, 3 = comment body run
Returns CHARACTER
The scanned run text (empty string if none)
Top

CHARACTER FastScanRun (integer, integer)

Purpose: Bulk-scans a run of source bytes directly from the current top
frame, bypassing the per-character cooked path
Notes : None of the character classes contains the trigger bytes { ~ \,
so scanning "while in class" stops at every trigger and at the
frame boundary automatically; the caller then resumes the
char-by-char cooked path for the boundary character. Advances the
frame position and replicates FrameGet's line/column accounting
exactly. The run is capped at 30000 bytes so the GET-STRING result
never exceeds the CHARACTER limit (the caller's loop simply calls
again for the remainder). Returns the run text, or the empty
string when the fast path does not apply (a lookahead is
buffered) or nothing was scanned.
Because the run never leaves the current top frame, no macro or
include reference can fire inside it and the source number cannot
change - which is what lets the string scanner (kind 4) guard its
verbatim capture once for the whole run (SCL-5666).
run, 4 = quoted string body run
that opened the string); ignored by the other kinds

Parameters:
piKind INTEGER
1 = whitespace run, 2 = identifier run, 3 = comment body
piStopByte INTEGER
The additional byte that ends the run (kind 4: the quote
Returns CHARACTER
The scanned run text (empty string if none)
Top

INTEGER FrameGet ()

Purpose: Reads the next byte from the current top frame, advancing its
position and (for non-macro sources) line / column
Notes : The GET-BYTE fast path replacing InputSource:Get.

Returns INTEGER
The byte value, or EOF_CHAR when the frame is exhausted
Top

CHARACTER GetArgText (character)

Purpose: Resolves a macro name to its text (defines, args, built-ins)
Notes : Mirrors Preprocessor:GetArgText. Precedence: local scoped define,
named include arg, ancestor scoped defines, global define,
all-args helpers and built-ins. A miss yields the empty string.

Parameters:
pcName CHARACTER
The macro name (or "*" / "&*")
Returns CHARACTER
The resolved text
Top

CHARACTER GetArgTextByNum (integer)

Purpose: Resolves a numbered macro argument
Notes : Mirrors Preprocessor:GetArgTextByNum.

Parameters:
piNum INTEGER
The 0-based argument number (arg 0 = referenced name)
Returns CHARACTER
The argument value (or the empty string when out of range)
Top

INTEGER GetChar ()

Purpose: Returns the next cooked character (macro / escape / include
handled), one at a time
Notes : Mirrors Preprocessor:GetChar. Returns EOF_CHAR at end of input,
PROPARSE_DIRECTIVE after a consumed (&_proparse_ directive) directive,
or a character code.

Returns INTEGER
The next character code or a sentinel
Top

INTEGER GetColumn ()

Purpose: Returns the source column of the current character
Notes :

Returns INTEGER
The column number
Top

INTEGER GetFileIndex ()

Purpose: Returns the file index of the current character
Notes :

Returns INTEGER
The file index
Top

CHARACTER GetFilename (integer)

Purpose: Returns the file name for a given file index
Notes :

Parameters:
piIndex INTEGER
The file index
Returns CHARACTER
The file name (or the empty string if unknown)
Top

CHARACTER GetFileNames ()

Purpose: Returns every file name seen during preprocessing, by file index
Notes : The result is a 1-based ABL array whose entry i + 1 holds the
name of file index i, which is the layout NodeStore:FileNames
expects (a node's FileIndex is zero based). Returns an
indeterminate array when no file was opened at all.

Returns CHARACTER
The file names, indexed by file index + 1
Top

INTEGER GetLine ()

Purpose: Returns the source line of the current character
Notes :

Returns INTEGER
The line number
Top

GetRawChar ()

Purpose: Reads the next raw (un-cooked) character from the source stack
Notes : Mirrors Preprocessor:GetRawChar. Handles the pop cascade and the
synthetic space injected at an include boundary.

Top

INTEGER GetSourceNum ()

Purpose: Returns the source number of the current character
Notes :

Returns INTEGER
The source number
Top

HandleIncludeReference (character, character)

Purpose: Handles an include-file reference [ filename args ]
Notes : Mirrors Preprocessor:HandleIncludeReference. Parses the file name
and numbered / named arguments, opens the include (unless in a
consumed &IF branch) and enqueues an INCLUDEFILEREFERENCE marker.

Parameters:
pcRefText CHARACTER
The full (expanded) reference text including the braces
pcMarkerText CHARACTER
The original (unexpanded) reference text for the marker
Top

CHARACTER IncludeRefArg (character, integer, integer)

Purpose: Reads one include-reference argument (whitespace-delimited,
honouring ~"-quoted runs)
Notes : Mirrors Preprocessor:IncludeRefArg.

Parameters:
pcText CHARACTER
The text
piPos INTEGER
The current 1-based position (advanced past the argument)
piLen INTEGER
The text length
Returns CHARACTER
The argument value
Top

CHARACTER IncRefDequeue ()

Purpose: Dequeues the next include-file reference text
Notes :

Returns CHARACTER
The reference text
Top

CHARACTER IncRefDequeue (integer, integer, integer, integer)

Purpose: Dequeues the next include-file reference text with its origin
Notes : The origin is the position of the reference (the opening brace)
in the file that contains it (SCL-5479)

Parameters:
piFile INTEGER
The file index the reference appeared in
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 CHARACTER
The reference text
Top

LOGICAL IncRefIsEmpty ()

Purpose: Returns whether the include-reference queue is empty
Notes :

Returns LOGICAL
Logical value
Top

LOGICAL IsAllDigits (character)

Purpose: Returns whether a string consists solely of digits
Notes :

Parameters:
pcText CHARACTER
The text to test
Returns LOGICAL
Logical value
Top

LOGICAL IsWhitespaceCode (integer)

Purpose: Returns whether a character code is whitespace
Notes :

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

LaGet ()

Purpose: Reads one character of lookahead without consuming it
Notes : Mirrors Preprocessor:LaGet.

Top

LaUse ()

Purpose: Consumes the buffered lookahead character as the current char
Notes : Mirrors Preprocessor:LaUse.

Top

LOGICAL MacroReference ()

Purpose: Handles a macro / include / directive reference starting at a brace
Notes : Mirrors Preprocessor:MacroReference. Gathers the full (recursively
expanded) reference text and dispatches on its shape.
return PROPARSE_DIRECTIVE); false otherwise (a source was pushed
or the reference contributed nothing).

Returns LOGICAL
True if a (&_proparse_ directive) directive was consumed (GetChar must
Top

MakroRefDequeue (character, character)

Purpose: Dequeues the next macro reference
Notes :

Parameters:
pcName CHARACTER
The full reference text
pcValue CHARACTER
The resolved expansion text
Top

MakroRefDequeue (character, character, integer, integer, integer, integer)

Purpose: Dequeues the next macro reference with its origin
Notes : The origin is the position of the reference (the opening brace)
in the file that contains it (SCL-5479)

Parameters:
pcName CHARACTER
The full reference text
pcValue CHARACTER
The resolved expansion text
piFile INTEGER
The file index the reference appeared in
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
Top

LOGICAL MakroRefIsEmpty ()

Purpose: Returns whether the macro-reference queue is empty
Notes :

Returns LOGICAL
Logical value
Top

LOGICAL NewInclude (character)

Purpose: Opens an include file, pushing a new scope and source
Notes : Mirrors Preprocessor:NewInclude. Skipped inside a consumed &IF
branch; a missing file raises an exception.

Parameters:
pcFileName CHARACTER
The include file name
Returns LOGICAL
True if the include was opened, false otherwise
Top

INTEGER NextSourceNum ()

Purpose: Returns the next unique source number
Notes : Source numbers are consumed even for empty expansions, matching
the original iSourceCounter behaviour.

Returns INTEGER
The next source number
Top

INTEGER PopSource ()

Purpose: Pops the top source and reports what kind of boundary was crossed
Notes : Mirrors Preprocessor:PopInput.
2 = a macro / argument expansion boundary was crossed

Returns INTEGER
0 = nothing left, 1 = an include file boundary was crossed,
Top

PreprocessToMemptr (memptr, integer)

Purpose: Runs the preprocessor to the end, accumulating the cooked output
into a MEMPTR (grown by doubling), returned by reference
Notes : MEMPTR accumulation with PUT-BYTE is O(n); it avoids the O(n^2)
per-character LONGCHAR concatenation. The caller owns the returned
MEMPTR and must SET-SIZE it to 0 when done.

Parameters:
pmResult MEMPTR
The cooked output bytes
piLength INTEGER
The number of cooked bytes written
Top

LONGCHAR PreprocessToText ()

Purpose: Returns the fully preprocessed text of the source
Notes : Mirrors ProparseAblLexer:PreprocessSource so the folded character
engine can be verified for parity with the original pipeline
independently of tokenization. Accumulates via a MEMPTR and
converts to LONGCHAR once (O(n)).

Returns LONGCHAR
The preprocessed character stream
Top

PushExpansion (character)

Purpose: Pushes a macro / argument expansion as a new source
Notes : Mirrors Preprocessor:NewMacroRef2. An empty expansion pushes no
source but still consumes a source number.

Parameters:
pcText CHARACTER
The expansion text
Top

PushSource (longchar, integer, integer, logical, PreproScope, logical)

Purpose: Pushes a new character source onto the source stack
Notes :
stay fixed at the referencing position)
inherit the referencing position (a macro expansion)

Parameters:
plcContent LONGCHAR
The source content
piFileIndex INTEGER
The file index for position reporting
piSourceNum INTEGER
The unique source number
plMacro LOGICAL
Whether this is a macro / argument expansion (line/col
poScope Consultingwerk.Studio.ProparseApi.Implementation.ProparseAbl.Lexer.PreproScope
The include scope owning this source
plResetPos LOGICAL
Whether to start line / column at 1 (a real file) or to
Top

INTEGER RegisterFile (character)

Purpose: Registers a file name and returns its (0-based) index
Notes :

Parameters:
pcFileName CHARACTER
The file name to register
Returns INTEGER
The file index
Top

INTEGER SkipWhitespace (character, integer, integer)

Purpose: Skips whitespace in a string, returning the next non-ws position
Notes :

Parameters:
pcText CHARACTER
The text
piPos INTEGER
The current 1-based position
piLen INTEGER
The text length
Returns INTEGER
The next non-whitespace position
Top

Undef (character)

Purpose: Removes a macro definition (&UNDEFINE)
Notes : Removal order: local scoped name, named argument, ancestor
scoped names, global.

Parameters:
pcName CHARACTER
The macro name
Top

WriteTrace (character)

Purpose: Writes a diagnostic trace message to the log
Notes : Only emitted when Trace is enabled. SCL-5877: Written unfiltered
through the LogManager, so the message reaches the registered
logging stream although FoldedPP is not an active custom log
entry type. The default logging stream writes to LOG-MANAGER,
whose writes are flushed (unbuffered), so the message is visible
in the client log even while a run is still in progress.

Parameters:
pcMessage CHARACTER
The message text


Constructor Detail
Top

FoldedPreprocessor (character, longchar)

Purpose: Constructor for the FoldedPreprocessor class
Notes :

Parameters:
pcFileName CHARACTER
The (nominal) primary source file name
plcSource LONGCHAR
The primary source content


Property Detail
Top

LOGICAL BoundarySpace


Returns LOGICAL
Top

INTEGER Consuming


Returns INTEGER
Top

LOGICAL DoingComment


Returns LOGICAL
Top

LOGICAL DoingSingleLineComment


Returns LOGICAL
Top

INTEGER EOF_CHAR


Returns INTEGER
Top

LOGICAL EscapeAppend


Returns LOGICAL
Top

LOGICAL EscapeCurrent


Returns LOGICAL
Top

CHARACTER EscapeText


Returns CHARACTER
Top

LOGICAL NameDot


Returns LOGICAL
Top

INTEGER ProparseDirectiveCol


Returns INTEGER
Top

INTEGER ProparseDirectiveFile


Returns INTEGER
Top

INTEGER ProparseDirectiveLine


Returns INTEGER
Top

LOGICAL ProparseDirectives


Returns LOGICAL
Top

INTEGER ProparseDirectiveSrc


Returns INTEGER
Top

CHARACTER ProparseDirectiveText


Returns CHARACTER
Top

INTEGER PROPARSE_DIRECTIVE


Returns INTEGER
Top

INTEGER SKIP_CHAR


Returns INTEGER
Top

LOGICAL SuppressBraceExpansion


Returns LOGICAL
Top

INTEGER TextStartCol


Returns INTEGER
Top

INTEGER TextStartFile


Returns INTEGER
Top

INTEGER TextStartLine


Returns INTEGER
Top

INTEGER TextStartSrc


Returns INTEGER
Top

LOGICAL Trace


Returns LOGICAL
Top

LOGICAL WasEscape


Returns LOGICAL


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