00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef PARSER_H
00010 #define PARSER_H
00011
00012 #include <aconf.h>
00013
00014 #ifdef USE_GCC_PRAGMAS
00015 #pragma interface
00016 #endif
00017
00018 #include "Lexer.h"
00019
00020
00021
00022
00023 namespace xpdf
00024 {
00025
00026 class Parser {
00027 public:
00028
00029
00030 Parser(XRef *xrefA, Lexer *lexerA);
00031
00032
00033 ~Parser();
00034
00035
00036 #ifndef NO_DECRYPTION
00037 Object *getObj(Object *obj,
00038 Guchar *fileKey = NULL, int keyLength = 0,
00039 int objNum = 0, int objGen = 0);
00040 #else
00041 Object *getObj(Object *obj);
00042 #endif
00043
00044
00045 Stream *getStream() { return lexer->getStream(); }
00046
00047
00048 int getPos() { return lexer->getPos(); }
00049
00050 private:
00051
00052 XRef *xref;
00053 Lexer *lexer;
00054 Object buf1, buf2;
00055 int inlineImg;
00056
00057 Stream *makeStream(Object *dict);
00058 void shift();
00059 };
00060 };
00061
00062
00063 #endif
00064