GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
PACKRAT_NON_TERMINAL
+
Point of view
PARSE_TABLE
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
PACKRAT_INTERNAL
PACKRAT_PRIMARY
PARSER_FACET
PARSE_TABLE
PACKRAT_NON_TERMINAL
PACKRAT_VISITOR
PACKRAT_SEQUENCE
All features
class PACKRAT_NON_TERMINAL
Summary
top
A non-terminal meant to be put in a
PARSE_TABLE
.
Direct parents
Inherit list:
PACKRAT_ATOM
,
PARSE_NON_TERMINAL
Overview
top
Creation features
make
(a_pattern:
PACKRAT_PATTERN
)
Exported features
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
accept
(visitor:
PACKRAT_VISITOR
)
Accept to be visited by the
visitor
.
pretty_print_on
(stream:
OUTPUT_STREAM
)
is_coherent
:
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
]])
copy
(other: PACKRAT_NON_TERMINAL)
Update current object using fields of object attached to
other
, so as to yield equal objects.
is_equal
(other: PACKRAT_NON_TERMINAL):
BOOLEAN
Is
other
attached to an object considered equal to current object?
name
:
FIXED_STRING
table
: PARSE_TABLE[C_]
set
(a_name:
ABSTRACT_STRING
, a_table: PARSE_TABLE[C_])
set_table
(a_table: PARSE_TABLE[C_])
yes
:
TRISTATE
no
:
TRISTATE
maybe
:
TRISTATE
out_in_tagged_out_memory
effective procedure
top
Append terse printable representation of current object in
tagged_out_memory
.
accept
(visitor:
PACKRAT_VISITOR
)
effective procedure
top
Accept to be visited by the
visitor
.
require
visitor /= Void
pretty_print_on
(stream:
OUTPUT_STREAM
)
effective procedure
top
require
stream.is_connected
stream.is_connected
is_coherent
:
BOOLEAN
effective function
top
require
table /= Void
table /= Void
ensure
must_be_coherent:
Result
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
is_coherent
copy
(other: PACKRAT_NON_TERMINAL)
effective procedure
top
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)
not immutable
same_dynamic_type(other)
not immutable
same_dynamic_type(other)
not immutable
same_dynamic_type(other)
not immutable
same_dynamic_type(other)
ensure
is_equal(other)
is_equal
(other: PACKRAT_NON_TERMINAL):
BOOLEAN
effective function
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
other /= Void
other /= Void
other /= Void
other /= Void
other /= Void
ensure
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
name
:
FIXED_STRING
writable attribute
top
table
: PARSE_TABLE[C_]
writable attribute
top
set
(a_name:
ABSTRACT_STRING
, a_table: PARSE_TABLE[C_])
effective procedure
top
require
name
= Void
table
= Void
not a_name.is_empty
a_table /= Void
ensure
name
= a_name.intern
table
= a_table
set_table
(a_table: PARSE_TABLE[C_])
effective procedure
top
require
a_table /= Void
ensure
table
= a_table
yes
:
TRISTATE
effective function
top
no
:
TRISTATE
effective function
top
maybe
:
TRISTATE
effective function
top