root / pkpgcounter / trunk / pdlanalyzer / pdlparser.py @ 193

Revision 193, 1.4 kB (checked in by jerome, 19 years ago)

Moved the code into the submodules

  • Property svn:eol-style set to native
  • Property svn:keywords set to Auth Date Id Rev
Line 
1#
2# pkpgcounter : a generic Page Description Language parser
3#
4# (c) 2003,2004,2005 Jerome Alet <alet@librelogiciel.com>
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
18#
19# $Id$
20#
21
22class PDLParserError(Exception):
23    """An exception for PDLParser related stuff."""
24    def __init__(self, message = ""):
25        self.message = message
26        Exception.__init__(self, message)
27    def __repr__(self):
28        return self.message
29    __str__ = __repr__
30       
31class PDLParser :
32    """Generic PDL parser."""
33    def __init__(self, infile, debug=0) :
34        """Initialize the generic parser."""
35        self.debug = debug
36        self.infile = infile
37               
38    def getJobSize(self) :           
39        """Counts pages in the document."""
40        raise RuntimeError, "Not implemented !"
Note: See TracBrowser for help on using the browser.