+
Point of view
All features
class PARSE_TABLE [C_ -> PARSE_CONTEXT]
Summary
A parsing table (aka Grammar).
The only way to create a parse table is to use Liberty Eiffel's manifest notation.
The structure of this notation is:
   {PARSE_TABLE[...] << name, atom;
                        name, atom;
                          . . .
                        name, atom
                     >>}
where each name is a STRING and each atom may be either a PARSE_NON_TERMINAL or a PARSE_TERMINAL.
Direct parents
Insert list: LOGGING
Overview
Creation features
{PARSER_FACET}
Features
{ANY}
{}
{PARSE_TABLE}
{PARSER_FACET}
{}
{}
{}
  • 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.
is_coherent: BOOLEAN
effective function
{ANY}
True if all the used atoms are defined
ensure
  • must_be_coherent: Result
has (atom_name: ABSTRACT_STRING): BOOLEAN
effective function
{ANY}
require
  • not atom_name.is_empty
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
{ANY}
require
extend (a_table: PARSE_TABLE [C_ -> PARSE_CONTEXT])
effective procedure
{ANY}
Extends Current with a *copy* of the atoms of a_table.
Any atom with a name already existing in Current is ignored.
require
  • a_table /= Void
  • a_table /= Current
add_or_replace (atom_name: ABSTRACT_STRING, atom: PARSE_ATOM[C_])
effective procedure
{ANY}
require
  • atom_name /= Void
  • atom /= Void
ensure
  • item(atom_name.intern) = atom
item (atom_name: ABSTRACT_STRING): PARSE_ATOM[C_]
effective function
{ANY}
require
  • not atom_name.is_empty
  • has(atom_name)
out_in_tagged_out_memory
effective procedure
{ANY}
Append terse printable representation of current object in tagged_out_memory.
require
  • 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))
pretty_print_on (stream: OUTPUT_STREAM)
effective procedure
{ANY}
require
  • stream.is_connected
for_all_atoms (action: PROCEDURE[TUPLE[TUPLE 1[PARSE_ATOM[C_]]]])
effective procedure
{ANY}
require
  • action /= Void
print_atom (v: PARSE_ATOM[C_], k: FIXED_STRING)
effective procedure
{}
atoms: LINKED_HASHED_DICTIONARY[PARSE_ATOM[C_], FIXED_STRING]
writable attribute
add (name: ABSTRACT_STRING, atom: PARSE_ATOM[C_])
effective procedure
require
  • not has(name)
  • atom.name = Void
ensure
with_capacity (needed_capacity: INTEGER_32)
effective procedure
{}
manifest_make (needed_capacity: INTEGER_32)
effective procedure
{}
manifest_put (index: INTEGER_32, name: ABSTRACT_STRING, atom: PARSE_ATOM[C_])
effective procedure
{}
require
  • not has(name)
  • atom.name = Void
  • atoms.count = index
ensure
  • atom.name = name.intern
  • atoms.count = old atoms.count + 1
  • atoms.last = atom
manifest_semicolon_check: INTEGER_32
is 2
constant attribute
{}
_inline_agent35 (atom: PARSE_ATOM[C_])
frozen
effective procedure
{}
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.