PageRenderTime 5ms CodeModel.GetById 1ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/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--
15class LIBERTY_ETC_NON_TERMINAL
16
17inherit
18   EIFFEL_NON_TERMINAL_NODE
19
20insert
21   EIFFEL_NON_TERMINAL_NODE_IMPL
22      rename
23         make as impl_make
24      export
25         {} all
26      redefine
27         accept
28      end
29
30create {LIBERTY_ETC_FACTORY}
31   make
32
33feature {ANY}
34   accept (a_visitor: VISITOR) is
35      local
36         v: LIBERTY_ETC_VISITOR
37      do
38         v ::= a_visitor
39         visitor.call([v, Current])
40      end
41
42feature {}
43   make (a_name: FIXED_STRING; a_names: like names; a_visitor: like visitor) is
44      require
45         a_name /= Void
46         a_visitor /= Void
47         a_names /= Void
48      do
49         impl_make(a_name, a_names)
50         visitor := a_visitor
51      ensure
52         name = a_name
53         visitor = a_visitor
54         names = a_names
55      end
56
57   visitor: PROCEDURE[TUPLE[LIBERTY_ETC_VISITOR, LIBERTY_ETC_NON_TERMINAL]]
58
59invariant
60   visitor /= Void
61
62end -- class LIBERTY_ETC_NON_TERMINAL