+
Point of view
All features
class REGULAR_EXPRESSION_STRING_SCANNER
Summary
Facility to scan strings TODO improve it by using STRING_HANDLER and string's storage
Direct parents
Insert list: ANY
Known children
Insert list: BACKTRACKING_REGULAR_EXPRESSION, BACKTRACKING_REGULAR_EXPRESSION_BUILDER
Class invariant
Overview
Features
make
{ANY}
  • make
    Initialise the attributes.
basic
{ANY}
error management
{ANY}
scanning
{ANY}
make
effective procedure
{ANY}
Initialise the attributes.
scanned_string: ABSTRACT_STRING
writable attribute
{ANY}
The expression being currently build.
set_scanned_string (string: ABSTRACT_STRING)
effective procedure
{ANY}
Set the 'scanned_string' with 'string'.
has_error: BOOLEAN
writable attribute
{ANY}
True when an error was encountered
clear_error
effective procedure
{ANY}
Remove the error flag
last_error: STRING
effective function
{ANY}
Returns a string recorded for the error.
set_error (message: STRING)
effective procedure
{ANY}
Set has_error and last_error.
position: INTEGER_32
writable attribute
{ANY}
The scanned position.
last_character: CHARACTER
writable attribute
{ANY}
The scanned character.
valid_last_character: BOOLEAN
writable attribute
{ANY}
True when 'last_character' is valid.
valid_previous_character: BOOLEAN
effective function
{ANY}
True if the position-1 is a valid position.
previous_character: CHARACTER
effective function
{ANY}
The character at position-1.
valid_next_character: BOOLEAN
effective function
{ANY}
True if the position+1 is a valid position.
next_character: CHARACTER
effective function
{ANY}
The character at position+1.
end_of_input: BOOLEAN
effective function
{ANY}
True when all the characters of 'scanned_string' are scanned.
goto_position (pos: INTEGER_32)
effective procedure
{ANY}
Change the currently scanned position to 'pos'.
read_character
effective procedure
{ANY}
Reads the next character.
read_integer
effective procedure
{ANY}
Reads an integer value beginning at the currently scanned position.
saved_position: INTEGER_32
writable attribute
{ANY}
The saved position (only one is currently enough).
save_position
effective procedure
{ANY}
Saves the current scanning position.
restore_saved_position
effective procedure
{ANY}
Restore the scanning position to the last saved one.
last_string: STRING
writable attribute
{ANY}
A string buffer.
last_integer: INTEGER_32
writable attribute
{ANY}
An integer buffer.