class BACKTRACKING_REGULAR_EXPRESSION
Summary
Overview
Creation features
Exported features
common
creation
Common client features
Control of the exploration
Specific to alternatives
the pools
matching capabilities
substitution capabilities
Error informations
basic
error management
scanning
set_scanned_string (string: ABSTRACT_STRING)
effective procedure
Set 'scanned_string' to 'string'.
last_match_succeeded: BOOLEAN
writable attribute
True if the last match (match_first or match_next) operation was a success.
group_count: INTEGER_32
writable attribute
The count of groups
invalidate_last_match
effective procedure
Used to prevent 2 substitutions without intermediate matching.
basic_match_first
effective procedure
Starts to match and try to find the first substring of 'scanned_string' that matches the regular expression.
basic_match_next
effective procedure
Continues to match and try to find the next substring of 'scanned_string' that matches the regular expression.
match_from (text: ABSTRACT_STRING, first_index: INTEGER_32): BOOLEAN
effective function
Returns True if Current regular_expression can match the text starting from first_index.
matches_only_current_position: BOOLEAN
writable attribute
Does the matching occur only from current position?
set_matches_only_current_position (value: BOOLEAN)
effective procedure
Sets 'matches_only_current_position' to 'value'.
make
effective procedure
Creation.
effective procedure
Set the matched pattern.
set_current_node (node: BACKTRACKING_NODE)
effective procedure
Sets the next node of the BACKTRACKING_NODE graph to evaluate.
push_and (node: BACKTRACKING_NODE)
effective procedure
Pushes node in front of the continuation path.
push_and_list (list: BACKTRACKING_NODE_AND_LIST)
effective procedure
Pushes list in front of the continuation path.
push_or (node: BACKTRACKING_NODE)
effective procedure
Pushes node in front of the possible alternatives.
push_or_list (list: BACKTRACKING_NODE_OR_LIST)
effective procedure
Pushes list in front of the possible alternatives.
search_first
effective procedure
Resets all and searches the first solution.
search_next
effective procedure
Searches the next solution.
search_is_success: BOOLEAN
writable attribute
True when search is successful
is_off: BOOLEAN
effective function
True when search is finished
clear
effective procedure
Clears the current state to nothing.
is_cleared: BOOLEAN
effective function
True if no partial data remain in the current state
push_sequence (sequence: ABSTRACT_BACKTRACKING_SEQUENCE)
effective procedure
Pushes the sequence in front of the continuation path.
push_alternative (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
Pushes the alternative before the continuation path.
continue
effective procedure
Continues the exploration of the current path.
backtrack
effective procedure
Stops the exploration of the current path and tries to explore the next alternative path.
push_cut_point
effective procedure
Inserts a cut point into the continuation path.
cut
effective procedure
Removes the alternatives until the one recorded by the next cut point in the continuation path.
cut_all
effective procedure
Cuts all alternatives.
writable attribute
Stack of alternatives represented by its top (can be Void)
continue_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
pop_alternative
effective procedure
Returns to the alternative on the top of the stack and put its saved continuation path as the current continuation path.
once function
Bank of cut points
once function
pool_of_sequence_list: BACKTRACKING_POOL_OF_SEQUENCE_LIST
once function
pool_of_alternative: BACKTRACKING_POOL_OF_ALTERNATIVE
once function
pool_of_alternative_list: BACKTRACKING_POOL_OF_ALTERNATIVE_LIST
once function
match (text: ABSTRACT_STRING): BOOLEAN
effective function
Returns True if Current regular_expression can match the text.
match_next (text: ABSTRACT_STRING): BOOLEAN
effective function
Returns True if Current regular_expression can match the same text one more time.
last_match_first_index: INTEGER_32
effective function
The starting position in the text where starts the sub-string who is matching the whole pattern.
last_match_last_index: INTEGER_32
effective function
The last position in the text where starts the sub-string who is matching the whole pattern.
last_match_count: INTEGER_32
effective function
Length of the string matching the whole pattern.
group_names: TRAVERSABLE[FIXED_STRING]
effective function
The names of the matched named group.
has_group_name (name: ABSTRACT_STRING): BOOLEAN
effective function
Is there a group names name?
ith_group_matched (i: INTEGER_32): BOOLEAN
effective function
Did the ith group match during last match?
named_group_matched (name: ABSTRACT_STRING): BOOLEAN
effective function
Did the group named name match during the last match?
ith_group_first_index (i: INTEGER_32): INTEGER_32
effective function
First index in the last matching text of the ith group.
named_group_first_index (name: ABSTRACT_STRING): INTEGER_32
effective function
First index in the last matching text of the group named name.
ith_group_last_index (i: INTEGER_32): INTEGER_32
effective function
Last index in the last matching text of the ith group.
named_group_last_index (name: ABSTRACT_STRING): INTEGER_32
effective function
Last index in the last matching text of the group named name.
ith_group_count (i: INTEGER_32): INTEGER_32
effective function
Length of the ith group of Current in the last matching.
named_group_count (name: ABSTRACT_STRING): INTEGER_32
effective function
Length of the group named name in the last matching.
for_all_matched_named_groups (text: ABSTRACT_STRING, action: PROCEDURE[TUPLE 2[FIXED_STRING, STRING]])
effective procedure
Call the action for each group that matched during the last match.
append_heading_text (text: ABSTRACT_STRING, buffer: STRING)
effective procedure
Append in buffer the text before the matching area.
append_pattern_text (text: ABSTRACT_STRING, buffer: STRING)
effective procedure
Append in buffer the text matching the pattern.
append_tailing_text (text: ABSTRACT_STRING, buffer: STRING)
effective procedure
Append in buffer the text after the matching area.
append_ith_group (text: ABSTRACT_STRING, buffer: STRING, i: INTEGER_32)
effective procedure
Append in buffer the text of the ith group.
append_named_group (text: ABSTRACT_STRING, buffer: STRING, name: ABSTRACT_STRING)
effective procedure
Append in buffer the text of the group named name.
named_group_value (text: ABSTRACT_STRING, name: ABSTRACT_STRING): STRING
effective function
Returns the text of the group named name (always the same STRING!)
prepare_substitution (p: ABSTRACT_STRING)
effective procedure
Set pattern p for substitution.
last_substitution: STRING
effective function
You need to copy this STRING if you want to keep it.
substitute_for (text: ABSTRACT_STRING)
effective procedure
This call has to be preceded by a successful matching on the same text.
substitute_in (text: STRING)
effective procedure
This call has to be preceded by a successful matching on the same text.
substitute_all_for (text: ABSTRACT_STRING)
effective procedure
Every matching part is substituted.
substitute_all_in (text: STRING)
effective procedure
Every matching part is substituted.
can_substitute: BOOLEAN
effective function
Substitution is only allowed when some valid substitution pattern has been registered and after a successful pattern matching.
substitution_pattern_ready: BOOLEAN
writable attribute
True if some valid substitution pattern has been registered.
pattern_error_message: STRING
writable attribute
Error message for the substitution pattern.
pattern_error_position: INTEGER_32
writable attribute
Error position in the substitution pattern.
scanned_string: ABSTRACT_STRING
writable attribute
The expression being currently build.
has_error: BOOLEAN
writable attribute
True when an error was encountered
clear_error
effective procedure
Remove the error flag
last_error: STRING
effective function
Returns a string recorded for the error.
set_error (message: STRING)
effective procedure
Set has_error and last_error.
position: INTEGER_32
writable attribute
The scanned position.
last_character: CHARACTER
writable attribute
The scanned character.
valid_last_character: BOOLEAN
writable attribute
True when 'last_character' is valid.
valid_previous_character: BOOLEAN
effective function
True if the position-1 is a valid position.
previous_character: CHARACTER
effective function
The character at position-1.
valid_next_character: BOOLEAN
effective function
True if the position+1 is a valid position.
next_character: CHARACTER
effective function
The character at position+1.
end_of_input: BOOLEAN
effective function
True when all the characters of 'scanned_string' are scanned.
goto_position (pos: INTEGER_32)
effective procedure
Change the currently scanned position to 'pos'.
read_character
effective procedure
Reads the next character.
read_integer
effective procedure
Reads an integer value beginning at the currently scanned position.
saved_position: INTEGER_32
writable attribute
The saved position (only one is currently enough).
save_position
effective procedure
Saves the current scanning position.
restore_saved_position
effective procedure
Restore the scanning position to the last saved one.
last_string: STRING
writable attribute
A string buffer.
last_integer: INTEGER_32
writable attribute
An integer buffer.