1 #!/usr/bin/env python 2 3 """ 4 Simplified program representation. 5 6 Copyright (C) 2006, 2007 Paul Boddie <paul@boddie.org.uk> 7 8 This program is free software; you can redistribute it and/or modify it under 9 the terms of the GNU General Public License as published by the Free Software 10 Foundation; either version 3 of the License, or (at your option) any later 11 version. 12 13 This program is distributed in the hope that it will be useful, but WITHOUT 14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 16 details. 17 18 You should have received a copy of the GNU General Public License along with 19 this program. If not, see <http://www.gnu.org/licenses/>. 20 """ 21 22 __version__ = "0.1" 23 24 from simplify.simplified.ast import * 25 from simplify.simplified.data import * 26 from simplify.simplified.program import * 27 from simplify.simplified.utils import * 28 import os 29 30 # Location of the built-in libraries. 31 # NOTE: Change this if the package structure changes. 32 33 libdir = os.path.join(os.path.split(os.path.split(__file__)[0])[0], "lib") 34 35 # Configuration setting. 36 37 Class = SingleInstanceClass 38 #Class = MultipleInstanceClass 39 40 def set_single_instance_mode(): 41 global Class 42 Class = SingleInstanceClass 43 44 def set_multiple_instance_mode(): 45 global Class 46 Class = MultipleInstanceClass 47 48 def set_selective_multiple_instance_mode(): 49 global Class 50 Class = SelectiveMultipleInstanceClass 51 52 def set_prolific_multiple_instance_mode(): 53 global Class 54 Class = ProlificMultipleInstanceClass 55 56 def get_class(): 57 return Class 58 59 # vim: tabstop=4 expandtab shiftwidth=4