/src/tools/configuration/etc/liberty_etc_non_terminal.e

http://github.com/tybor/Liberty · Specman e · 62 lines · 40 code · 8 blank · 14 comment · 0 complexity · e240ed205f3a300b573e7c4ebfe939ab MD5 · raw file

  1. -- This file is part of Liberty Eiffel.
  2. --
  3. -- Liberty Eiffel is free software: you can redistribute it and/or modify
  4. -- it under the terms of the GNU General Public License as published by
  5. -- the Free Software Foundation, version 3 of the License.
  6. --
  7. -- Liberty Eiffel is distributed in the hope that it will be useful,
  8. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. -- GNU General Public License for more details.
  11. --
  12. -- You should have received a copy of the GNU General Public License
  13. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  14. --
  15. class LIBERTY_ETC_NON_TERMINAL
  16. inherit
  17. EIFFEL_NON_TERMINAL_NODE
  18. insert
  19. EIFFEL_NON_TERMINAL_NODE_IMPL
  20. rename
  21. make as impl_make
  22. export
  23. {} all
  24. redefine
  25. accept
  26. end
  27. create {LIBERTY_ETC_FACTORY}
  28. make
  29. feature {ANY}
  30. accept (a_visitor: VISITOR) is
  31. local
  32. v: LIBERTY_ETC_VISITOR
  33. do
  34. v ::= a_visitor
  35. visitor.call([v, Current])
  36. end
  37. feature {}
  38. make (a_name: FIXED_STRING; a_names: like names; a_visitor: like visitor) is
  39. require
  40. a_name /= Void
  41. a_visitor /= Void
  42. a_names /= Void
  43. do
  44. impl_make(a_name, a_names)
  45. visitor := a_visitor
  46. ensure
  47. name = a_name
  48. visitor = a_visitor
  49. names = a_names
  50. end
  51. visitor: PROCEDURE[TUPLE[LIBERTY_ETC_VISITOR, LIBERTY_ETC_NON_TERMINAL]]
  52. invariant
  53. visitor /= Void
  54. end -- class LIBERTY_ETC_NON_TERMINAL