/src/lib/parse/eiffel/eiffel_node_factory.e
Specman e | 52 lines | 25 code | 4 blank | 23 comment | 0 complexity | fcb6f69cb782bf0e359eb76eeacf4dae MD5 | raw file
1-- This file is part of a Liberty Eiffel library. 2-- See the full copyright at the end. 3-- 4deferred class EIFFEL_NODE_FACTORY 5 6feature {EIFFEL_GRAMMAR} 7 list (name: FIXED_STRING): EIFFEL_LIST_NODE is 8 deferred 9 ensure 10 Result.name = name 11 end 12 13 non_terminal (name: FIXED_STRING; names: TRAVERSABLE[FIXED_STRING]): EIFFEL_NON_TERMINAL_NODE is 14 require 15 not name.is_empty 16 names /= Void 17 deferred 18 ensure 19 Result.name = name 20 end 21 22 terminal (name: FIXED_STRING; image: EIFFEL_IMAGE): EIFFEL_TERMINAL_NODE is 23 require 24 not name.is_empty 25 image /= Void 26 deferred 27 ensure 28 Result.name = name 29 Result.image.is_equal(image) 30 end 31 32end -- class EIFFEL_NODE_FACTORY 33-- 34-- Copyright (c) 2009 by all the people cited in the AUTHORS file. 35-- 36-- Permission is hereby granted, free of charge, to any person obtaining a copy 37-- of this software and associated documentation files (the "Software"), to deal 38-- in the Software without restriction, including without limitation the rights 39-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 40-- copies of the Software, and to permit persons to whom the Software is 41-- furnished to do so, subject to the following conditions: 42-- 43-- The above copyright notice and this permission notice shall be included in 44-- all copies or substantial portions of the Software. 45-- 46-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 47-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 48-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 49-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 50-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 51-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 52-- THE SOFTWARE.