GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
PARSE_TABLE
+
Point of view
INTERNALS_HANDLER
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
PARSE_TABLE
PARSER_FACET
All features
class PARSE_TABLE [C_ ->
PARSE_CONTEXT
]
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:
LOGGING
Overview
top
Creation features
Exported features
is_coherent
:
BOOLEAN
True if all the used atoms are defined
has
(atom_name:
ABSTRACT_STRING
):
BOOLEAN
set_default_tree_builders
(non_terminal_builder:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]], terminal_builder:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
PARSER_IMAGE
]])
extend
(a_table: PARSE_TABLE [C_ ->
PARSE_CONTEXT
])
Extends Current with a *copy* of the atoms of
a_table
.
add_or_replace
(atom_name:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
item
(atom_name:
ABSTRACT_STRING
): PARSE_ATOM[C_]
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
pretty_print_on
(stream:
OUTPUT_STREAM
)
for_all_atoms
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[PARSE_ATOM[C_]]]])
is_coherent
:
BOOLEAN
effective function
top
True if all the used atoms are defined
ensure
must_be_coherent:
Result
has
(atom_name:
ABSTRACT_STRING
):
BOOLEAN
effective function
top
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
top
require
is_coherent
extend
(a_table: PARSE_TABLE [C_ ->
PARSE_CONTEXT
])
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:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
effective procedure
top
require
atom_name /= Void
atom /= Void
ensure
item
(atom_name.intern) = atom
item
(atom_name:
ABSTRACT_STRING
): PARSE_ATOM[C_]
effective function
top
require
not atom_name.is_empty
has
(atom_name)
out_in_tagged_out_memory
effective procedure
top
Append terse printable representation of current object in
tagged_out_memory
.
pretty_print_on
(stream:
OUTPUT_STREAM
)
effective procedure
top
require
stream.is_connected
for_all_atoms
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[PARSE_ATOM[C_]]]])
effective procedure
top
require
action /= Void
{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.