PageRenderTime 73ms CodeModel.GetById 70ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/backtracking/node/backtracking_node_and_list.e

http://github.com/tybor/Liberty
Specman e | 60 lines | 26 code | 5 blank | 29 comment | 2 complexity | 0df3a6749f0867d3d6e27df791a8e0cc MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class BACKTRACKING_NODE_AND_LIST
 5   --
 6   -- Node for a sequence of list of nodes
 7   --
 8
 9inherit
10   BACKTRACKING_NODE_LIST
11
12create {ANY}
13   make, set_node
14
15feature {ANY}
16   explore (explorer: BACKTRACKING)
17      do
18         -- Tell to evaluate 'node' now.
19         explorer.set_current_node(node)
20         if next /= Void then
21            -- Push 'next', the remaining of the list
22            -- in front of the continuation path.
23            explorer.push_and_list(next)
24         end
25      end
26
27feature {}
28   do_fill_tagged_out_memory
29      do
30         tagged_out_memory.append(once "(")
31         node.fill_tagged_out_memory
32         tagged_out_memory.append(once ")")
33         if next /= Void then
34            tagged_out_memory.append(once " and (")
35            next.fill_tagged_out_memory
36            tagged_out_memory.append(once ")")
37         end
38      end
39
40end -- class BACKTRACKING_NODE_AND_LIST
41--
42-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
43--
44-- Permission is hereby granted, free of charge, to any person obtaining a copy
45-- of this software and associated documentation files (the "Software"), to deal
46-- in the Software without restriction, including without limitation the rights
47-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48-- copies of the Software, and to permit persons to whom the Software is
49-- furnished to do so, subject to the following conditions:
50--
51-- The above copyright notice and this permission notice shall be included in
52-- all copies or substantial portions of the Software.
53--
54-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60-- THE SOFTWARE.