P4C
The P4 Compiler
|
#include <parserDriver.h>
Protected Member Functions | |
void | onParseError (const Util::SourceInfo &location, const std::string &message) |
void | onReadComment (const char *text, bool lineComment) |
void | onReadFileName (const char *text) |
Notify that the lexer read a filename from a line directive. | |
void | onReadIdentifier (cstring id) |
Notify that the lexer read an identifier, @id. | |
void | onReadLineNumber (const char *text) |
Notify that the lexer read a line number from a line directive. | |
void | onReadToken (const char *text) |
Notify that the lexer read a token. @text is the matched source text. | |
Protected Attributes | |
int | saveState = -1 |
Scratch storage for the lexer to remember its previous state. | |
Util::InputSources * | sources |
The input sources that comprise the P4 program we're parsing. | |
Util::SourceInfo | yylloc |
The location of the most recent token. | |
The base class of ParserDrivers, which provide a high level interface to parsers and lexers and manage their state.
|
protected |
Notify that an error was encountered during parsing at @location. @message is a Bison-provided human-readable explanation of the error.
|
protected |
Notify that the lexer has read a comment.
text | The body of the comment, without the comment termination |
lineComment | If true this is a line comment starting with // |