Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/Parser.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/qpdf/xpdf/Parser.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/Parser.h b/noncore/unsupported/qpdf/xpdf/Parser.h new file mode 100644 index 0000000..463d998 --- a/dev/null +++ b/noncore/unsupported/qpdf/xpdf/Parser.h | |||
@@ -0,0 +1,58 @@ | |||
1 | //======================================================================== | ||
2 | // | ||
3 | // Parser.h | ||
4 | // | ||
5 | // Copyright 1996 Derek B. Noonburg | ||
6 | // | ||
7 | //======================================================================== | ||
8 | |||
9 | #ifndef PARSER_H | ||
10 | #define PARSER_H | ||
11 | |||
12 | #ifdef __GNUC__ | ||
13 | #pragma interface | ||
14 | #endif | ||
15 | |||
16 | #include "Lexer.h" | ||
17 | |||
18 | //------------------------------------------------------------------------ | ||
19 | // Parser | ||
20 | //------------------------------------------------------------------------ | ||
21 | |||
22 | class Parser { | ||
23 | public: | ||
24 | |||
25 | // Constructor. | ||
26 | Parser(XRef *xrefA, Lexer *lexerA); | ||
27 | |||
28 | // Destructor. | ||
29 | ~Parser(); | ||
30 | |||
31 | // Get the next object from the input stream. | ||
32 | #ifndef NO_DECRYPTION | ||
33 | Object *getObj(Object *obj, | ||
34 | Guchar *fileKey = NULL, int keyLength = 0, | ||
35 | int objNum = 0, int objGen = 0); | ||
36 | #else | ||
37 | Object *getObj(Object *obj); | ||
38 | #endif | ||
39 | |||
40 | // Get stream. | ||
41 | Stream *getStream() { return lexer->getStream(); } | ||
42 | |||
43 | // Get current position in file. | ||
44 | int getPos() { return lexer->getPos(); } | ||
45 | |||
46 | private: | ||
47 | |||
48 | XRef *xref; // the xref table for this PDF file | ||
49 | Lexer *lexer; // input stream | ||
50 | Object buf1, buf2; // next two tokens | ||
51 | int inlineImg; // set when inline image data is encountered | ||
52 | |||
53 | Stream *makeStream(Object *dict); | ||
54 | void shift(); | ||
55 | }; | ||
56 | |||
57 | #endif | ||
58 | |||