org.javacc.jjdoc.XTextGenerator.html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javacc Show documentation
Show all versions of javacc Show documentation
JavaCC is a parser/scanner generator for Java.
XTextGenerator
org.javacc.jjdoc
Class XTextGenerator
- java.lang.Object
-
- org.javacc.jjdoc.TextGenerator
-
- org.javacc.jjdoc.XTextGenerator
-
- All Implemented Interfaces:
- Generator
public class XTextGenerator
extends TextGenerator
implements Generator
Output BNF in HTML 3.2 format.
-
-
Field Summary
-
Fields inherited from class org.javacc.jjdoc.TextGenerator
ostr
-
Constructor Summary
Constructors
Constructor and Description
XTextGenerator()
-
Method Summary
Methods
Modifier and Type
Method and Description
void
cppcode(CppCodeProduction cp)
Output comment from a production.
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 first)
Output start of an Expansion.
protected java.lang.String
get_id(java.lang.String nt)
void
handleTokenProduction(TokenProduction tp)
void
javacode(JavaCodeProduction jp)
Output comment from a production.
void
nonTerminalEnd(NonTerminal nt)
Output end of non-terminal.
void
nonterminalsEnd()
Output end of non-terminal.
void
nonterminalsStart()
Output start of non-terminal.
void
nonTerminalStart(NonTerminal nt)
Output start of non-terminal.
void
print(java.lang.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(RegularExpression r)
Output end of regular expression.
void
reStart(RegularExpression r)
Output start of regular expression.
void
specialTokens(java.lang.String s)
Prints out comments, used for tokens and non-terminals.
void
text(java.lang.String s)
Output string with entity substitution for brackets and ampersands.
void
tokensEnd()
Output end of tokens.
void
tokensStart()
Output start of tokens.
-
Methods inherited from class org.javacc.jjdoc.TextGenerator
create_output_stream, debug, error, info, warn
-
-
Method Detail
-
handleTokenProduction
public void handleTokenProduction(TokenProduction tp)
- Specified by:
handleTokenProduction
in interface Generator
- Overrides:
handleTokenProduction
in class TextGenerator
-
get_id
protected java.lang.String get_id(java.lang.String nt)
-
text
public void text(java.lang.String s)
Description copied from class: TextGenerator
Output string with entity substitution for brackets and ampersands.
- Specified by:
text
in interface Generator
- Overrides:
text
in class TextGenerator
- Parameters:
s
- the String to output- See Also:
Generator.text(java.lang.String)
-
print
public void print(java.lang.String s)
Description copied from class: TextGenerator
Output String.
- Specified by:
print
in interface Generator
- Overrides:
print
in class TextGenerator
- Parameters:
s
- String to output- See Also:
Generator.print(java.lang.String)
-
documentStart
public void documentStart()
Description copied from class: TextGenerator
Output document header.
- Specified by:
documentStart
in interface Generator
- Overrides:
documentStart
in class TextGenerator
- See Also:
Generator.documentStart()
-
documentEnd
public void documentEnd()
Description copied from class: TextGenerator
Output document footer.
- Specified by:
documentEnd
in interface Generator
- Overrides:
documentEnd
in class TextGenerator
- See Also:
Generator.documentEnd()
-
specialTokens
public void specialTokens(java.lang.String s)
Prints out comments, used for tokens and non-terminals.
Output Special Tokens.
- Specified by:
specialTokens
in interface Generator
- Overrides:
specialTokens
in class TextGenerator
- Parameters:
s
- tokens to output- See Also:
TextGenerator.specialTokens(java.lang.String)
-
nonterminalsStart
public void nonterminalsStart()
Description copied from class: TextGenerator
Output start of non-terminal.
- Specified by:
nonterminalsStart
in interface Generator
- Overrides:
nonterminalsStart
in class TextGenerator
- See Also:
Generator.nonterminalsStart()
-
nonterminalsEnd
public void nonterminalsEnd()
Description copied from class: TextGenerator
Output end of non-terminal.
- Specified by:
nonterminalsEnd
in interface Generator
- Overrides:
nonterminalsEnd
in class TextGenerator
- See Also:
Generator.nonterminalsEnd()
-
tokensStart
public void tokensStart()
Description copied from class: TextGenerator
Output start of tokens.
- Specified by:
tokensStart
in interface Generator
- Overrides:
tokensStart
in class TextGenerator
- See Also:
Generator.tokensStart()
-
tokensEnd
public void tokensEnd()
Description copied from class: TextGenerator
Output end of tokens.
- Specified by:
tokensEnd
in interface Generator
- Overrides:
tokensEnd
in class TextGenerator
- See Also:
Generator.tokensEnd()
-
javacode
public void javacode(JavaCodeProduction jp)
Description copied from class: TextGenerator
Output comment from a production.
- Specified by:
javacode
in interface Generator
- Overrides:
javacode
in class TextGenerator
- Parameters:
jp
- the JavaCodeProduction to output- See Also:
Generator.javacode(org.javacc.parser.JavaCodeProduction)
-
cppcode
public void cppcode(CppCodeProduction cp)
Description copied from class: TextGenerator
Output comment from a production.
- Specified by:
cppcode
in interface Generator
- Overrides:
cppcode
in class TextGenerator
- Parameters:
cp
- the CppCodeProduction to output- See Also:
Generator.cppcode(org.javacc.parser.CppCodeProduction)
-
productionStart
public void productionStart(NormalProduction np)
Description copied from class: TextGenerator
Output start of a normal production.
- Specified by:
productionStart
in interface Generator
- Overrides:
productionStart
in class TextGenerator
- Parameters:
np
- the NormalProduction being output- See Also:
Generator.productionStart(org.javacc.parser.NormalProduction)
-
productionEnd
public void productionEnd(NormalProduction np)
Description copied from class: TextGenerator
Output end of a normal production.
- Specified by:
productionEnd
in interface Generator
- Overrides:
productionEnd
in class TextGenerator
- Parameters:
np
- the NormalProduction being output- See Also:
Generator.productionEnd(org.javacc.parser.NormalProduction)
-
expansionStart
public void expansionStart(Expansion e,
boolean first)
Description copied from class: TextGenerator
Output start of an Expansion.
- Specified by:
expansionStart
in interface Generator
- Overrides:
expansionStart
in class TextGenerator
- Parameters:
e
- Expansion being outputfirst
- whether this is the first expansion- See Also:
Generator.expansionStart(org.javacc.parser.Expansion, boolean)
-
expansionEnd
public void expansionEnd(Expansion e,
boolean first)
Description copied from class: TextGenerator
Output end of Expansion.
- Specified by:
expansionEnd
in interface Generator
- Overrides:
expansionEnd
in class TextGenerator
- Parameters:
e
- Expansion being outputfirst
- whether this is the first expansion- See Also:
Generator.expansionEnd(org.javacc.parser.Expansion, boolean)
-
nonTerminalStart
public void nonTerminalStart(NonTerminal nt)
Description copied from class: TextGenerator
Output start of non-terminal.
- Specified by:
nonTerminalStart
in interface Generator
- Overrides:
nonTerminalStart
in class TextGenerator
- Parameters:
nt
- the NonTerminal being output- See Also:
Generator.nonTerminalStart(org.javacc.parser.NonTerminal)
-
nonTerminalEnd
public void nonTerminalEnd(NonTerminal nt)
Description copied from class: TextGenerator
Output end of non-terminal.
- Specified by:
nonTerminalEnd
in interface Generator
- Overrides:
nonTerminalEnd
in class TextGenerator
- Parameters:
nt
- the NonTerminal being output- See Also:
Generator.nonTerminalEnd(org.javacc.parser.NonTerminal)
-
reStart
public void reStart(RegularExpression r)
Description copied from class: TextGenerator
Output start of regular expression.
- Specified by:
reStart
in interface Generator
- Overrides:
reStart
in class TextGenerator
- Parameters:
r
- the RegularExpression being output- See Also:
Generator.reStart(org.javacc.parser.RegularExpression)
-
reEnd
public void reEnd(RegularExpression r)
Description copied from class: TextGenerator
Output end of regular expression.
- Specified by:
reEnd
in interface Generator
- Overrides:
reEnd
in class TextGenerator
- Parameters:
r
- the RegularExpression being output- See Also:
Generator.reEnd(org.javacc.parser.RegularExpression)