home
classes/clusters list
class information
+
Point of view
ANY
ANY
PARSE_TABLE
TYPED_INTERNALS
INTERNALS_HANDLER
All features
class PARSE_TABLE
Summary
top
A parsing table (aka Grammar).
The only way to create a parse table is to use SmartEiffel'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:
ANY
Overview
top
creation features
exported features
is_coherent
:
BOOLEAN
True if all the used atoms are defined
has
(atom_name:
STRING
):
BOOLEAN
set_default_tree_builders
(non_terminal_builder:
PROCEDURE
[
TUPLE 2
[
STRING
,
TRAVERSABLE
[
STRING
]]], terminal_builder:
PROCEDURE
[
TUPLE 2
[
STRING
,
PARSER_IMAGE
]])
extend
(a_table: PARSE_TABLE)
Extends Current with a *copy* of the atoms of
a_table
.
add_or_replace
(atom_name:
STRING
, atom:
PARSE_ATOM
)
item
(atom_name:
STRING
):
PARSE_ATOM
is_coherent
:
BOOLEAN
effective function
top
True if all the used atoms are defined
ensure
must_be_coherent:
Result
has
(atom_name:
STRING
):
BOOLEAN
effective function
top
require
not atom_name.is_empty
set_default_tree_builders
(non_terminal_builder:
PROCEDURE
[
TUPLE 2
[
STRING
,
TRAVERSABLE
[
STRING
]]], terminal_builder:
PROCEDURE
[
TUPLE 2
[
STRING
,
PARSER_IMAGE
]])
effective procedure
top
require
is_coherent
extend
(a_table: PARSE_TABLE)
effective procedure
top
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:
STRING
, atom:
PARSE_ATOM
)
effective procedure
top
require
atom_name /= Void
atom /= Void
ensure
item
(atom_name) = atom
item
(atom_name:
STRING
):
PARSE_ATOM
effective function
top
require
not atom_name.is_empty
has
(atom_name)
{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.