GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
PARSE_TABLE
+
Point of view
All features
ANY
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 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
top
Creation features
{
PARSER_FACET
}
with_capacity
(needed_capacity:
INTEGER_32
)
manifest_make
(needed_capacity:
INTEGER_32
)
Features
{
ANY
}
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_]]]])
{}
print_atom
(v: PARSE_ATOM[C_], k:
FIXED_STRING
)
{
PARSE_TABLE
}
atoms
: LINKED_HASHED_DICTIONARY[PARSE_ATOM[C_],
FIXED_STRING
]
{
PARSER_FACET
}
add
(name:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
{}
with_capacity
(needed_capacity:
INTEGER_32
)
manifest_make
(needed_capacity:
INTEGER_32
)
manifest_put
(index:
INTEGER_32
, name:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
manifest_semicolon_check
:
INTEGER_32
{}
_inline_agent35
(atom: PARSE_ATOM[C_])
{}
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
}
top
True if all the used atoms are defined
ensure
must_be_coherent:
Result
has
(atom_name:
ABSTRACT_STRING
):
BOOLEAN
effective function
{
ANY
}
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
{
ANY
}
top
require
is_coherent
extend
(a_table: PARSE_TABLE [C_ ->
PARSE_CONTEXT
])
effective procedure
{
ANY
}
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
{
ANY
}
top
require
atom_name /= Void
atom /= Void
ensure
item
(atom_name.intern) = atom
item
(atom_name:
ABSTRACT_STRING
): PARSE_ATOM[C_]
effective function
{
ANY
}
top
require
not atom_name.is_empty
has
(atom_name)
out_in_tagged_out_memory
effective procedure
{
ANY
}
top
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
}
top
require
stream.is_connected
for_all_atoms
(action:
PROCEDURE
[
TUPLE
[TUPLE 1[PARSE_ATOM[C_]]]])
effective procedure
{
ANY
}
top
require
action /= Void
print_atom
(v: PARSE_ATOM[C_], k:
FIXED_STRING
)
effective procedure
{}
top
atoms
: LINKED_HASHED_DICTIONARY[PARSE_ATOM[C_],
FIXED_STRING
]
writable attribute
{
PARSE_TABLE
}
top
add
(name:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
effective procedure
{
PARSER_FACET
}
top
require
not
has
(name)
atom.name = Void
ensure
atoms
.count = old
atoms
.count + 1
atoms
.last = atom
with_capacity
(needed_capacity:
INTEGER_32
)
effective procedure
{}
top
manifest_make
(needed_capacity:
INTEGER_32
)
effective procedure
{}
top
manifest_put
(index:
INTEGER_32
, name:
ABSTRACT_STRING
, atom: PARSE_ATOM[C_])
effective procedure
{}
top
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
{}
top
_inline_agent35
(atom: PARSE_ATOM[C_])
frozen
effective procedure
{}
top
log
:
LOGGER
effective function
{}
top
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
{}
top
The cached logger.
The ugly name is intentional. Don't use directly.