Doxygen
Loading...
Searching...
No Matches
JavaCC.h
Go to the documentation of this file.
1/* Generated By:JavaCC: Do not edit this line. JavaCC.h Version 7.0 */
2/* JavaCCOptions:STATIC=false,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
3#ifndef JAVACC_JAVACC_H_
4#define JAVACC_JAVACC_H_
5
6#include <string>
7#include <memory>
8#include <cassert>
9#include <functional>
10
11#ifndef JAVACC_CHAR_TYPE
12#define JAVACC_CHAR_TYPE char
13#endif
14
15#ifndef JAVACC_STRING_TYPE
16#define JAVACC_STRING_TYPE std::basic_string<JAVACC_CHAR_TYPE>
17#endif
18
19#define JAVACC_SIMPLE_STRING std::basic_string<char>
20
25
26// Abstraction on stream classes to read a block of data into a buffer.
28public:
29 // Read block of data into a buffer and return the actual number read.
30 virtual size_t read(JAVACC_CHAR_TYPE *buffer, int offset, size_t len) { return 0; }
31 virtual bool endOfInput() { return true; }
32 virtual ~ReaderStream() {}
33};
34
35const JAVACC_CHAR_TYPE EMPTY[] = { 0 };
36
37#ifndef MAX
38#define MAX(a,b) ((a)>=(b)?(a):(b))
39#endif
40#ifndef MIN
41#define MIN(a,b) ((a)<=(b)?(a):(b))
42#endif
43
44template<typename T>
45struct JJEnter
46{
47 JJEnter(T f_) : f{f_} {f();}
49 T f;
50};
51template<typename T>
52struct JJExit
53{
54 JJExit(T f_) : f{f_} {}
55 ~JJExit(){f();}
56 T f;
57};
58
59#endif
60/* JavaCC - OriginalChecksum=b719dd5e5f87efc5315d14df0b701850 (do not edit this line) */
#define JAVACC_CHAR_TYPE
Definition JavaCC.h:12
JAVACC_STRING_TYPE JJString
Definition JavaCC.h:22
#define JAVACC_STRING_TYPE
Definition JavaCC.h:16
#define JAVACC_SIMPLE_STRING
Definition JavaCC.h:19
JAVACC_CHAR_TYPE JJChar
Definition JavaCC.h:21
JAVACC_SIMPLE_STRING JJSimpleString
Definition JavaCC.h:24
JAVACC_STRING_TYPE JJStringBuffer
Definition JavaCC.h:23
virtual ~ReaderStream()
Definition JavaCC.h:32
virtual bool endOfInput()
Definition JavaCC.h:31
virtual size_t read(JAVACC_CHAR_TYPE *buffer, int offset, size_t len)
Definition JavaCC.h:30
T f
Definition JavaCC.h:49
JJEnter(T f_)
Definition JavaCC.h:47
~JJEnter()
Definition JavaCC.h:48
T f
Definition JavaCC.h:56
~JJExit()
Definition JavaCC.h:55
JJExit(T f_)
Definition JavaCC.h:54
#define EMPTY