Automatic generation produced by ISE Eiffel

Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:
note description: "Lexical analyzers." legal: "See notice at end of class." status: "See notice at end of class." date: "$Date: 2017-04-14 01:58:10 -0800 (Fri, 14 Apr 2017) $" revision: "$Revision: 100191 $" class interface LEXICAL create make -- Set up lexical analyzer for retrieval. make_new -- Set up a new lexical analyzer feature -- Access buffer: STRING_8 -- Buffer filled by fill_buffer. -- (from TEXT_FILLER) char_buffered_number: INTEGER_32 -- Number of characters read and written -- in buffer since the beginning. -- (from TEXT_FILLER) column_nb_array: LEX_ARRAY [INTEGER_32] -- Array recording the column numbers of each buffered -- character (the column number of the i-th character in the -- buffer is the i-th entry of column_nb_array). -- (from TEXT_FILLER) end_of_text: BOOLEAN -- Has end of input been reached? generating_type: TYPE [detachable LEXICAL] -- 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 keyword_code (word: STRING_8): INTEGER_32 -- Keyword code for word. -- -1 if not a keyword. require word_not_void: word /= Void keyword_string (n: INTEGER_32): STRING_8 -- Keyword corresponding to keyword code n ensure keyword_found: Result /= Void last_is_keyword: BOOLEAN -- Is the last read token a keyword? ensure Result = is_keyword (last_string_read) last_keyword_code: INTEGER_32 -- Keyword code for last token. -- -1 if not a keyword. last_keyword_text: detachable STRING_8 -- Last read string if recognized as a keyword; -- void otherwise. last_string_read: STRING_8 -- String value of last token read last_token: TOKEN -- Last token read line_nb_array: LEX_ARRAY [INTEGER_32] -- Array recording the line numbers of each buffered -- character (the line number of the i-th character in the -- buffer is the i-th entry of line_nb_array). -- (from TEXT_FILLER) No_token: INTEGER_32 = 0 -- Token type for no token recognized. other_possible_tokens: detachable ARRAY [INTEGER_32] -- Other candidate types for last recognized token source_file_path: detachable PATH -- The source file path if source_is_file. -- (from TEXT_FILLER) token_column_number: INTEGER_32 -- Column number of last token read ensure Result >= 1 token_line_number: INTEGER_32 -- Line number of last token read ensure Result >= 1 token_type: INTEGER_32 -- Type of last token read 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: LEXICAL): 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: LEXICAL): BOOLEAN -- Is other attached to an object considered -- equal to current object? -- (from ANY) 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: LEXICAL): 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 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 close_file -- Close input file if any. -- (from TEXT_FILLER) ensure -- from TEXT_FILLER file_is_void: file = Void create_buffers (buf, lin: INTEGER_32) -- Create buffers and mask. -- (from TEXT_FILLER) ensure -- from TEXT_FILLER buffer_size = buf line_length = lin exclude (i, j: INTEGER_32) -- Discard columns i to j from the input. -- A zero value for j means all the way to the -- end of the line. -- (from TEXT_FILLER) require -- from TEXT_FILLER i_positive: i > 0 j_null_or_greater_than_i: j = 0 or j >= i fill_buffer (b: INTEGER_32) -- Copy the characters from the b+1-st to the last one in -- the beginning of the buffer and then fill the end of -- the buffer with the text. This routine skips the columns -- forbidden by exclude, but always puts '\n' at the end -- of a line; the line and column numbers are those of -- the characters in the real file. -- (from TEXT_FILLER) require -- from TEXT_FILLER buffer_created: buffer /= Void c_buffer_created: column_nb_array /= Void l_buffer_created: line_nb_array /= Void b_not_too_large: b <= buffer_size b_positive: b >= 0 fill_whole_buffer -- Fill with new characters. -- (from TEXT_FILLER) resize_and_fill_buffer (buf, b: INTEGER_32) -- When increasing buffer_size: resize the buffer and then -- fill the new buffer. -- When decreasing buffer_size: fill the buffer and then -- resize it. -- When filling the buffer: Copy the characters from the -- b+1-st to the last one (of the buffer before resizing) in -- the beginning of the buffer and then fill -- the end of the buffer (after resizing) with the text. -- This routine skips the columns -- forbidden by exclude, but always puts '\n' at the end -- of a line; the line and column numbers are those of -- the characters in the real file. -- (from TEXT_FILLER) require -- from TEXT_FILLER buffer_created: buffer /= Void c_buffer_created: column_nb_array /= Void l_buffer_created: line_nb_array /= Void b_not_too_large: b <= buffer_size b_positive: b >= 0 ensure -- from TEXT_FILLER buffer_size = buf set_file (f_name: READABLE_STRING_GENERAL) -- Use f_name as input file. -- (from TEXT_FILLER) require -- from TEXT_FILLER file_name_not_void: f_name /= Void ensure -- from TEXT_FILLER source_is_file: source_is_file has_file: attached file has_source_file_path: source_file_path /= Void set_separator_type (type: INTEGER_32) -- Set type to be the type of tokens -- used as separators. ensure separator_token_type = type set_string (s: STRING_8) -- Use s as the input string. -- (from TEXT_FILLER) require -- from TEXT_FILLER string_not_void: s /= Void ensure -- from TEXT_FILLER source_is_string: not source_is_file has_string: attached string feature -- Duplication copy (other: LEXICAL) -- Update current object using fields of object attached -- to other, so as to yield equal objects. -- (from ANY) require -- from ANY other_not_void: other /= Void type_identity: same_type (other) ensure -- from ANY is_equal: Current ~ other frozen deep_copy (other: LEXICAL) -- 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: LEXICAL -- 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: LEXICAL) -- 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: LEXICAL -- 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: LEXICAL -- 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 frozen default: detachable LEXICAL -- 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 feature -- Implementation buffer_size: INTEGER_32 -- Buffer size. -- (from TEXT_FILLER) dfa: FIXED_DFA -- Automaton used for the parsing feature -- Input buffer_item_code (c: INTEGER_32): INTEGER_32 get_any_token -- Try to read a new token. -- Recognize longest possible string. require dfa_not_void: dfa /= Void not_end_of_text: not end_of_text buffers_created: buffer /= Void get_fixed_token (l: INTEGER_32) -- Read new token that matches one of the -- lexical grammar's regular expressions. -- Recognize longest possible string with -- length less than or equal to l. require dfa_not_void: dfa /= Void not_end_of_text: not end_of_text buffers_created: buffer /= Void get_short_token -- Read shortest token that matches one of the -- lexical grammar's regular expressions. require dfa_not_void: dfa /= Void not_end_of_text: not end_of_text buffers_created: buffer /= Void get_token -- Read new token matching one of the regular -- expressions of the lexical grammar. -- Recognize longest possible string; -- ignore unrecognized tokens and separators. ensure end_of_text or (token_type /= separator_token_type and token_type /= 0) 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 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 information about the analyzer's -- current status. 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 invariant -- from ANY reflexive_equality: standard_is_equal (Current) reflexive_conformance: conforms_to (Current) note copyright: "Copyright (c) 1984-2017, 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 LEXICAL
Classes Clusters Cluster hierarchy Chart Relations Flat contracts Go to:

-- Generated by Eiffel Studio --
For more details: eiffel.org