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

/src/lib/parse/parse_action.e

http://github.com/tybor/Liberty
Specman e | 61 lines | 29 code | 8 blank | 24 comment | 0 complexity | f22acc7d81667b876fe6f13b3f9cab48 MD5 | raw file
 1-- This file is part of a Liberty Eiffel library.
 2-- See the full copyright at the end.
 3--
 4class PARSE_ACTION
 5
 6creation {PARSE_TERMINAL, PARSE_NT_NODE}
 7   make
 8
 9feature {ANY}
10   name: STRING
11         -- useful for debug
12
13   call is
14      do
15         action.call([])
16      end
17
18feature {PARSE_TERMINAL, PARSE_NT_NODE}
19   set_name (a_name: like name) is
20      do
21         name := a_name
22      ensure
23         name = a_name
24      end
25
26feature {}
27   make (a_action: like action) is
28      require
29         a_action /= Void
30      do
31         action := a_action
32      ensure
33         action = a_action
34      end
35
36   action: PROCEDURE[TUPLE]
37
38invariant
39   action /= Void
40
41end -- PARSE_ACTION
42--
43-- Copyright (c) 2009 by all the people cited in the AUTHORS file.
44--
45-- Permission is hereby granted, free of charge, to any person obtaining a copy
46-- of this software and associated documentation files (the "Software"), to deal
47-- in the Software without restriction, including without limitation the rights
48-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
49-- copies of the Software, and to permit persons to whom the Software is
50-- furnished to do so, subject to the following conditions:
51--
52-- The above copyright notice and this permission notice shall be included in
53-- all copies or substantial portions of the Software.
54--
55-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
56-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
57-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
58-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
59-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
60-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
61-- THE SOFTWARE.