Automatic generation produced by ISE Eiffel
note status: "See notice at end of class." date: "$Date: 2014-01-15 09:27:37 -0900 (Wed, 15 Jan 2014) $" revision: "$Revision: 94004 $" product: "Environment Converter" class interface EC_LEX create make -- Make object. feature -- Initialization make -- Make object. make_analyzer -- Create analyzer (if Void) and initialize it. -- (from METALEX) require -- from METALEX not_initialized: not initialized ensure -- from METALEX initialized analyzer_created: analyzer /= Void lexical_frozen feature -- Access Ack: INTEGER_32 = 6 -- (from ASCII) Ampersand: INTEGER_32 = 38 -- (from ASCII) analyzer: detachable LEXICAL -- The lexical analyzer built so far -- (from LEX_BUILDER) Back_space: INTEGER_32 = 8 -- (from ASCII) Backslash: INTEGER_32 = 92 -- (from ASCII) Bar: INTEGER_32 = 124 -- (from ASCII) Bel: INTEGER_32 = 7 -- (from ASCII) Blank: INTEGER_32 = 32 -- (from ASCII) Break: INTEGER_32 = -7 -- (from ASCII) Bs: INTEGER_32 = 8 -- (from ASCII) Buf_overflow: INTEGER_32 = -9 -- (from ASCII) Can: INTEGER_32 = 24 -- (from ASCII) Carriage_return: INTEGER_32 = 13 -- (from ASCII) Case_diff: INTEGER_32 = 32 -- `lower_a` - `upper_a` -- (from ASCII) case_sensitive: BOOLEAN -- Will future tools be case-sensitive? -- (from LEX_BUILDER) categories_table: detachable ARRAY [INTEGER_32] -- Table of category numbers for each input -- (from LEX_BUILDER) Character_set_size: INTEGER_32 = 128 -- (from ASCII) Circumflex: INTEGER_32 = 94 -- (from ASCII) Closing_brace: INTEGER_32 = 125 -- (from ASCII) Colon: INTEGER_32 = 58 -- (from ASCII) Comma: INTEGER_32 = 44 -- (from ASCII) Commercial_at: INTEGER_32 = 64 -- (from ASCII) Cr: INTEGER_32 = 13 -- (from ASCII) Ctrl_a: INTEGER_32 = 1 -- (from ASCII) Ctrl_b: INTEGER_32 = 2 -- (from ASCII) Ctrl_backslash: INTEGER_32 = 28 -- (from ASCII) Ctrl_c: INTEGER_32 = 3 -- (from ASCII) Ctrl_circumflex: INTEGER_32 = 30 -- (from ASCII) Ctrl_d: INTEGER_32 = 4 -- (from ASCII) Ctrl_e: INTEGER_32 = 5 -- (from ASCII) Ctrl_f: INTEGER_32 = 6 -- (from ASCII) Ctrl_g: INTEGER_32 = 7 -- (from ASCII) Ctrl_h: INTEGER_32 = 8 -- (from ASCII) Ctrl_i: INTEGER_32 = 9 -- (from ASCII) Ctrl_j: INTEGER_32 = 10 -- (from ASCII) Ctrl_k: INTEGER_32 = 11 -- (from ASCII) Ctrl_l: INTEGER_32 = 12 -- (from ASCII) Ctrl_lbracket: INTEGER_32 = 27 -- (from ASCII) Ctrl_m: INTEGER_32 = 13 -- (from ASCII) Ctrl_n: INTEGER_32 = 14 -- (from ASCII) Ctrl_o: INTEGER_32 = 15 -- (from ASCII) Ctrl_p: INTEGER_32 = 16 -- (from ASCII) Ctrl_q: INTEGER_32 = 17 -- (from ASCII) Ctrl_questmark: INTEGER_32 = 127 -- (from ASCII) Ctrl_r: INTEGER_32 = 18 -- (from ASCII) Ctrl_rbracket: INTEGER_32 = 29 -- (from ASCII) Ctrl_s: INTEGER_32 = 19 -- (from ASCII) Ctrl_t: INTEGER_32 = 20 -- (from ASCII) Ctrl_u: INTEGER_32 = 21 -- (from ASCII) Ctrl_underlined: INTEGER_32 = 31 -- (from ASCII) Ctrl_v: INTEGER_32 = 22 -- (from ASCII) Ctrl_w: INTEGER_32 = 23 -- (from ASCII) Ctrl_x: INTEGER_32 = 24 -- (from ASCII) Ctrl_y: INTEGER_32 = 25 -- (from ASCII) Ctrl_z: INTEGER_32 = 26 -- (from ASCII) Dc1: INTEGER_32 = 17 -- (from ASCII) Dc2: INTEGER_32 = 18 -- (from ASCII) Dc3: INTEGER_32 = 19 -- (from ASCII) Dc4: INTEGER_32 = 20 -- (from ASCII) Del: INTEGER_32 = 127 -- (from ASCII) dfa: detachable FIXED_DFA -- DFA built by routine construct_dfa, -- which recognizes the same language. -- (from NDFA) Dle: INTEGER_32 = 16 -- (from ASCII) Dollar: INTEGER_32 = 36 -- (from ASCII) Dot: INTEGER_32 = 46 -- (from ASCII) Doublequote: INTEGER_32 = 34 -- (from ASCII) Down_arrow: INTEGER_32 = -3 -- (from ASCII) Eight: INTEGER_32 = 56 -- (from ASCII) Em: INTEGER_32 = 25 -- (from ASCII) Enq: INTEGER_32 = 5 -- (from ASCII) Eot: INTEGER_32 = 4 -- (from ASCII) Equal_sign: INTEGER_32 = 61 -- (from ASCII) Error_list: ERROR_LIST -- List of error messages -- (from LEX_BUILDER) ensure -- from LEX_BUILDER result_attached: Result /= Void Esc: INTEGER_32 = 27 -- (from ASCII) Etb: INTEGER_32 = 23 -- (from ASCII) Etx: INTEGER_32 = 3 -- (from ASCII) Exclamation: INTEGER_32 = 33 -- (from ASCII) First_printable: INTEGER_32 = 32 -- (from ASCII) Five: INTEGER_32 = 53 -- (from ASCII) Four: INTEGER_32 = 52 -- (from ASCII) Fs: INTEGER_32 = 28 -- (from ASCII) generating_type: TYPE [detachable EC_LEX] -- Type of current object -- (type of which it is a direct instance) -- (from ANY) ensure -- from ANY generating_type_not_void: Result /= Void generator: STRING_8 -- Name of current object's generating class -- (base class of the type of which it is a direct instance) -- (from ANY) ensure -- from ANY generator_not_void: Result /= Void generator_not_empty: not Result.is_empty Grave_accent: INTEGER_32 = 96 -- (from ASCII) Greaterthan: INTEGER_32 = 62 -- (from ASCII) greatest_input: INTEGER_32 -- Greatest input used for the transitions from state -- to state (the smallest one is zero) -- (from AUTOMATON) Gs: INTEGER_32 = 29 -- (from ASCII) has_letters: BOOLEAN -- Are there any letters among the active transitions? -- (from PDFA) Home_arrow: INTEGER_32 = -6 -- (from ASCII) Ht: INTEGER_32 = 9 -- (from ASCII) keyword_h_table: detachable HASH_TABLE [INTEGER_32, STRING_8] -- Keyword table -- (from LEX_BUILDER) keywords_case_sensitive: BOOLEAN -- Will future tools be case-sensitive for keywords? -- (from LEX_BUILDER) Last_ascii: INTEGER_32 = 127 -- (from ASCII) last_character_code: INTEGER_32 -- Last character code recognized by the language -- (from LEX_BUILDER) last_created_tool: INTEGER_32 -- Identification number of the last -- regular expression put in tool_list -- (from LEX_BUILDER) Last_printable: INTEGER_32 = 126 -- (from ASCII) Lbracket: INTEGER_32 = 91 -- (from ASCII) Lcurly: INTEGER_32 = 40 -- (from ASCII) Left_arrow: INTEGER_32 = -4 -- (from ASCII) Lessthan: INTEGER_32 = 60 -- (from ASCII) Letter_layout: INTEGER_32 = 70 -- (from ASCII) lexical_frozen: BOOLEAN -- Has the lexical grammar been finalized? -- | (in other words: has the DFA been built?) -- (from LEX_BUILDER) Line_feed: INTEGER_32 = 10 -- (from ASCII) Lower_a: INTEGER_32 = 97 -- (from ASCII) Lower_b: INTEGER_32 = 98 -- (from ASCII) Lower_c: INTEGER_32 = 99 -- (from ASCII) Lower_d: INTEGER_32 = 100 -- (from ASCII) Lower_e: INTEGER_32 = 101 -- (from ASCII) Lower_f: INTEGER_32 = 102 -- (from ASCII) Lower_g: INTEGER_32 = 103 -- (from ASCII) Lower_h: INTEGER_32 = 104 -- (from ASCII) Lower_i: INTEGER_32 = 105 -- (from ASCII) Lower_j: INTEGER_32 = 106 -- (from ASCII) Lower_k: INTEGER_32 = 107 -- (from ASCII) Lower_l: INTEGER_32 = 108 -- (from ASCII) Lower_m: INTEGER_32 = 109 -- (from ASCII) Lower_n: INTEGER_32 = 110 -- (from ASCII) Lower_o: INTEGER_32 = 111 -- (from ASCII) Lower_p: INTEGER_32 = 112 -- (from ASCII) Lower_q: INTEGER_32 = 113 -- (from ASCII) Lower_r: INTEGER_32 = 114 -- (from ASCII) Lower_s: INTEGER_32 = 115 -- (from ASCII) Lower_t: INTEGER_32 = 116 -- (from ASCII) Lower_u: INTEGER_32 = 117 -- (from ASCII) Lower_v: INTEGER_32 = 118 -- (from ASCII) Lower_w: INTEGER_32 = 119 -- (from ASCII) Lower_x: INTEGER_32 = 120 -- (from ASCII) Lower_y: INTEGER_32 = 121 -- (from ASCII) Lower_z: INTEGER_32 = 122 -- (from ASCII) Minus: INTEGER_32 = 45 -- (from ASCII) Nak: INTEGER_32 = 21 -- (from ASCII) Nine: INTEGER_32 = 57 -- (from ASCII) Nl: INTEGER_32 = 10 -- (from ASCII) Np: INTEGER_32 = 12 -- (from ASCII) Nul: INTEGER_32 = 0 -- (from ASCII) Number_sign: INTEGER_32 = 35 -- (from ASCII) One: INTEGER_32 = 49 -- (from ASCII) Opening_brace: INTEGER_32 = 123 -- (from ASCII) Overflow: INTEGER_32 = -8 -- (from ASCII) Percent: INTEGER_32 = 37 -- (from ASCII) Plus: INTEGER_32 = 43 -- (from ASCII) Questmark: INTEGER_32 = 63 -- (from ASCII) Rbracket: INTEGER_32 = 93 -- (from ASCII) Rcurly: INTEGER_32 = 41 -- (from ASCII) Right_arrow: INTEGER_32 = -5 -- (from ASCII) Rs: INTEGER_32 = 30 -- (from ASCII) selected_tools: detachable LINKED_LIST [INTEGER_32] -- Regular expressions included in the main one -- (from LEX_BUILDER) Semicolon: INTEGER_32 = 59 -- (from ASCII) Seven: INTEGER_32 = 55 -- (from ASCII) Si: INTEGER_32 = 15 -- (from ASCII) Singlequote: INTEGER_32 = 39 -- (from ASCII) Six: INTEGER_32 = 54 -- (from ASCII) Slash: INTEGER_32 = 47 -- (from ASCII) So: INTEGER_32 = 14 -- (from ASCII) Soh: INTEGER_32 = 1 -- (from ASCII) Sp: INTEGER_32 = 32 -- (from ASCII) Star: INTEGER_32 = 42 -- (from ASCII) start_number: INTEGER_32 -- Unique start state used for the beginning of -- the automaton's operation -- (from AUTOMATON) Stx: INTEGER_32 = 2 -- (from ASCII) Sub: INTEGER_32 = 26 -- (from ASCII) Syn: INTEGER_32 = 22 -- (from ASCII) Tabulation: INTEGER_32 = 9 -- (from ASCII) Three: INTEGER_32 = 51 -- (from ASCII) Tilde: INTEGER_32 = 126 -- (from ASCII) token_type_list: detachable LINKED_LIST [INTEGER_32] -- Token types of the selected tools. -- Indexed by tool numbers. -- (from LEX_BUILDER) tool_list: LINKED_LIST [PDFA] -- Regular expressions used as auxiliary tools -- (from LEX_BUILDER) tool_names: LINKED_LIST [STRING_8] -- Names of regular expressions in tool list -- (from LEX_BUILDER) Two: INTEGER_32 = 50 -- (from ASCII) Underlined: INTEGER_32 = 95 -- (from ASCII) Up_arrow: INTEGER_32 = -2 -- (from ASCII) Upper_a: INTEGER_32 = 65 -- (from ASCII) Upper_b: INTEGER_32 = 66 -- (from ASCII) Upper_c: INTEGER_32 = 67 -- (from ASCII) Upper_d: INTEGER_32 = 68 -- (from ASCII) Upper_e: INTEGER_32 = 69 -- (from ASCII) Upper_f: INTEGER_32 = 70 -- (from ASCII) Upper_g: INTEGER_32 = 71 -- (from ASCII) Upper_h: INTEGER_32 = 72 -- (from ASCII) Upper_i: INTEGER_32 = 73 -- (from ASCII) Upper_j: INTEGER_32 = 74 -- (from ASCII) Upper_k: INTEGER_32 = 75 -- (from ASCII) Upper_l: INTEGER_32 = 76 -- (from ASCII) Upper_m: INTEGER_32 = 77 -- (from ASCII) Upper_n: INTEGER_32 = 78 -- (from ASCII) Upper_o: INTEGER_32 = 79 -- (from ASCII) Upper_p: INTEGER_32 = 80 -- (from ASCII) Upper_q: INTEGER_32 = 81 -- (from ASCII) Upper_r: INTEGER_32 = 82 -- (from ASCII) Upper_s: INTEGER_32 = 83 -- (from ASCII) Upper_t: INTEGER_32 = 84 -- (from ASCII) Upper_u: INTEGER_32 = 85 -- (from ASCII) Upper_v: INTEGER_32 = 86 -- (from ASCII) Upper_w: INTEGER_32 = 87 -- (from ASCII) Upper_x: INTEGER_32 = 88 -- (from ASCII) Upper_y: INTEGER_32 = 89 -- (from ASCII) Upper_z: INTEGER_32 = 90 -- (from ASCII) Us: INTEGER_32 = 31 -- (from ASCII) Vt: INTEGER_32 = 11 -- (from ASCII) Zero: INTEGER_32 = 48 -- (from ASCII) feature -- Measurement nb_states: INTEGER_32 -- Number of states in the automaton -- (from AUTOMATON) feature -- Comparison frozen deep_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void -- or attached to isomorphic object structures? -- (from ANY) ensure -- from ANY instance_free: class shallow_implies_deep: standard_equal (a, b) implies Result both_or_none_void: (a = Void) implies (Result = (b = Void)) same_type: (Result and (a /= Void)) implies (b /= Void and then a.same_type (b)) symmetric: Result implies deep_equal (b, a) frozen equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached -- to objects considered equal? -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.is_equal (b)) frozen is_deep_equal alias "≡≡≡" (other: EC_LEX): BOOLEAN -- Are Current and other attached to isomorphic object structures? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY shallow_implies_deep: standard_is_equal (other) implies Result same_type: Result implies same_type (other) symmetric: Result implies other.is_deep_equal (Current) is_equal (other: EC_LEX): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from PDFA) require -- from ANY other_not_void: other /= Void ensure -- from ANY symmetric: Result implies other ~ Current consistent: standard_is_equal (other) implies Result frozen standard_equal (a: detachable ANY; b: like arg #1): BOOLEAN -- Are a and b either both void or attached to -- field-by-field identical objects of the same type? -- Always uses default object comparison criterion. -- (from ANY) ensure -- from ANY instance_free: class definition: Result = (a = Void and b = Void) or else ((a /= Void and b /= Void) and then a.standard_is_equal (b)) frozen standard_is_equal alias "≜" (other: EC_LEX): BOOLEAN -- Is other attached to an object of the same type -- as current object, and field-by-field identical to it? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY same_type: Result implies same_type (other) symmetric: Result implies other.standard_is_equal (Current) feature -- Status report conforms_to (other: ANY): BOOLEAN -- Does type of current object conform to type -- of other (as per Eiffel: The Language, chapter 13)? -- (from ANY) require -- from ANY other_not_void: other /= Void descriptor: EC_DESCRIPTOR ecl_error: BOOLEAN -- Did lexical analysis succeeded? ecl_message: STRING_8 ecl_nb_token: INTEGER_32 same_type (other: ANY): BOOLEAN -- Is type of current object identical to type of other? -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY definition: Result = (conforms_to (other) and other.conforms_to (Current)) feature -- Status setting ecl_analyze (input_string: STRING_8) -- Perform lexical analysis on input_string. -- Fill the token list. require input_string_exists: input_string /= Void descriptor_exists: descriptor /= Void descriptor_is_ok: not descriptor.ecd_error analyzer_is_built: analyzer /= Void ecl_build (s: READABLE_STRING_GENERAL) -- Retrieve analyzer associated with current object description -- if it exists, else build a new one according to current description -- and store it. require descriptor_exists: descriptor /= Void descriptor_is_ok: not descriptor.ecd_error argument_exists: s /= Void ensure analyzer_built: analyzer /= Void Ecl_token_array: ARRAYED_LIST [TOKEN] -- Array of tokens require descriptor_exists: descriptor /= Void descriptor_is_ok: not descriptor.ecd_error set_descriptor (e: EC_DESCRIPTOR) -- Set ecl_descriptor with e. require descriptor_exits: e /= Void set_e_transition (source, target: INTEGER_32) -- Set epsilon transition from source to target. -- (from PDFA) require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states set_final (s, r: INTEGER_32) -- Make s the final state of regular expression r. -- (from PDFA) set_letters -- Direct the active transitions to include letters. -- (from PDFA) set_start (n: INTEGER_32) -- Select state n as the starting state. -- (from AUTOMATON) require -- from AUTOMATON no_other_start: start_number = 0 or start_number = n is_in_automaton: n <= nb_states and n >= 1 set_transition (source, input_doc, target: INTEGER_32) -- Set transition from source to target on input_doc. -- (from PDFA) require -- from AUTOMATON True require else -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else -- from PDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input good_successor: target = source + 1 feature -- Element change add_keyword (word: STRING_8) -- Insert word in the keyword list. -- (from PDFA) add_word (s: STRING_8; n: INTEGER_32) -- Record the word s and -- associate it with token type n. -- (from METALEX) require -- from METALEX s_not_void: s /= Void s_not_empty: s.capacity >= 1 any_character -- Create regular expression $. matching all characters. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen any_printable -- Create regular expression $P matching all -- printable characters. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen append (p, s: INTEGER_32) -- Create regular expression ps: -- s appended to p. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen p_in_tool: p >= 1 and p <= last_created_tool s_in_tool: s >= 1 and s <= last_created_tool append_optional (p, s: INTEGER_32) -- Create regular expression p[`s']: -- s optionally appended to p. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen p_in_tool: p >= 1 and p <= last_created_tool s_in_tool: s >= 1 and s <= last_created_tool associate (t, n: INTEGER_32) -- Associate the t-th tool with token type n. -- If this routine is not used, the default value is t. -- (from LEX_BUILDER) require -- from LEX_BUILDER t_selected: attached selected_tools as rl_selected_tools and then rl_selected_tools.has (t) token_type_not_void: token_type_list /= Void n_not_zero: n /= 0 n_not_minus_one: n /= -1 build_dollar_any -- Build $., matching any character. -- (from HIGH_BUILDER) require -- from HIGH_BUILDER good_first_character: description.item (cursor) = '.' build_dollar_b -- Build $B, matching any number of break characters: -- blank, new-line, tabulation, carriage-return. -- (from HIGH_BUILDER) build_dollar_n -- Build $N, matching natural integer constants. -- +('0'..'9') -- (from HIGH_BUILDER) build_dollar_p -- Build $P, matching any printable character. -- (from HIGH_BUILDER) require -- from HIGH_BUILDER good_first_character: description.item (cursor) = 'P' build_dollar_r -- Build $R, matching floating point constants. -- ['+' | '-'] +('0'..'9') '.' *('0'..'9') ['e' | 'E' ['+' | '-'] -- +('0'..'9')] -- (from HIGH_BUILDER) build_dollar_z -- Build $Z, matching possibly signed integer constants. -- ['+' | '-'] +('0'..'9') -- (from HIGH_BUILDER) case_insensitive (c: INTEGER_32) -- Create regular expression ~(c): -- like c, but case-insensitive. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen z_possible: last_character_code >= Lower_z c_in_tool: c >= 1 and c <= last_created_tool difference (r: INTEGER_32; c: CHARACTER_8) -- Create regular expression representing -- the difference r - c. -- r must be a simple category, such as a..z, -- or a union of simple categories, -- such as a..z | 0..9. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen r_exists: r >= 1 and r <= last_created_tool r_simple_category: attached tool_list as rl_tools and then rl_tools.i_th (r).nb_states = 2 include (fa: PDFA; shift: INTEGER_32) -- Copy fa with state numbers shifted -- by shift positions in the transitions. -- Do not preserve the final values. -- (from PDFA) require -- from PDFA same_inputs: greatest_input = fa.greatest_input nb_states_large_enough: nb_states >= fa.nb_states + shift interval (b, e: CHARACTER_8) -- Create regular expression b..e, or b if b = e. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_built: not lexical_frozen e_code_small_enough: e.code <= last_character_code b_code_large_enough: b.code >= 0 b_before_e: b.code <= e.code iteration (c: INTEGER_32) -- Create regular expression *(c): zero or more -- consecutive occurrences of c. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen c_in_tool: c >= 1 and c <= last_created_tool iteration1 (c: INTEGER_32) -- Create regular expression +(c): one or more -- consecutive occurrences of c. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen c_in_tool: c >= 1 and c <= last_created_tool iteration_n (n, c: INTEGER_32) -- Create regular expression n(c): -- exactly n consecutive occurrences of c. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen n_large_enough: n > 0 c_in_tool: c >= 1 and c <= last_created_tool optional (c: INTEGER_32) -- Create regular expression [`c']: -- optional c. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen c_in_tool: c >= 1 and c <= last_created_tool prepend_optional (p, s: INTEGER_32) -- Create regular expression [`p']s: -- s appended to optional p. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen p_in_tool: p >= 1 and p <= last_created_tool s_in_tool: s >= 1 and s <= last_created_tool pdfa_put (v: like pdfa_item; i: INTEGER_32) -- Replace i-th entry, if in index interval, by v. -- (from PDFA) require -- from PDFA valid_index: i >= 1 and i <= nb_states put_expression (s: STRING_8; n: INTEGER_32; c: STRING_8) -- Record the regular expression described by s -- and associate it with token type n and name c. -- (from METALEX) require -- from METALEX source_long_enough: s.capacity > 0 put_keyword (s: STRING_8; exp: INTEGER_32) -- Declare s as a keyword described by -- the regular expression of code exp. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen exp_selected: attached token_type_list as rl_token_types and then rl_token_types.has (exp) selected_tools: selected_tools /= Void put_nameless_expression (s: STRING_8; n: INTEGER_32) -- Record the regular expression described -- by s, and associate it with token type n. -- (from HIGH_BUILDER) require -- from HIGH_BUILDER source_long_enough: s.count > 0 recognize (s: STRING_8): INTEGER_32 -- Token_type of s; 0 if not recognized -- (from LEX_BUILDER) remove_case_sensitiveness -- Remove case sensitiveness. -- (from PDFA) require -- from PDFA z_possible: greatest_input >= Lower_z select_tool (i: INTEGER_32) -- Select the i_th tool for inclusion in the main -- regular expression. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen i_exist: i > 0 and i <= last_created_tool ensure -- from LEX_BUILDER selected_tools_attached: selected_tools /= Void token_types_attached: token_type_list /= Void i_selected: attached selected_tools as el_selected_tools and then el_selected_tools.has (i) set_word (word: STRING_8) -- Create regular expression for word: -- synonym for concatenation (w o r d). -- (from LEX_BUILDER) require -- from LEX_BUILDER word_not_empty: word.count >= 1 union (a, b: INTEGER_32) -- Create regular expression for the multiple union -- a | a+1 | .. | b: matches any occurrence of -- a, or a+1, .., or b. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen a_not_too_small: a >= 1 b_not_too_large: b <= last_created_tool a_smaller_than_b: a <= b union2 (a, b: INTEGER_32) -- Create regular expression a | b: union of -- a and b (matches an occurrence of a or b)). -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen a_in_tool: a >= 1 and a <= last_created_tool b_in_tool: b >= 1 and b <= last_created_tool up_to (word: STRING_8) -- Create regular expression ->"word", which is a -- set of any number of any characters ended by "word". -- Example: "/* C comment */" matches (->"*/"). -- The difference between (+$. '*' '/') and -- (->"*/") is that "*/..*/..*/" matches -- the first but not the second. -- The difference between -- ((($.-'*') | ('*'($.-'/'))) +('*' '/') ) -- and "(->"*/")" is that "..**/" matches -- the second but not the first. -- (from LEX_BUILDER) require -- from LEX_BUILDER word_not_empty: word.count > 0 not_frozen: not lexical_frozen feature -- Removal delete_transition (source, input_doc, target: INTEGER_32) -- Delete transition from source to target on input_doc. -- (from PDFA) require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else -- from PDFA source_in_automaton: source >= 1 and source <= nb_states target_in_automaton: target >= 1 and target <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input good_successor: target = source + 1 remove -- Remove the last regular expression -- from the tool list. -- (from LEX_BUILDER) require -- from LEX_BUILDER not_frozen: not lexical_frozen at_least_one_regular: last_created_tool >= 1 feature -- Transformation construct_dfa -- Create an equivalent deterministic finite automaton. -- (from NDFA) require -- from NDFA start_number_designated: start_number > 0 ensure -- from NDFA sets_list_attached: sets_list /= Void set_tree_attached: set_tree /= Void feature -- Conversion charconv (i: INTEGER_32): CHARACTER_8 -- Character associated with integer value i. -- (from BASIC_ROUTINES) ensure -- from BASIC_ROUTINES instance_free: class feature -- Duplication copy (other: EC_LEX) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from PDFA) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: EC_LEX) -- Effect equivalent to that of: -- `copy` (other . `deep_twin`) -- (from ANY) require -- from ANY other_not_void: other /= Void ensure -- from ANY deep_equal: deep_equal (Current, other) frozen deep_twin: EC_LEX -- New object structure recursively duplicated from Current. -- (from ANY) ensure -- from ANY deep_twin_not_void: Result /= Void deep_equal: deep_equal (Current, Result) frozen standard_copy (other: EC_LEX) -- Copy every field of other onto corresponding field -- of current object. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_standard_equal: standard_is_equal (other) frozen standard_twin: EC_LEX -- New object field-by-field identical to other. -- Always uses default copying semantics. -- (from ANY) ensure -- from ANY standard_twin_not_void: Result /= Void equal: standard_equal (Result, Current) frozen twin: EC_LEX -- New object equal to Current -- `twin` calls `copy`; to change copying/twinning semantics, redefine `copy`. -- (from ANY) ensure -- from ANY twin_not_void: Result /= Void is_equal: Result ~ Current feature -- Basic operations bottom_int_div (n1, n2: INTEGER_32): INTEGER_32 -- Greatest lower bound of the integer division of n1 by n2. -- (from BASIC_ROUTINES) ensure -- from BASIC_ROUTINES instance_free: class frozen default: detachable EC_LEX -- Default value of object's type -- (from ANY) frozen default_pointer: POINTER -- Default value of type POINTER -- (Avoid the need to write p.`default` for -- some p of type POINTER.) -- (from ANY) ensure -- from ANY instance_free: class default_rescue -- Process exception for routines with no Rescue clause. -- (Default: do nothing.) -- (from ANY) frozen do_nothing -- Execute a null action. -- (from ANY) ensure -- from ANY instance_free: class up_int_div (n1, n2: INTEGER_32): INTEGER_32 -- Least upper bound of the integer division -- of n1 by n2. -- (from BASIC_ROUTINES) ensure -- from BASIC_ROUTINES instance_free: class feature -- Implementation cursor: INTEGER_32 -- Position in description. -- (from HIGH_BUILDER) description: STRING_8 -- Description of the regular expression. -- (from HIGH_BUILDER) find_e_successors (source: INTEGER_32): detachable LINKED_LIST [INTEGER_32] -- Epsilon successors of source; -- Void if no successor. -- (from PDFA) require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states require else -- from PDFA source_in_automaton: source >= 1 and source <= nb_states find_successors (source, input_doc: INTEGER_32): detachable LINKED_LIST [INTEGER_32] -- Successors of source on input_doc; -- void if no successor. -- (from PDFA) require -- from NDFA source_in_automaton: source >= 1 and source <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input require else -- from PDFA source_in_automaton: source >= 1 and source <= nb_states possible_input_doc: input_doc >= 0 and input_doc <= greatest_input initialized: BOOLEAN -- Is analyzer initialized? -- (from LEX_BUILDER) set_state -- This routine is deferred in NDFA, -- but is useless in PDFA. -- (from PDFA) feature Basic_ttype: INTEGER_32 = 11 -- (from EC_TYPES) Boolean_ttype: INTEGER_32 = 10 -- (from EC_TYPES) Field_sep_ttype: INTEGER_32 = 6 -- (from EC_TYPES) Identifier_ttype: INTEGER_32 = 1 -- (from EC_TYPES) Integer_ttype: INTEGER_32 = 4 -- (from EC_TYPES) Label_sep_ttype: INTEGER_32 = 12 -- (from EC_TYPES) Left_del_ttype: INTEGER_32 = 8 -- (from EC_TYPES) Real_ttype: INTEGER_32 = 3 -- (from EC_TYPES) Right_del_ttype: INTEGER_32 = 9 -- (from EC_TYPES) Separator_ttype: INTEGER_32 = 7 -- (from EC_TYPES) Space_ttype: INTEGER_32 = 5 -- (from EC_TYPES) String_ttype: INTEGER_32 = 2 -- (from EC_TYPES) feature -- Input No_token: INTEGER_32 = 0 -- (from METALEX) read_grammar (token_file_name: STRING_8) -- Create lexical analyzer for grammar in file of name -- token_file_name. File structure: -- One or more lines of the form -- name regular_expression -- then a line beginning with two dashes -- -- then zero or more lines containing one keyword each. -- (from METALEX) ensure -- from METALEX analyzer_exists: analyzer /= Void retrieve_analyzer (file_name: READABLE_STRING_GENERAL) -- Retrieve `analyzer` from file named file_name. -- (from LEX_BUILDER) feature -- Output Io: STD_FILES -- Handle to standard file setup -- (from ANY) ensure -- from ANY instance_free: class io_not_void: Result /= Void out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY out_not_void: Result /= Void print (o: detachable ANY) -- Write terse external representation of o -- on standard output. -- (from ANY) ensure -- from ANY instance_free: class store_analyzer (file_name: READABLE_STRING_GENERAL) -- Store `analyzer` in file named file_name. -- (from LEX_BUILDER) require -- from LEX_BUILDER initialized: initialized ensure -- from LEX_BUILDER analyzer_attached: analyzer /= Void frozen tagged_out: STRING_8 -- New string containing terse printable representation -- of current object -- (from ANY) ensure -- from ANY tagged_out_not_void: Result /= Void trace -- Output an internal representation -- of the current automaton. -- (from PDFA) feature -- Platform Operating_environment: OPERATING_ENVIRONMENT -- Objects available from the operating system -- (from ANY) ensure -- from ANY instance_free: class operating_environment_not_void: Result /= Void feature -- Status setting distinguish_case -- Make letter case significant in future tools. -- Default is ignore case. -- (from LEX_BUILDER) ensure -- from LEX_BUILDER case_sensitive ignore_case -- Make letter case not significant in future tools. -- This is the default. -- (from LEX_BUILDER) ensure -- from LEX_BUILDER not case_sensitive keywords_distinguish_case -- Make letter case not significant for keywords -- in future tools. -- Default is ignore case. -- (from LEX_BUILDER) require -- from LEX_BUILDER no_tool_built: not attached tool_list as l_tools or else l_tools.is_empty ensure -- from LEX_BUILDER keywords_case_sensitive keywords_ignore_case -- Make letter case not significant for keywords -- in future tools. -- This is the default. -- (from LEX_BUILDER) require -- from LEX_BUILDER no_tool_built: not attached tool_list as l_tools or else l_tools.is_empty ensure -- from LEX_BUILDER not keywords_case_sensitive invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) -- from HIGH_BUILDER cursor_not_too_far: cursor <= description_length -- from LEX_BUILDER analyzer_attached: initialized implies analyzer /= Void last_created: not attached tool_list as il_tool_list or else last_created_tool = il_tool_list.count consistent: dfa /= Void implies categories_table /= Void note copyright: "Copyright (c) 1984-2014, Eiffel Software and others" license: "Eiffel Forum License v2 (see http://www.eiffel.com/licensing/forum.txt)" source: "[ Eiffel Software 5949 Hollister Ave., Goleta, CA 93117 USA Telephone 805-685-1006, Fax 805-685-6869 Website http://www.eiffel.com Customer support http://support.eiffel.com ]" end -- class EC_LEX -- Generated by Eiffel Studio --
For more details: eiffel.org