public class HtmlPrinter extends PrettyPrinter
| Modifier and Type | Field and Description |
|---|---|
protected Analyzer |
analyzer
The analyzer utility.
|
protected boolean |
isGrammar
The flag for whether we are processing a grammar or single module.
|
protected int |
pNumber
The number of the current production.
|
protected Runtime |
runtime
The runtime.
|
ast, isTopLevel, newline, parenChoice, parenSequence, printer, verbose| Constructor and Description |
|---|
HtmlPrinter(Runtime runtime,
Analyzer analyzer,
AST ast,
boolean verbose)
Create a new HTML printer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
enter(Production p)
Enter the specified production.
|
protected void |
exit(Production p)
Exit the specified production.
|
protected void |
open(java.lang.String name)
Create a printer for the specified file.
|
protected void |
print(Module m)
Actually print the specified module.
|
protected void |
print(ModuleDependency dep,
java.lang.String name)
Print the specified module dependency.
|
protected void |
print(ModuleName name,
boolean resolved)
Print a linked version of the specified module name.
|
protected void |
print(java.lang.String s)
Print the specified action string.
|
protected void |
printDocumentation(Module m)
Print the specified module documentation comment.
|
protected void |
printOption(Module m)
Print the specified module's options.
|
protected int |
regexEscapes()
Get the flags for escaping regex strings.
|
protected int |
stringEscapes()
Get the flags for escaping regular strings.
|
void |
visit(Grammar g)
Print the specified grammar.
|
void |
visit(Module m)
Print the specified module.
|
void |
visit(NonTerminal nt)
Print the specified nonterminal.
|
void |
visit(SequenceName n)
Print the specified sequence name.
|
void |
visit(StringValue v)
Print the specified string value.
|
void |
visit(TokenValue v)
Print the specified token value.
|
flush, format, isPrefix, print, print, printActions, printModule, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitdispatch, equals, hashCode, iterate, map, mapInPlace, unableToVisit, visitprotected final Runtime runtime
protected final Analyzer analyzer
protected boolean isGrammar
protected int pNumber
protected int stringEscapes()
PrettyPrinterstringEscapes in class PrettyPrinterprotected int regexEscapes()
PrettyPrinterregexEscapes in class PrettyPrinterprotected void open(java.lang.String name)
throws java.io.IOException
printer to a printer writing to the
file with the specified name in the runtime's output directory.name - The file name.java.io.IOExceptionprotected void printDocumentation(Module m)
PrettyPrinterprintDocumentation in class PrettyPrinterm - The module.protected void printOption(Module m)
PrettyPrinterprintOption in class PrettyPrinterm - The module.protected void print(Module m)
m - The module to print.public void visit(Grammar g)
PrettyPrintervisit in class PrettyPrinterpublic void visit(Module m)
PrettyPrintervisit in class PrettyPrinterprotected void print(ModuleName name, boolean resolved)
name - The module name.resolved - The flag for whether the name can be resolved.protected void print(ModuleDependency dep, java.lang.String name)
PrettyPrinterprint in class PrettyPrinterdep - The dependency.name - The corresponding name.protected void enter(Production p)
PrettyPrinterPrettyPrinter.parenChoice and PrettyPrinter.parenSequence to false.enter in class PrettyPrinterp - The production.protected void exit(Production p)
PrettyPrinterexit in class PrettyPrinterp - The production.public void visit(SequenceName n)
PrettyPrintervisit in class PrettyPrinterpublic void visit(NonTerminal nt)
PrettyPrintervisit in class PrettyPrinterprotected void print(java.lang.String s)
PrettyPrinterprint in class PrettyPrinters - The string.public void visit(StringValue v)
PrettyPrintervisit in class PrettyPrinterpublic void visit(TokenValue v)
PrettyPrintervisit in class PrettyPrinterCopyright © 2014. All Rights Reserved.