GNU
|
Liberty Eiffel
|
Automated Tests
|
Wiki
|
Savannah project
|
Debian packages
|
Documentation
>
libraries
>
DESCENDING_NT_NODE
+
Point of view
DESCENDING_NON_TERMINAL
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
Overview
top
Creation features
root
(a_nt:
DESCENDING_NON_TERMINAL
)
Exported features
out_in_tagged_out_memory
Append terse printable representation of current object in
tagged_out_memory
.
add
(rule:
TRAVERSABLE
[
FIXED_STRING
], a_action:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]])
parse
(context:
DESCENDING_PARSE_CONTEXT
):
TRISTATE
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
)
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?
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
.
add
(rule:
TRAVERSABLE
[
FIXED_STRING
], a_action:
PROCEDURE
[
TUPLE 2
[
FIXED_STRING
,
TRAVERSABLE
[
FIXED_STRING
]]])
effective procedure
top
parse
(context:
DESCENDING_PARSE_CONTEXT
):
TRISTATE
effective function
top
ensure
context.actions.count >= old context.actions.count
not Result.is_equal(
yes
) implies context.buffer.current_index = old context.buffer.current_index and then context.actions.count = old context.actions.count
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
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)
yes
:
TRISTATE
effective function
top
no
:
TRISTATE
effective function
top
maybe
:
TRISTATE
effective function
top