/tutorial/backtracking/expand_expression/tree/string_node.e

http://github.com/tybor/Liberty · Specman e · 25 lines · 19 code · 6 blank · 0 comment · 0 complexity · e41126a840b8db33079ae8a025bebdcd MD5 · raw file

  1. class STRING_NODE
  2. inherit
  3. BACKTRACKING_NODE
  4. creation {ANY}
  5. make
  6. feature {ANY}
  7. value: STRING
  8. make (val: STRING) is
  9. do
  10. value := val
  11. ensure
  12. definition: value = val
  13. end
  14. explore (expander: EXPAND_EXPRESSION) is
  15. do
  16. expander.stack.add_last(value)
  17. expander.continue
  18. end
  19. end -- class STRING_NODE