class POSIX_REGULAR_EXPRESSION_BUILDER
Summary
Class invariant
Overview
creation features
features
parsing
parsing
sub parts of union
make
  • make
    Initialise the attributes.
behaviors
internal behavior
parsing
results
build
basic
error managment
scanning
assertions
character classes
character class naming
and/or basics
internal_parse
effective procedure
Main parse of a POSIX regular expression.
parse_alternative
effective procedure
Parses an alternative of sequences.
parse_sequence
effective procedure
Parses a sequence of terms.
parse_term
effective procedure
Parses a term.
parse_factor
effective procedure
Parses a factor.
parse_group
effective procedure
Parses a group.
parse_escaped
effective procedure
Parses an escaped character.
parse_text
effective procedure
Parses a text.
parse_union
effective procedure
Parses a union.
parse_union_term
effective procedure
Parses a union term.
parse_union_factor
effective procedure
Parses a union factor.
read_embedded
effective procedure
Parses the text embedded in one of '[.' TEXT '.]'
recorded_character: CHARACTER
writable attribute
Last union_factor's character recorded.
recorded_item: BACKTRACKING_NODE
writable attribute
Last union_factor's item (complex expression) recorded.
set_recorded_character (value: CHARACTER)
effective procedure
Records the union_factor's character 'value'.
set_recorded_item (value: BACKTRACKING_NODE)
effective procedure
Records the union_factor's item (complex expression) 'value'.
emit_recorded
effective procedure
Emits the last union_factor's recorded character or item, depending of its kind.
make
effective procedure
Initialise the attributes.
is_case_insensitive: BOOLEAN
writable attribute
Is the match case insensitive?
is_case_sensitive: BOOLEAN
effective function
Is the match case sensitive?
set_case_sensitive
effective procedure
Set the match as case sensitive.
set_case_insensitive
effective procedure
Set the match as case insensitive.
does_any_match_newline: BOOLEAN
writable attribute
Does the "any character" mark match a newline?
set_any_match_newline
effective procedure
The "any character" mark will match a newline.
set_any_dont_match_newline
effective procedure
The "any character" mark will not match a newline.
does_match_line_boundary: BOOLEAN
writable attribute
Does the begin/end marks match line boundary?
does_match_text_boundary: BOOLEAN
effective function
Does the begin/end marks match text boundary?
set_match_line_boundary
effective procedure
The begin/end marks will match line boundary.
set_match_text_boundary
effective procedure
The begin/end marks will match text boundary.
set_default_options
effective procedure
Set the default options
is_greedy: BOOLEAN
writable attribute
Does match a maximal repeat?
set_greedy
effective procedure
Will match a maximal repeat.
set_not_greedy
effective procedure
Will match a minimal repeat.
is_looking_ahead: BOOLEAN
writable attribute
Is building a look-ahead term?
is_looking_behind: BOOLEAN
writable attribute
Is building a look-behind term?
is_looking_around: BOOLEAN
effective function
Is building look-ahead or look-behind?
is_looking_positive: BOOLEAN
writable attribute
Is the current look-around positive or negative?
parse_expression (expr: STRING)
effective procedure
Set the expression to parse and parse it.
parse
effective procedure
Parse the current expression.
has_result: BOOLEAN
effective function
Did the last 'parse' or 'parse_expression' produced a result in 'last_regular_expression'?
writable attribute
The last regular expression pattern built by 'parse' or 'parse_expression'
writable attribute
The stack of items.
group_stack: FAST_ARRAY[INTEGER_32]
writable attribute
The stack of groups
last_group_count: INTEGER_32
writable attribute
The count of groups currently found.
Repeat_infiny: INTEGER_32
constant attribute
Constant that means "infinite repitition".
emit (item: BACKTRACKING_NODE)
effective procedure
Pushs 'item' on the stack.
effective function
Pops the Result the stack.
emit_any_character
effective procedure
Push the match to any characters
emit_begin_of_line
effective procedure
Push the match to begin of a line
emit_end_of_line
effective procedure
Push the match to end of a line
prepare_group
effective procedure
Declares that a new group begins.
emit_group
effective procedure
Push the "end of group" item and update the group indicators [.. X] -> [.., end_group(i)]
emit_begin_group
effective procedure
Push the "begin of group" item and update the group indicators [..]
emit_end_group
effective procedure
Push the "end of group" item and update the group indicators [..]
emit_match_previous_group (group: INTEGER_32)
effective procedure
Push the item that matches the character 'char' [..]
emit_match_single (char: CHARACTER)
effective procedure
Push the item that matches the character 'char' [..]
emit_match_range (lower: CHARACTER, upper: CHARACTER)
effective procedure
Push the item that matches the character range 'lower'..'
emit_match_text (text: STRING)
effective procedure
Push the item that matches the 'text' [..]
begin_collect
effective procedure
Begin to collect a collection of items by pushing Void on the stack.
is_collect_empty: BOOLEAN
effective function
True if currently begun collect is empty
end_collect_true
effective procedure
Replace an empty collection by TRUE [.., Void] -> [.., TRUE]
end_collect_or
effective procedure
Collects the item on the stack until the collect mark (a Void) and replace it by a single item that is a or of all of them.
effective function
end_collect_and
effective procedure
Collects the item on the stack until the collect mark (a Void) and replace it by a single item that is a and of all of them.
emit_not
effective procedure
Replaces the top of the stack by its negation.
emit_not_then_any
effective procedure
Replaces the top of the stack by its negation followed by any.
emit_true_or
effective procedure
Replaces the top of the stack by true or it [.., X] -> [.., true or X]
emit_or_true
effective procedure
Replaces the top of the stack by it or true [.., X] -> [.., X or true]
emit_controled_or_true
effective procedure
Replaces the top of the stack by if is_greedy then [.., X] -> [.., X or true]
             else [.., X] -> [.., true or X]
controled_or_true_item (x: BACKTRACKING_NODE): BACKTRACKING_NODE
effective function
Returns an item for " 'x' or true ". The returned item depend on the flag 'is_greedy'. if is_greedy then Result = (X or true)
             else Result = (true or X)
emit_repeat (mini: INTEGER_32, maxi: INTEGER_32)
effective procedure
Takes the top of the stack and replace it with a construction that will evaluate the repeating of it from 'mini' to 'maxi' times.
emit_looking
effective procedure
scanned_string: STRING
writable attribute
The expression being currently build.
set_scanned_string (string: STRING)
effective procedure
Set the 'scanned_string' with 'string'.
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.
the_any_character_item: REGULAR_EXPRESSION_ITEM_ANY
once function
the_not_end_of_line_item: REGULAR_EXPRESSION_ITEM_NOT_END_OF_LINE
once function
the_begin_of_line_item: REGULAR_EXPRESSION_ITEM_BEGIN_OF_LINE
once function
once function
the_begin_of_text_item: REGULAR_EXPRESSION_ITEM_BEGIN_OF_TEXT
once function
the_real_end_of_text_item: REGULAR_EXPRESSION_ITEM_END_OF_TEXT
once function
once function
the_begin_of_word_item: REGULAR_EXPRESSION_ITEM_BEGIN_OF_WORD
once function
once function
the_is_posix_alnum_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_ALNUM
once function
the_is_posix_alpha_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_ALPHA
once function
the_is_posix_ascii_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_ASCII
once function
the_is_posix_blank_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_BLANK
once function
the_is_posix_cntrl_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_CNTRL
once function
the_is_posix_digit_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_DIGIT
once function
the_is_posix_graph_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_GRAPH
once function
the_is_posix_lower_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_LOWER
once function
the_is_posix_print_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_PRINT
once function
the_is_posix_punct_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_PUNCT
once function
the_is_posix_space_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_SPACE
once function
the_is_posix_upper_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_UPPER
once function
the_is_posix_word_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_WORD
once function
the_is_posix_xdigit_item: REGULAR_EXPRESSION_ITEM_IS_POSIX_XDIGIT
once function
has_named_posix_item (name: STRING): BOOLEAN
effective function
True if 'name' is for a valid posix character class
named_posix_item (name: STRING): REGULAR_EXPRESSION_ITEM
effective function
the item for the valid posix character class 'name'
has_named_perl_item (name: STRING): BOOLEAN
effective function
True if 'name' is for a valid perl character class
named_perl_item (name: STRING): REGULAR_EXPRESSION_ITEM
effective function
the item for the valid perl character class 'name'
internal_named_posix_item (name: STRING): REGULAR_EXPRESSION_ITEM
effective function
the item for a presumed posix character class 'name'
internal_named_perl_item (name: STRING): REGULAR_EXPRESSION_ITEM
effective function
the item for a presumed perl character class 'name'
the_cut_node: BACKTRACKING_NODE_CUT
once function
the_true_node: BACKTRACKING_NODE_TRUE
once function
the_false_node: BACKTRACKING_NODE_FALSE
once function
the_cut_and_false_node: BACKTRACKING_NODE_CUT_AND_FALSE
once function