class BACKTRACKING_REGULAR_EXPRESSION
Summary
Overview
creation features
exported features
common
creation
Common client features
Control of the exploration
the pools
matching capabilities
substitution capabilities
Error informations
basic
error managment
scanning
set_scanned_string (string: 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: 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
Set the next node of the BACKTRACKING_NODE graph to be evaluated.
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 searchs the first solution.
search_next
effective procedure
Searchs the next solution.
search_is_success: BOOLEAN
writable attribute
True when search is successfull
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
Pushs the 'sequence' in front of the continuation path.
push_alternative (alternative: ABSTRACT_BACKTRACKING_ALTERNATIVE)
effective procedure
Pushs 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.
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: STRING): BOOLEAN
effective function
Returns True if Current regular_expression can match the text.
match_next (text: 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.
ith_group_matched (i: INTEGER_32): BOOLEAN
effective function
Did the ith group matched during last match?
ith_group_first_index (i: INTEGER_32): INTEGER_32
effective function
First index in the last matching text of the ith group of Current.
ith_group_last_index (i: INTEGER_32): INTEGER_32
effective function
Last index in the last matching text of the ith group of Current.
ith_group_count (i: INTEGER_32): INTEGER_32
effective function
Length of the ith group of Current in the last matching.
append_heading_text (text: STRING, buffer: STRING)
effective procedure
Append in buffer the text before the matching area.
append_pattern_text (text: STRING, buffer: STRING)
effective procedure
Append in buffer the text matching the pattern.
append_tailing_text (text: STRING, buffer: STRING)
effective procedure
Append in buffer the text after the matching area.
append_ith_group (text: STRING, buffer: STRING, i: INTEGER_32)
effective procedure
Append in buffer the text of the ith group.
prepare_substitution (p: STRING)
effective procedure
Set pattern p for substitution.
last_substitution: STRING
writable attribute
You need to copy this STRING if you want to keep it.
substitute_for (text: STRING)
effective procedure
This call has to be precedeed by a sucessful matching on the same text.
substitute_in (text: STRING)
effective procedure
This call has to be precedeed by a sucessful matching on the same text.
substitute_all_for (text: 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 sucessful 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: 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 enougth).
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.