Top Method Summary
Options Name Purpose
INTEGER AddFilename (character) Adds a file name to the filename list and returns its index Notes : @param pcName The name @return The file index */
CHARACTER CharAt (character, integer) Character at 0-based position of a string Notes : @param pcText The text @param piPos0 The 0-based position @return The single character, or "" if out of range */
CheckForNameDot () Determines whether the '.' just read is a name dot Notes : */
DefGlobal (character, character) Defines a global preprocessor name Notes : @param pcName The name @param pcValue The value */
DefScoped (character, character) Defines a scoped preprocessor name in the current include scope Notes : @param pcName The name @param pcValue The value */
INTEGER Escape () Escape ('~' / '\') handling Notes : @return The resulting character code, or SKIP_CHAR to discard */
CHARACTER EvaluateDefined (character) Progress DEFINED() function - returns "0".."3" Notes : Named EvaluateDefined because a method named "Defined" crashes the OpenEdge 11.7 compiler (SCL-5595). @param pcName The (lowercased) argument name @return "3","2","1" or "0" */
CHARACTER FindFile (character) Locates an include file on the PROPATH Notes : @param pcName The referenced file name @return The resolved file name, or "" if not found */
CHARACTER GetArgText (character) Returns the text of a named argument, define or built-in Notes : @param pcName The name @return The argument text */
CHARACTER GetArgTextByNum (integer) Returns the text of a numbered include argument Notes : @param piArgNum The argument number @return The argument text */
INTEGER GetChar () Returns the next preprocessed character, or a sentinel Notes : Handles escape sequences, macro references and name-dot detection. @return The next character code (or EOF_CHAR / PROPARSE_DIRECTIVE) */
INTEGER GetColumn () Returns the current column number Notes : @return The column number */
INTEGER GetFileIndex () Returns the current file index Notes : @return The file index */
CHARACTER GetFilename (integer) Returns the file name for the given file index Notes : @param piFileIndex The file index @return The file name */
INTEGER GetLine () Returns the current line number Notes : @return The line number */
GetRawChar () Reads the next raw character, popping input sources at EOF Notes : */
INTEGER GetSourceNum () Returns the current source number Notes : @return The source number */
HandleIncludeReference (character, integer, integer) Parses and enters an include file reference Notes : Port of the include-reference branch of macroReference. @param pcRefText The full "{...}" reference text @param piClosing0 The 0-based index of the closing '}' @param piRefEnd0 The length of the reference text */
CHARACTER IncludeRefArg (character, integer) Gathers one include reference argument, advancing the position Notes : Mirrors Preprocessor.includeRefArg (0-based). @param pcText The macro reference text @param piPos0 The 0-based scan position (input-output) @return The argument value */
CHARACTER IncRefDequeue () Dequeues the next include-reference marker text Notes : @return The include-reference text */
LOGICAL IncRefIsEmpty () Returns whether the pending include-reference queue is empty Notes : @return Logical value indicating an empty queue */
LOGICAL IsAllDigits (character) Returns whether the text consists solely of digits Notes : @param pcText The text @return Logical value indicating all digits */
LOGICAL IsWhitespaceChar (character) Returns whether the character is whitespace Notes : @param pcChar The character @return Logical value indicating whitespace */
LOGICAL IsWhitespaceCode (integer) Returns whether the character code is whitespace Notes : @param piChar The character code @return Logical value indicating whitespace */
LaGet () Fetches the lookahead character Notes : */
LaUse () Consumes the previously fetched lookahead character Notes : */
MacroReference () Processes a macro reference starting at the current '{' Notes : Port of Preprocessor.macroReference. */
MakroRefDequeue (character, character) Dequeues the next macro-reference marker Notes : @param pcRefName The macro reference name @param pcRefText The macro reference text */
LOGICAL MakroRefIsEmpty () Returns whether the pending macro-reference queue is empty Notes : @return Logical value indicating an empty queue */
LOGICAL NewInclude (character) Starts a new include file, if not consuming and the name is set Notes : @param pcReferencedWithName The referenced file name @return Logical value indicating if the include file was entered */
NewMacroRef2 (character, integer, integer, integer) Pushes a new macro / argument expansion input source Notes : @param pcText The expansion text @param piFile The file index of the referencing '{' @param piLine The line of the referencing '{' @param piCol The column of the referencing '{' */
NewMacroRefByName (character, integer, integer, integer) Pushes a macro / named-argument expansion input source Notes : @param pcName The name @param piFile The file index of the referencing curly brace @param piLine The line of the referencing curly brace @param piCol The column of the referencing curly brace */
NewMacroRefByNum (integer, integer, integer, integer) Pushes a numbered-argument expansion input source Notes : @param piArgNum The argument number @param piFile The file index of the referencing curly brace @param piLine The line of the referencing curly brace @param piCol The column of the referencing curly brace */
INTEGER PopInput () Pops the current input source off the stack Notes : @return 2 macro/arg popped, 1 include popped, 0 nothing left */
Undef (character) Undefines a preprocessor name (scoped, named argument or global) Notes : @param pcName The name */

Top Constructor Summary
Options Name Purpose
Preprocessor (character, longchar) Constructor for the Preprocessor class Notes : @param pcFileName The name of the primary input file @param plcContent The character content of the primary input file */

Top Property Summary
Options Name Purpose
INTEGER Consuming
INTEGER CurrFile
LOGICAL DoingComment
LOGICAL DoingSingleLineComment
INTEGER EOF_CHAR
LOGICAL EscapeAppend
LOGICAL EscapeCurrent
CHARACTER EscapeText
LOGICAL NameDot
CHARACTER ProparseDirectiveText
INTEGER PROPARSE_DIRECTIVE
INTEGER SKIP_CHAR
INTEGER TextStartCol
INTEGER TextStartFile
INTEGER TextStartLine
INTEGER TextStartSource
LOGICAL WasEscape


Method Detail
Top

INTEGER AddFilename (character)

Purpose: Adds a file name to the filename list and returns its index
Notes :

Parameters:
pcName CHARACTER
The name
Returns INTEGER
The file index
Top

CHARACTER CharAt (character, integer)

Purpose: Character at 0-based position of a string
Notes :

Parameters:
pcText CHARACTER
The text
piPos0 INTEGER
The 0-based position
Returns CHARACTER
The single character, or "" if out of range
Top

CheckForNameDot ()

Purpose: Determines whether the '.' just read is a name dot
Notes :

Top

DefGlobal (character, character)

Purpose: Defines a global preprocessor name
Notes :

Parameters:
pcName CHARACTER
The name
pcValue CHARACTER
The value
Top

DefScoped (character, character)

Purpose: Defines a scoped preprocessor name in the current include scope
Notes :

Parameters:
pcName CHARACTER
The name
pcValue CHARACTER
The value
Top

INTEGER Escape ()

Purpose: Escape ('~' / '\') handling
Notes :

Returns INTEGER
The resulting character code, or SKIP_CHAR to discard
Top

CHARACTER EvaluateDefined (character)

Purpose: Progress DEFINED() function - returns "0".."3"
Notes : Named EvaluateDefined because a method named "Defined"
crashes the OpenEdge 11.7 compiler (SCL-5595).

Parameters:
pcName CHARACTER
The (lowercased) argument name
Returns CHARACTER
"3","2","1" or "0"
Top

CHARACTER FindFile (character)

Purpose: Locates an include file on the PROPATH
Notes :

Parameters:
pcName CHARACTER
The referenced file name
Returns CHARACTER
The resolved file name, or "" if not found
Top

CHARACTER GetArgText (character)

Purpose: Returns the text of a named argument, define or built-in
Notes :

Parameters:
pcName CHARACTER
The name
Returns CHARACTER
The argument text
Top

CHARACTER GetArgTextByNum (integer)

Purpose: Returns the text of a numbered include argument
Notes :

Parameters:
piArgNum INTEGER
The argument number
Returns CHARACTER
The argument text
Top

INTEGER GetChar ()

Purpose: Returns the next preprocessed character, or a sentinel
Notes : Handles escape sequences, macro references and name-dot
detection.

Returns INTEGER
The next character code (or EOF_CHAR / PROPARSE_DIRECTIVE)
Top

INTEGER GetColumn ()

Purpose: Returns the current column number
Notes :

Returns INTEGER
The column number
Top

INTEGER GetFileIndex ()

Purpose: Returns the current file index
Notes :

Returns INTEGER
The file index
Top

CHARACTER GetFilename (integer)

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

Parameters:
piFileIndex INTEGER
The file index
Returns CHARACTER
The file name
Top

INTEGER GetLine ()

Purpose: Returns the current line number
Notes :

Returns INTEGER
The line number
Top

GetRawChar ()

Purpose: Reads the next raw character, popping input sources at EOF
Notes :

Top

INTEGER GetSourceNum ()

Purpose: Returns the current source number
Notes :

Returns INTEGER
The source number
Top

HandleIncludeReference (character, integer, integer)

Purpose: Parses and enters an include file reference
Notes : Port of the include-reference branch of macroReference.

Parameters:
pcRefText CHARACTER
The full "{...}" reference text
piClosing0 INTEGER
The 0-based index of the closing '}'
piRefEnd0 INTEGER
The length of the reference text
Top

CHARACTER IncludeRefArg (character, integer)

Purpose: Gathers one include reference argument, advancing the position
Notes : Mirrors Preprocessor.includeRefArg (0-based).

Parameters:
pcText CHARACTER
The macro reference text
piPos0 INTEGER
The 0-based scan position (input-output)
Returns CHARACTER
The argument value
Top

CHARACTER IncRefDequeue ()

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

Returns CHARACTER
The include-reference text
Top

LOGICAL IncRefIsEmpty ()

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

Returns LOGICAL
Logical value indicating an empty queue
Top

LOGICAL IsAllDigits (character)

Purpose: Returns whether the text consists solely of digits
Notes :

Parameters:
pcText CHARACTER
The text
Returns LOGICAL
Logical value indicating all digits
Top

LOGICAL IsWhitespaceChar (character)

Purpose: Returns whether the character is whitespace
Notes :

Parameters:
pcChar CHARACTER
The character
Returns LOGICAL
Logical value indicating whitespace
Top

LOGICAL IsWhitespaceCode (integer)

Purpose: Returns whether the character code is whitespace
Notes :

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

LaGet ()

Purpose: Fetches the lookahead character
Notes :

Top

LaUse ()

Purpose: Consumes the previously fetched lookahead character
Notes :

Top

MacroReference ()

Purpose: Processes a macro reference starting at the current '{'
Notes : Port of Preprocessor.macroReference.

Top

MakroRefDequeue (character, character)

Purpose: Dequeues the next macro-reference marker
Notes :

Parameters:
pcRefName CHARACTER
The macro reference name
pcRefText CHARACTER
The macro reference text
Top

LOGICAL MakroRefIsEmpty ()

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

Returns LOGICAL
Logical value indicating an empty queue
Top

LOGICAL NewInclude (character)

Purpose: Starts a new include file, if not consuming and the name is set
Notes :

Parameters:
pcReferencedWithName CHARACTER
The referenced file name
Returns LOGICAL
Logical value indicating if the include file was entered
Top

NewMacroRef2 (character, integer, integer, integer)

Purpose: Pushes a new macro / argument expansion input source
Notes :

Parameters:
pcText CHARACTER
The expansion text
piFile INTEGER
The file index of the referencing '{'
piLine INTEGER
The line of the referencing '{'
piCol INTEGER
The column of the referencing '{'
Top

NewMacroRefByName (character, integer, integer, integer)

Purpose: Pushes a macro / named-argument expansion input source
Notes :

Parameters:
pcName CHARACTER
The name
piFile INTEGER
The file index of the referencing curly brace
piLine INTEGER
The line of the referencing curly brace
piCol INTEGER
The column of the referencing curly brace
Top

NewMacroRefByNum (integer, integer, integer, integer)

Purpose: Pushes a numbered-argument expansion input source
Notes :

Parameters:
piArgNum INTEGER
The argument number
piFile INTEGER
The file index of the referencing curly brace
piLine INTEGER
The line of the referencing curly brace
piCol INTEGER
The column of the referencing curly brace
Top

INTEGER PopInput ()

Purpose: Pops the current input source off the stack
Notes :

Returns INTEGER
2 macro/arg popped, 1 include popped, 0 nothing left
Top

Undef (character)

Purpose: Undefines a preprocessor name (scoped, named argument or global)
Notes :

Parameters:
pcName CHARACTER
The name


Constructor Detail
Top

Preprocessor (character, longchar)

Purpose: Constructor for the Preprocessor class
Notes :

Parameters:
pcFileName CHARACTER
The name of the primary input file
plcContent LONGCHAR
The character content of the primary input file


Property Detail
Top

INTEGER Consuming


Returns INTEGER
Top

INTEGER CurrFile


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

CHARACTER ProparseDirectiveText


Returns CHARACTER
Top

INTEGER PROPARSE_DIRECTIVE


Returns INTEGER
Top

INTEGER SKIP_CHAR


Returns INTEGER
Top

INTEGER TextStartCol


Returns INTEGER
Top

INTEGER TextStartFile


Returns INTEGER
Top

INTEGER TextStartLine


Returns INTEGER
Top

INTEGER TextStartSource


Returns INTEGER
Top

LOGICAL WasEscape


Returns LOGICAL


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