Top Prev Next Up Down
The type RE_Elem
RE_Elem is a tree like structure with nodes. When the compiler in
package Y2018-Text-Jets-Compiler
compiles the regular expression the result is a linked list with
nodes of type RE_Elem, in this paper this is called the ‘syntax
tree’. After the compilation the syntax tree is cleaned up and and
nodes marked as only in the translation are converted to REQ_CLASS
nodes.
The fixed part of RE_Elem
- id : RE_ID – identifier of a node
- left : RE_Elem_AC – left link
- right : RE_Elem_AC – right link
- V : REQ_TY – identifier of the variable part
The variable part consists of one of
- REQ_BEGIN
- begin_circumflex : Boolean - if expression starts with
^-character
- begin_dollar : Boolean - if expression ends with
$-character
- REQ_CHAR
- char_value : CodePoint
- char_negative : Boolean - not this value
- char_min : Integer – 0:Integer'Last
- char_max : Integer
- char_greedy : Boolean
- char_maxORG : Integer - orginal char_max value from
compilation
- char_greedy : Boolean
- REQ_PERIOD
- period_min : Integer – 0:Integer'Last
- period_max : Integer
- period_maxORG: Integer - orginal period_max value from
compilation
- period_greedy : Boolean
- REQ_CLASS_ELEM (Exists only
during translation)
- class_elem_min : Integer – 0:Integer'Last
- class_elem_max : Integer
- class_elem_greedy : Boolean
- class_elem_pos : RE_Elem_AC
- class_elem_neg : RE_Elem_AC
- REQ_CLASS (Created after
translation)
- class_min : Integer – 0:Integer'Last
- class_max : Integer
- class_maxORG : Integer - orginal class_max value from
compilation
- class_greedy : Boolean
- class_pos : RangeVectorPack.RangeVector
- class_neg : RangeVectorPack.RangeVector
- REQ_CLASS_CHAR (Exists only
during translation)
- class_char_negative : Boolean
- class_char_value : CodePoint – no meta characters
- REQ_CLASS_RANGE (Exists only
during translation)
- class_range_negative : Boolean
- class_range_first : CodePoint
- class_range_last : CodePoint
- REQ_CLASS_GC (Exists only
during translation)
- class_gc_negative : Boolean
- class_gc_value : CFix(1..2)
- REQ_CLASS_GCU (Exists only
during translation)
- class_gcu_negative : Boolean
- class_gcu_value : CodePoint
- REQ_CLASS_SET (Exists only
during translation)
- class_set_negative : Boolean
- class_set_value : CVar
- REQ_CLASS_OTHER (Exists only
during translation)
- class_other_negative : Boolean
- class_other_value : CodePoint
- REQ_PALCAP
- palcap_min : Integer – 0:Integer'Last
- palcap_max : Integer
- palcap_greedy : Boolean
- palcap_up : RE_Elem_AC –
null if on base line
- palcap_down : RE_Elem_AC
- palcap_ia: I_A - index in c4match, i.e. index from the
CFix array which is searched
- REQ_PAL
- pal_dummy: Boolean
- pal_min : Integer – 0:Integer'Last
- pal_max : Integer
- pal_greedy : Boolean
- pal_up : RE_Elem_AC – null
if on base line
- pal_down : RE_Elem_AC
- REQ_UPDOWN
- updown_up : RE_Elem_AC –
null if on base line
- updown_down : RE_Elem_AC
- REQ_POS
- pos_up : RE_Elem_AC – null
if on base line
- pos_down : RE_Elem_AC
- REQ_NEG
- neg_up : RE_Elem_AC – null
if on base line
- neg_down : RE_Elem_AC
- REQ_NULL (Dummy)