class DESCENDING_NON_TERMINAL
Summary
A non-terminal meant to be put in a PARSE_TABLE.
The only way to create a non-terminal is to use Liberty Eiffel's manifest notation.
The structure of this notation is:
   {DESCENDING_NON_TERMINAL << rule, agent;
                               rule, agent;
                                 . . .
                               rule, agent
                            >>}
where each rule is a TRAVERSABLE[STRING] (with each String being the name of an atom of the PARSE_TABLE), and each agent may either be Void or a PROCEDURE[TUPLE] called when reducing the non-terminal.
Direct parents
Inherit list: PARSE_NON_TERMINAL
Overview
Creation features
Features
{ANY}
{PARSE_TABLE}
{PARSER_FACET}
{ANY}
{DESCENDING_NON_TERMINAL}
{}
{}
{ANY}
{PARSE_TABLE}
{}
{ANY}
{}
  • log: LOGGER
    There is one logger per concrete type; for performance reasons it is cached in each instance.
  • log_memory__0_: LOGGER
    The cached logger.
out_in_tagged_out_memory
effective procedure
{ANY}
require
    • locked: tagged_out_locked
      • locked: tagged_out_locked
      • locked: tagged_out_locked
ensure
  • still_locked: tagged_out_locked
  • not_cleared: tagged_out_memory.count >= old tagged_out_memory.count
  • append_only: old tagged_out_memory.twin.is_equal(tagged_out_memory.substring(1, old tagged_out_memory.count))
is_coherent: BOOLEAN
effective function
{ANY}
require
  • table /= Void
ensure
  • must_be_coherent: Result
pretty_print_on (stream: OUTPUT_STREAM)
effective procedure
{ANY}
require
  • stream.is_connected
set_default_tree_builders (non_terminal_builder: PROCEDURE[TUPLE 2[FIXED_STRING, TRAVERSABLE[FIXED_STRING]]], terminal_builder: PROCEDURE[TUPLE 2[FIXED_STRING, PARSER_IMAGE]])
effective procedure
require
  • is_coherent
effective function
The Result is yes if the parsing succeeded, no if there was a syntax error, or maybe if the parse could complete with some more text.
require
  • context /= Void
ensure
  • context.actions.count >= old context.actions.count
  • not Result.is_equal(yes) implies context.buffer.current_index = old context.buffer.current_index and then context.actions.count = old context.actions.count
copy (other: DESCENDING_NON_TERMINAL)
effective procedure
{ANY}
require
    • not immutable
    • same_dynamic_type(other)
      • not immutable
      • same_dynamic_type(other)
      • not immutable
      • same_dynamic_type(other)
ensure
  • is_equal(other)
is_equal (other: DESCENDING_NON_TERMINAL): BOOLEAN
effective function
{ANY}
require
    • other /= Void
      • other /= Void
      • other /= Void
ensure
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
add (rule: TRAVERSABLE[FIXED_STRING], action: PROCEDURE[TUPLE])
effective procedure
{ANY}
parser_tree: DESCENDING_NT_NODE
writable attribute
tree_builder_path_used: FAST_ARRAY[FAST_ARRAY[FIXED_STRING]]
once function
{}
tree_builder_path_free: FAST_ARRAY[FAST_ARRAY[FIXED_STRING]]
once function
{}
tree_builder_path: FAST_ARRAY[FIXED_STRING]
writable attribute
{}
save_tree_builder_path
effective procedure
{}
ensure
restore_tree_builder_path
effective procedure
{}
require ensure
free_tree_builder_path: FAST_ARRAY[FIXED_STRING]
effective function
{}
ensure
  • Result.is_empty
manifest_make (needed_capacity: INTEGER_32)
effective procedure
{}
effective procedure
{}
require
  • rule /= Void
manifest_semicolon_check: INTEGER_32
is 2
constant attribute
{}
writable attribute
{ANY}
table: PARSE_TABLE[C_]
writable attribute
{ANY}
set (a_name: ABSTRACT_STRING, a_table: PARSE_TABLE[C_])
effective procedure
require
  • name = Void
  • table = Void
  • not a_name.is_empty
  • a_table /= Void
ensure
set_table (a_table: PARSE_TABLE[C_])
effective procedure
require
  • a_table /= Void
ensure
add_error_position (error: STRING, buffer: MINI_PARSER_BUFFER)
effective procedure
{}
print_error_position (o: OUTPUT_STREAM, buffer: MINI_PARSER_BUFFER)
effective procedure
{}
yes: TRISTATE
effective function
{ANY}
effective function
{ANY}
maybe: TRISTATE
effective function
{ANY}
log: LOGGER
effective function
{}
There is one logger per concrete type; for performance reasons it is cached in each instance.
ensure
  • Result /= Void
log_memory__0_: LOGGER
writable attribute
{}
The cached logger.
The ugly name is intentional. Don't use directly.