Printer
public class Printer
http://www.phpdoctrine.org
Field Summary | |
---|---|
protected int | Current indentation level |
protected bool | Defines whether parse tree is printed (default, false) or not (true). |
Constructor Summary | |
---|---|
Printer(bool silent) Constructs a new parse tree printer. |
Method Summary | |
---|---|
void | Decreases indentation level by one and prints a closing parenthesis. |
void | println(string str) Prints text indented with spaces depending on current indentation level. |
void | startProduction(string name) Prints an opening parenthesis followed by production name and increases indentation level by one. |
protected int $_indent
Current indentation level
protected bool $_silent
Defines whether parse tree is printed (default, false) or not (true).
public Printer(bool silent)
Constructs a new parse tree printer.
public void endProduction()
Decreases indentation level by one and prints a closing parenthesis.
This method is called after executing a production.
public void println(string str)
Prints text indented with spaces depending on current indentation level.
public void startProduction(string name)
Prints an opening parenthesis followed by production name and increases indentation level by one.
This method is called before executing a production.
A parse tree printer for Doctrine Query Language parser.