git-archimport-id: frederic@jolliton.com--2005-private/confparser--main--0.1--patch-2
# -*- coding: iso-8859-1 -*-
#
-# A quick made parser for mail.filter configuration file.
+# Basic parser
+# Copyright (C) 2005 Frédéric Jolliton <frederic@jolliton.com>
#
-# The parser could be interesting for some other uses though.
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
import re
# -*- coding: iso-8859-1 -*-
+#
+# Basic validator
+# Copyright (C) 2005 Frédéric Jolliton <frederic@jolliton.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
#
# Base module to check structure validity of a configuration file.
#
# -*- coding: iso-8859-1 -*-
-import basicparser
-import basicvalidator
+#
+# Configuration parser
+# Copyright (C) 2005 Frédéric Jolliton <frederic@jolliton.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
import re
import types
except :
import pickle
+import basicparser
+import basicvalidator
+
class Error( Exception ) : pass
#
for sub in t[ 2 ] or [] :
printTreeInner( sub )
-
-def main() :
-
- doc = open( 'fred.mf' ).read()
- printTree( parse( doc , 'fred.mf' ) )
-
-if __name__ == '__main__' :
- main()