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