Up
Authors
- Manuel Guesdon (
mguesdon@orange-concept.com)
-
Date: Generated at 2025-12-01
Copyright: (C) 2004 Free Software Foundation, Inc.
- Declared in:
- WebObjects/GSWBaseParser.h
Availability: OpenStep
The GSWBaseParser class provides fundamental parsing
capabilities for GSWeb template and declaration
processing. This abstract base class maintains
parsing state and provides utility methods for
position tracking, line/column calculation, and
common parsing operations.
GSWBaseParser declares 4 Instance Variables
- (
NSString*)
currentLineAndColumnIndexesString;
Availability: OpenStep
Returns a formatted string describing the current
parsing position in terms of line and column
numbers. This method is useful for generating
human-readable error messages and debugging
output that shows exactly where in the source text
the parser is currently positioned.
- (int)
currentLineIndex;
Availability: OpenStep
Returns the line number (zero-based) corresponding
to the current parsing position. This provides just the
line information without column details, useful for
quick line-based position tracking.
- (void)
lineAndColumnIndexesFromIndex: (int)index
returnsLineIndex: (int*)lineIndexPtr
columnIndex: (int*)colIndexPtr;
Availability: OpenStep
Calculates and returns both line and column
indexes for the specified character position
through the provided pointer parameters. This
method provides the most efficient way to obtain
both coordinates simultaneously when both line and
column information are needed.
- (
NSString*)
lineAndColumnIndexesStringFromIndex: (int)index;
Availability: OpenStep
Returns a formatted string describing the line and
column position corresponding to the specified
character index within the source
text. This allows conversion from absolute character
positions to human-readable line and column
coordinates for any position in the parsed
content.
- (int)
lineIndexFromIndex: (int)index;
Availability: OpenStep
Returns the line number (zero-based) corresponding
to the specified character index within the
source text. This allows determination of line
position for any character index in the
parsed content.
Instance Variables for GSWBaseParser Class
@protected int
_index;
Availability: OpenStep
Current parsing position index
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected int
_length;
Availability: OpenStep
Total length of the source string
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSString*
_string;
Availability: OpenStep
The source string being parsed
Warning
the underscore at the start of the name of this
instance variable indicates that, even though it
is not technically private, it is intended for
internal use within the package, and you should
not use the variable in other code.
@protected unichar*
_uniBuf;
Availability: OpenStep
Unicode character buffer for efficient access
Warning the underscore at the start
of the name of this instance variable indicates that,
even though it is not technically private, it
is intended for internal use within the package, and you
should not use the variable in other code.
ParserDebugLogBuffer(
uniBuf,
length,
index,
charsCount)
Availability: OpenStep
Convenience macro for logging parser buffer state
with automatic capture of function name, file, and line
information. This provides an easy way to add
debug logging throughout parser code.
_GSWBaseParser_h__
Availability: OpenStep
Base parser class providing fundamental parsing
functionality for GSWeb template and
declaration parsers. This abstract class
encapsulates common parsing operations including
string buffer management, position tracking, and
line/column index calculation utilities.
GSWBaseParser serves as the foundation for more
specialized parsers in the GSWeb framework, such
as template parsers and declaration parsers. It maintains
an internal Unicode character buffer for efficient parsing
operations and provides methods to track parsing
position with accurate line and column reporting for
error messages and debugging. Key features: - Unicode
character buffer management for efficient parsing -
Line and column position tracking throughout parsing
operations - Utility methods for common parsing
tasks and position reporting - Foundation for
specialized GSWeb parsers
void _ParserDebugLogBuffer(char*
fn, char*
file, int
line,
unichar*
uniBuf, int
length, int
index, int
charsCount);
Availability: OpenStep
Debug logging function for parser buffer state. This
function logs detailed information about the
parser's current buffer state including position,
remaining characters, and context information. Used
internally for debugging parser operations and
troubleshooting parsing issues.
BOOL _parserIsBlankChar(
unichar c);
Availability: OpenStep
Inline utility function that tests whether a Unicode
character represents whitespace or blank
characters. This includes space, tab, form feed,
carriage return, newline, and vertical tab
characters. Essential for parsing operations that
need to skip or handle whitespace appropriately.
BOOL _parserIsDigit(
unichar c);
Availability: OpenStep
Inline utility function that tests whether a Unicode
character represents a decimal digit (0-9). This
provides efficient character classification for
numeric parsing operations commonly needed in
template and declaration parsing.
BOOL _parserIsEndOfLineChar(
unichar c);
Availability: OpenStep
Inline utility function that tests whether a Unicode
character represents an end-of-line character
(carriage return or newline). This is specifically
focused on line termination detection, useful for
line-based parsing operations and accurate line
counting during template processing.
BOOL _parserIsHexDigit(
unichar c);
Availability: OpenStep
Inline utility function that tests whether a Unicode
character represents a hexadecimal digit (0-9, A-F,
a-f). This provides efficient character classification
for hexadecimal parsing operations, useful for color
values, escape sequences, and other hex-encoded
content in templates.
Up