PageRenderTime 17ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/lib/backtracking/node/backtracking_node_true_or.e

http://github.com/tybor/Liberty
Specman e | 55 lines | 21 code | 6 blank | 28 comment | 0 complexity | 35b1793b471c69f76abce56a068e5ba2 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_TRUE_OR
 5   --
 6   -- Alternative between nothing (as true) first and then a node
 7   --
 8
 9inherit
10   BACKTRACKING_NODE_UNARY
11
12insert
13   BACKTRACKING_NODE_GLOBALS
14
15create {ANY}
16   make
17
18feature {ANY}
19   explore (explorer: BACKTRACKING)
20      do
21         -- Push 'node' in front of the possible alternatives.
22         explorer.push_or(node)
23         -- Continues the exploration
24         explorer.continue
25      end
26
27feature {}
28   do_fill_tagged_out_memory
29      do
30         tagged_out_memory.append(once "<true> or (")
31         node.fill_tagged_out_memory
32         tagged_out_memory.append(once ")")
33      end
34
35end -- class BACKTRACKING_NODE_TRUE_OR
36--
37-- Copyright (C) 2009-2017: by all the people cited in the AUTHORS file.
38--
39-- Permission is hereby granted, free of charge, to any person obtaining a copy
40-- of this software and associated documentation files (the "Software"), to deal
41-- in the Software without restriction, including without limitation the rights
42-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
43-- copies of the Software, and to permit persons to whom the Software is
44-- furnished to do so, subject to the following conditions:
45--
46-- The above copyright notice and this permission notice shall be included in
47-- all copies or substantial portions of the Software.
48--
49-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
51-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
52-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
53-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
54-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
55-- THE SOFTWARE.