| Puma Reference Manual | Puma: Puma::Tracing Class Reference |
#include <Puma/Tracing.h>
Public Member Functions | |
| void | trace (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) |
| 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. | |
| ostream & | tos () const |
| Get the tracing output stream. | |
| Puma::Tracing::Tracing | ( | ) | [inline, protected] |
Constructor.
| void Puma::Tracing::trace | ( | 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. |
| void Puma::Tracing::trace | ( | int | token | ) | [inline, protected] |
Trace the given token.
| token | The token type. |
| void Puma::Tracing::trace | ( | const char * | rule, | |
| int | n = 1 | |||
| ) | [protected] |
Trace the given parser rule.
| rule | The rule name. | |
| n | The indentation depth. |
| void Puma::Tracing::trace | ( | Token * | token, | |
| const char * | ok, | |||
| const char * | failed | |||
| ) | [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. |
| int Puma::Tracing::trace_mode | ( | ) | const [inline, protected] |
Get the current tracing mode.
0 means tracing is disabled, 1 means rule level tracing, 2 means token level tracing.
| ostream& Puma::Tracing::tos | ( | ) | const [protected] |
Get the tracing output stream.