public class BNFGenerator extends Object implements IDocGenerator
| Constructor and Description |
|---|
BNFGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
cppcode(CodeProductionCpp cp)
Output comment from a production.
|
protected static Writer |
create_output_stream() |
void |
documentEnd()
Output document footer.
|
void |
documentStart()
Output document header.
|
void |
expansionEnd(Expansion e,
boolean first)
Output end of Expansion.
|
void |
expansionStart(Expansion e,
boolean bFirst)
Output start of an Expansion.
|
protected String |
get_id(String nt) |
void |
handleTokenProduction(TokenProduction tp) |
void |
javacode(CodeProductionJava jp)
Output comment from a production.
|
void |
nonTerminalEnd(ExpNonTerminal nt)
Output end of non-terminal.
|
void |
nonterminalsEnd()
Output end of non-terminal.
|
void |
nonterminalsStart()
Output start of non-terminal.
|
void |
nonTerminalStart(ExpNonTerminal nt)
Output start of non-terminal.
|
void |
print(String s)
Output String.
|
void |
productionEnd(NormalProduction np)
Output end of a normal production.
|
void |
productionStart(NormalProduction np)
Output start of a normal production.
|
void |
reEnd(AbstractExpRegularExpression r)
Output end of regular expression.
|
void |
reStart(AbstractExpRegularExpression r)
Output start of regular expression.
|
void |
specialTokens(String s)
Output Special Tokens.
|
void |
text(String s)
Output string with entity substitution for brackets and ampersands.
|
void |
tokensEnd()
Output end of tokens.
|
void |
tokensStart()
Output start of tokens.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoNothingprotected Writer m_aPW
protected static Writer create_output_stream()
public void text(String s) throws IOException
IDocGeneratortext in interface IDocGenerators - the String to outputIOException - on IO errorpublic void print(String s) throws IOException
IDocGeneratorprint in interface IDocGenerators - String to outputIOException - on IO errorpublic void documentStart()
IDocGeneratordocumentStart in interface IDocGeneratorpublic void documentEnd()
throws IOException
IDocGeneratordocumentEnd in interface IDocGeneratorIOException - on IO errorpublic void specialTokens(String s)
IDocGeneratorspecialTokens in interface IDocGenerators - tokens to outputpublic void nonterminalsStart()
IDocGeneratornonterminalsStart in interface IDocGeneratorpublic void nonterminalsEnd()
IDocGeneratornonterminalsEnd in interface IDocGeneratorpublic void tokensStart()
IDocGeneratortokensStart in interface IDocGeneratorpublic void tokensEnd()
IDocGeneratortokensEnd in interface IDocGeneratorpublic void javacode(CodeProductionJava jp)
IDocGeneratorjavacode in interface IDocGeneratorjp - the JavaCodeProduction to outputpublic void cppcode(CodeProductionCpp cp)
IDocGeneratorcppcode in interface IDocGeneratorcp - the CppCodeProduction to outputpublic void expansionEnd(Expansion e, boolean first)
IDocGeneratorexpansionEnd in interface IDocGeneratore - Expansion being outputfirst - whether this is the first expansionpublic void nonTerminalStart(ExpNonTerminal nt)
IDocGeneratornonTerminalStart in interface IDocGeneratornt - the NonTerminal being outputpublic void nonTerminalEnd(ExpNonTerminal nt)
IDocGeneratornonTerminalEnd in interface IDocGeneratornt - the NonTerminal being outputpublic void productionStart(NormalProduction np) throws IOException
IDocGeneratorproductionStart in interface IDocGeneratornp - the NormalProduction being outputIOException - on IO errorpublic void productionEnd(NormalProduction np) throws IOException
IDocGeneratorproductionEnd in interface IDocGeneratornp - the NormalProduction being outputIOException - on IO errorpublic void expansionStart(Expansion e, boolean bFirst) throws IOException
IDocGeneratorexpansionStart in interface IDocGeneratore - Expansion being outputbFirst - whether this is the first expansionIOException - on IO errorpublic void reStart(AbstractExpRegularExpression r)
IDocGeneratorreStart in interface IDocGeneratorr - the RegularExpression being outputpublic void reEnd(AbstractExpRegularExpression r)
IDocGeneratorreEnd in interface IDocGeneratorr - the RegularExpression being outputpublic void handleTokenProduction(TokenProduction tp) throws IOException
handleTokenProduction in interface IDocGeneratorIOExceptionCopyright © 2017–2019 Philip Helger. All rights reserved.