1
#ifndef INC_LLkParser_hpp__
2
#define INC_LLkParser_hpp__
5
* <b>SOFTWARE RIGHTS</b>
7
* ANTLR 2.6.0 MageLang Insitute, 1999
9
* We reserve no legal rights to the ANTLR--it is fully in the
10
* public domain. An individual or company may do whatever
11
* they wish with source code distributed with ANTLR or the
12
* code generated by ANTLR, including the incorporation of
13
* ANTLR, or its output, into commerical software.
15
* We encourage users to develop software with ANTLR. However,
16
* we do ask that credit is given to us for developing
17
* ANTLR. By "credit", we mean that if you use ANTLR or
18
* incorporate any source code into one of your programs
19
* (commercial product, research project, or otherwise) that
20
* you acknowledge this fact somewhere in the documentation,
21
* research report, etc... If you like ANTLR and have
22
* developed a nice tool with the output, please mention that
23
* you developed it using ANTLR. In addition, we ask that the
24
* headers remain intact in our source code. As long as these
25
* guidelines are kept, we expect to continue enhancing this
26
* system and expect to make other tools available as they are
30
* @version ANTLR 2.6.0 MageLang Insitute, 1999
31
* @author Terence Parr, <a href=http://www.MageLang.com>MageLang Institute</a>
32
* @author <br>John Lilley, <a href=http://www.Empathy.com>Empathy Software</a>
33
* @author <br><a href="mailto:pete@yamuna.demon.co.uk">Pete Wells</a>
36
#include "antlr/antlr_export.h"
37
#include "antlr/config.hpp"
38
#include "antlr/Parser.hpp"
40
ANTLR_BEGIN_NAMESPACE(antlr)
45
* @see antlr.TokenBuffer
46
* @see antlr.LL1Parser
48
class ANTLR_EXPORT LLkParser : public Parser {
55
LLkParser(const ParserSharedInputState& lexer, int k_);
57
LLkParser(TokenBuffer& tokenBuf, int k_);
59
LLkParser(TokenStream& lexer, int k_);
61
/**Consume another token from the input stream. Can only write sequentially!
62
* If you need 3 tokens ahead, you must consume() 3 times.
64
* Note that it is possible to overwrite tokens that have not been matched.
65
* For example, calling consume() 3 times when k=2, means that the first token
66
* consumed will be overwritten with the 3rd.
75
void trace(const ANTLR_USE_NAMESPACE(std)string& ee, const ANTLR_USE_NAMESPACE(std)string& rname);
77
void traceIn(const ANTLR_USE_NAMESPACE(std)string& rname);
78
void traceOut(const ANTLR_USE_NAMESPACE(std)string& rname);
83
#endif //INC_LLkParser_hpp__