GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
DESCENDING_NT_NODE
+
Point of view
DESCENDING_NT_NODE
ANY
INTERNALS_HANDLER
TYPED_INTERNALS
DESCENDING_NON_TERMINAL
DESCENDING_NT_NODE
All features
class DESCENDING_NT_NODE
Summary
top
An internal class used by
DESCENDING_NON_TERMINAL
that implements the LL(n) parsing algorithm.
Direct parents
Insert list:
LOGGING
,
PARSER_FACET
,
TRISTATE_VALUES
Class invariant
top
backlinked:
nt
/= Void
Overview
top
Creation features
make
(a_prefix_name:
FIXED_STRING
, a_nt:
DESCENDING_NON_TERMINAL
)
Exported features
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
is_coherent
:
BOOLEAN
set_default_tree_builder
(non_terminal_builder:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]], path:
COLLECTION
[
FIXED_STRING
])
set_non_terminal
(a_non_terminal:
DESCENDING_NON_TERMINAL
)
do_add
(a_action:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]], rule:
TRAVERSABLE
[
FIXED_STRING
], i:
INTEGER_32
)
do_parse
(context:
DESCENDING_PARSE_CONTEXT
):
TRISTATE
copy
(other: DESCENDING_NT_NODE)
Update current object using fields of object attached to
other
, so as to yield equal objects.
is_equal
(other: DESCENDING_NT_NODE):
BOOLEAN
Is
other
attached to an object considered equal to current object?
prefix_name
:
FIXED_STRING
suffices
:
HASHED_DICTIONARY
[DESCENDING_NT_NODE,
FIXED_STRING
]
nt
:
DESCENDING_NON_TERMINAL
action
:
PROCEDURE
[
TUPLE
]
end_of_rule
:
BOOLEAN
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
.
is_coherent
:
BOOLEAN
effective function
top
ensure
must_be_coherent:
Result
set_default_tree_builder
(non_terminal_builder:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]], path:
COLLECTION
[
FIXED_STRING
])
effective procedure
top
require
non_terminal_builder /= Void
set_non_terminal
(a_non_terminal:
DESCENDING_NON_TERMINAL
)
effective procedure
top
ensure
nt
= a_non_terminal
do_add
(a_action:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]], rule:
TRAVERSABLE
[
FIXED_STRING
], i:
INTEGER_32
)
effective procedure
top
require
rule.valid_index(i)
rule.item(i) =
prefix_name
do_parse
(context:
DESCENDING_PARSE_CONTEXT
):
TRISTATE
effective function
top
require
not_root:
prefix_name
/= Void
ensure
not Result.is_equal(
yes
) implies context.buffer.current_index = old context.buffer.current_index and then context.actions.count = old context.actions.count
copy
(other: DESCENDING_NT_NODE)
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)
ensure
is_equal(other)
is_equal
(other: DESCENDING_NT_NODE):
BOOLEAN
effective function
top
Is
other
attached to an object considered equal to current object?
require
other /= Void
other /= Void
ensure
commutative:
generating_type = other.generating_type implies Result = other.is_equal(Current)
prefix_name
:
FIXED_STRING
writable attribute
top
suffices
:
HASHED_DICTIONARY
[DESCENDING_NT_NODE,
FIXED_STRING
]
writable attribute
top
nt
:
DESCENDING_NON_TERMINAL
writable attribute
top
action
:
PROCEDURE
[
TUPLE
]
writable attribute
top
end_of_rule
:
BOOLEAN
writable attribute
top
yes
:
TRISTATE
effective function
top
no
:
TRISTATE
effective function
top
maybe
:
TRISTATE
effective function
top