1 // Copyright (c) 1996 James Clark
2 // See the file COPYING for copying permission.
4 #ifndef ParserApp_INCLUDED
5 #define ParserApp_INCLUDED 1
11 #include "SgmlParser.h"
12 #include "ParserOptions.h"
13 #include "EntityApp.h"
15 #include "ErrorCountEventHandler.h"
18 namespace SP_NAMESPACE {
21 class SP_API ParserApp : public EntityApp {
23 ParserApp(const char *requiredInternalCode = 0);
24 void processOption(AppChar opt, const AppChar *arg);
25 int processSysid(const StringC &);
26 virtual ErrorCountEventHandler *makeEventHandler() = 0;
27 Boolean enableWarning(const AppChar *s);
28 void initParser(const StringC &sysid);
30 // This calls the ArcEngine if the options have enabled that.
31 void parseAll(SgmlParser &, EventHandler &,
32 const volatile sig_atomic_t *cancelPtr);
33 virtual void allLinkTypesActivated();
35 virtual int generateEvents(ErrorCountEventHandler *);
36 ParserOptions options_;
39 Vector<StringC> arcNames_;
40 Vector<const AppChar *> activeLinkTypes_;
44 SgmlParser &ParserApp::parser()
53 #endif /* not ParserApp_INCLUDED */