Package org.javacc.jjdoc
Class TextGenerator
java.lang.Object
org.javacc.jjdoc.TextGenerator
- All Implemented Interfaces:
Generator
- Direct Known Subclasses:
HTMLGenerator,XTextGenerator
Output BNF in text format.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidOutput comment from a production.protected PrintWriterCreate an output stream for the generated Jack code.voidLog debug messages.voidOutput document footer.voidOutput document header.voidLog error messages.voidexpansionEnd(Expansion e, boolean first) Output end of Expansion.voidexpansionStart(Expansion e, boolean first) Output start of an Expansion.voidvoidLog informational messages.voidOutput comment from a production.voidOutput end of non-terminal.voidOutput end of non-terminal.voidOutput start of non-terminal.voidOutput start of non-terminal.voidOutput String.voidOutput end of a normal production.voidOutput start of a normal production.voidOutput end of regular expression.voidOutput start of regular expression.voidOutput Special Tokens.voidOutput string with entity substitution for brackets and ampersands.voidOutput end of tokens.voidOutput start of tokens.voidLog warning messages.
-
Field Details
-
ostr
-
-
Constructor Details
-
TextGenerator
public TextGenerator()
-
-
Method Details
-
text
Output string with entity substitution for brackets and ampersands. -
print
Output String. -
documentStart
public void documentStart()Output document header.- Specified by:
documentStartin interfaceGenerator- See Also:
-
documentEnd
public void documentEnd()Output document footer.- Specified by:
documentEndin interfaceGenerator- See Also:
-
specialTokens
Output Special Tokens.- Specified by:
specialTokensin interfaceGenerator- Parameters:
s- tokens to output- See Also:
-
nonterminalsStart
public void nonterminalsStart()Output start of non-terminal.- Specified by:
nonterminalsStartin interfaceGenerator- See Also:
-
nonterminalsEnd
public void nonterminalsEnd()Output end of non-terminal.- Specified by:
nonterminalsEndin interfaceGenerator- See Also:
-
tokensStart
public void tokensStart()Output start of tokens.- Specified by:
tokensStartin interfaceGenerator- See Also:
-
handleTokenProduction
- Specified by:
handleTokenProductionin interfaceGenerator
-
tokensEnd
public void tokensEnd()Output end of tokens. -
javacode
Output comment from a production. -
cppcode
Output comment from a production. -
productionStart
Output start of a normal production.- Specified by:
productionStartin interfaceGenerator- Parameters:
np- the NormalProduction being output- See Also:
-
productionEnd
Output end of a normal production.- Specified by:
productionEndin interfaceGenerator- Parameters:
np- the NormalProduction being output- See Also:
-
expansionStart
Output start of an Expansion.- Specified by:
expansionStartin interfaceGenerator- Parameters:
e- Expansion being outputfirst- whether this is the first expansion- See Also:
-
expansionEnd
Output end of Expansion.- Specified by:
expansionEndin interfaceGenerator- Parameters:
e- Expansion being outputfirst- whether this is the first expansion- See Also:
-
nonTerminalStart
Output start of non-terminal.- Specified by:
nonTerminalStartin interfaceGenerator- Parameters:
nt- the NonTerminal being output- See Also:
-
nonTerminalEnd
Output end of non-terminal.- Specified by:
nonTerminalEndin interfaceGenerator- Parameters:
nt- the NonTerminal being output- See Also:
-
reStart
Output start of regular expression. -
reEnd
Output end of regular expression. -
create_output_stream
Create an output stream for the generated Jack code. Try to open a file based on the name of the parser, but if that fails use the standard output stream. -
debug
Log debug messages. -
info
Log informational messages. -
warn
Log warning messages. -
error
Log error messages.
-