PUMA Library Reference Manual
|
#include <Puma/Tracing.h>
Implements tracing support for the parser.
Public Member Functions | |
void | trace (std::ostream &os, bool trace_tokens=false) |
Setup the tracer. | |
Protected Member Functions | |
Tracing () | |
Constructor. | |
void | trace (int token) |
Trace the given token. | |
void | trace (const char *rule, int n=1, bool quote=false) |
Trace the given parser rule. | |
void | trace (Token *token, const char *ok, const char *failed) |
Trace the given token. | |
int | trace_mode () const |
Get the current tracing mode. | |
std::ostream & | tos () const |
Get the tracing output stream. | |
|
inlineprotected |
Constructor.
|
protected |
Get the tracing output stream.
|
protected |
Trace the given parser rule.
rule | The rule name. |
n | The indentation depth. |
quote | Quote the rule name. |
|
inlineprotected |
Trace the given token.
token | The token type. |
void Puma::Tracing::trace | ( | std::ostream & | os, |
bool | trace_tokens = false ) |
Setup the tracer.
os | The output stream on which to write the tracing output. |
trace_tokens | Turn on/off token level tracing. |
|
protected |
Trace the given token.
token | The token to trace. |
ok | The message if the token is not NULL. |
failed | The message if the token is NULL. |
|
inlineprotected |
Get the current tracing mode.
0 means tracing is disabled, 1 means rule level tracing, 2 means token level tracing.