2 Copyright 2005 Sun Microsystems, Inc.
5 #ifndef INCLUDED_RTFSCANNER_HXX
6 #define INCLUDED_RTFSCANNER_HXX
8 #include <WriterFilterDllApi.hxx>
10 #include <rtftok/RTFInputSource.hxx>
11 #include <rtftok/RTFScannerHandler.hxx>
13 namespace writerfilter
{ namespace rtftok
{
15 class WRITERFILTER_DLLPUBLIC RTFScanner
{
17 RTFScanner(RTFScannerHandler
&eventHandler_
) : eventHandler(eventHandler_
) {};
18 virtual ~RTFScanner() { }
20 const char* YYText() { return yytext
; }
21 int YYLeng() { return yyleng
; }
23 virtual int yylex() = 0;
25 int lineno() const { return yylineno
; }
30 int yylineno
; // only maintained if you use %option yylineno
31 int yy_flex_debug
; // only has effect with -d or "%option debug"
32 RTFScannerHandler
&eventHandler
;
36 static writerfilter::rtftok::RTFScanner
* createRTFScanner(writerfilter::rtftok::RTFInputSource
& inputSource
, writerfilter::rtftok::RTFScannerHandler
&eventHandler
);
39 } } /* end namespace writerfilter::rtftok */
42 #endif /* INCLUDED_RTFSCANNER_HXX */