class DESCENDING_NT_NODE
Summary
An internal class used by DESCENDING_NON_TERMINAL that implements the LL(n) parsing algorithm.
Direct parents
Insert list: LOGGING, PARSER_FACET, TRISTATE_VALUES
Class invariant
Overview
Features
{ANY}
{DESCENDING_NON_TERMINAL}
{DESCENDING_NON_TERMINAL, DESCENDING_NT_NODE}
{DESCENDING_NT_NODE}
{}
{}
{}
{ANY}
  • copy (other: DESCENDING_NT_NODE)
    Update current object using fields of object attached to other, so as to yield equal objects.
  • is_equal (other: DESCENDING_NT_NODE): BOOLEAN
    Is other attached to an object considered equal to current object?
{DESCENDING_NT_NODE}
{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}
Append terse printable representation of current object in tagged_out_memory.
require
    • 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))
effective function
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
is_coherent: BOOLEAN
effective function
ensure
  • must_be_coherent: Result
set_default_tree_builder (non_terminal_builder: PROCEDURE[TUPLE 2[FIXED_STRING, TRAVERSABLE[FIXED_STRING]]], path: COLLECTION[FIXED_STRING])
effective procedure
require
  • non_terminal_builder /= Void
set_non_terminal (a_non_terminal: DESCENDING_NON_TERMINAL)
effective procedure
ensure
  • nt = a_non_terminal
require
do_parse (context: DESCENDING_PARSE_CONTEXT): TRISTATE
effective function
require ensure
  • not Result.is_equal(yes) implies context.buffer.current_index = old context.buffer.current_index and then context.actions.count = old context.actions.count
parse_suffices (context: DESCENDING_PARSE_CONTEXT): TRISTATE
effective function
{}
require ensure
  • not Result.is_equal(yes) implies context.buffer.current_index = old context.buffer.current_index and then context.actions.count = old context.actions.count
call_non_terminal_builder (non_terminal_builder: PROCEDURE[TUPLE 2[FIXED_STRING, TRAVERSABLE[FIXED_STRING]]], path: TRAVERSABLE[FIXED_STRING])
effective procedure
{}
make (a_prefix_name: FIXED_STRING, a_nt: DESCENDING_NON_TERMINAL)
effective procedure
{}
require
  • a_prefix_name /= Void
  • a_nt /= Void
ensure
effective procedure
{}
require
  • a_nt /= Void
ensure
copy (other: DESCENDING_NT_NODE)
effective procedure
{ANY}
Update current object using fields of object attached to other, so as to yield equal objects.
Note: you can't copy object from a different dynamic type.
require
    • not immutable
    • same_dynamic_type(other)
    • not immutable
    • same_dynamic_type(other)
ensure
  • is_equal(other)
is_equal (other: DESCENDING_NT_NODE): BOOLEAN
effective function
{ANY}
Is other attached to an object considered equal to current object?
require
    • other /= Void
    • other /= Void
ensure
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)
prefix_name: FIXED_STRING
writable attribute
suffices: HASHED_DICTIONARY[DESCENDING_NT_NODE, FIXED_STRING]
writable attribute
action: PROCEDURE[TUPLE]
writable attribute
end_of_rule: BOOLEAN
writable attribute
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.