/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. --
  4. class BACKTRACKING_NODE_AND_LIST
  5. --
  6. -- Node for a sequence of list of nodes
  7. --
  8. inherit
  9. BACKTRACKING_NODE_LIST
  10. create {ANY}
  11. make, set_node
  12. feature {ANY}
  13. explore (explorer: BACKTRACKING)
  14. do
  15. -- Tell to evaluate 'node' now.
  16. explorer.set_current_node(node)
  17. if next /= Void then
  18. -- Push 'next', the remaining of the list
  19. -- in front of the continuation path.
  20. explorer.push_and_list(next)
  21. end
  22. end
  23. feature {}
  24. do_fill_tagged_out_memory
  25. do
  26. tagged_out_memory.append(once "(")
  27. node.fill_tagged_out_memory
  28. tagged_out_memory.append(once ")")
  29. if next /= Void then
  30. tagged_out_memory.append(once " and (")
  31. next.fill_tagged_out_memory
  32. tagged_out_memory.append(once ")")
  33. end
  34. end
  35. end -- class BACKTRACKING_NODE_AND_LIST
  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.