|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectantlr.Parser
antlr.LLkParser
de.hunsicker.jalopy.language.antlr.InternalJavadocParser
de.hunsicker.jalopy.language.antlr.JavadocParser
public class JavadocParser
Parser for Javadoc comments.
Sample Usage:
// an input source Reader in = new BufferedReader(new FileReader(new File(argv[0]))); // create a lexer Lexer lexer = new JavadocLexer(); // set up the lexer to read from the input source lexer.setInputBuffer(in); // get the corresponding parser Parser parser = lexer.getParser(); // and start the parsing process parser.parse();
This is an ANTLR automated generated
file. DO NOT EDIT but rather change the associated grammar
(java.doc.g
) and rebuild.
JavadocLexer
,
Recognizer
Field Summary | |
---|---|
static Node |
EMPTY_JAVADOC_COMMENT
The empty Javadoc comment. |
Fields inherited from class de.hunsicker.jalopy.language.antlr.InternalJavadocParser |
---|
_tokenNames, _tokenSet_0, _tokenSet_1, _tokenSet_10, _tokenSet_11, _tokenSet_12, _tokenSet_13, _tokenSet_14, _tokenSet_15, _tokenSet_16, _tokenSet_17, _tokenSet_18, _tokenSet_19, _tokenSet_2, _tokenSet_3, _tokenSet_4, _tokenSet_5, _tokenSet_6, _tokenSet_7, _tokenSet_8, _tokenSet_9, TYPE_INLINE, TYPE_STANDARD |
Fields inherited from class antlr.Parser |
---|
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth |
Constructor Summary | |
---|---|
|
JavadocParser(antlr.ParserSharedInputState state)
Creates a new JavadocParser object. |
protected |
JavadocParser(antlr.TokenBuffer tokenBuf,
int k,
JavaNodeFactory factory)
Creates a new JavadocParser object. |
|
JavadocParser(antlr.TokenBuffer tokenBuf,
JavaNodeFactory factory)
Creates a new JavadocParser object. |
protected |
JavadocParser(antlr.TokenStream lexer,
int k,
JavaNodeFactory factory)
Creates a new JavadocParser object. |
|
JavadocParser(antlr.TokenStream lexer,
JavaNodeFactory factory)
Creates a new JavadocParser object. |
Method Summary | |
---|---|
antlr.collections.AST |
getParseTree()
Returns the root node of the generated parse tree. |
void |
handleRecoverableError(antlr.RecognitionException ex)
Handler for recoverable errors. |
void |
parse()
Start parsing. |
void |
reportError(antlr.RecognitionException ex)
Reports the given error. |
void |
reportError(java.lang.String message)
Reports the given error. |
void |
reportWarning(java.lang.String message)
Reports the given warning. |
void |
reset()
Resets the parser. |
void |
setCustomInlineTags(java.util.Collection tags)
Sets the custom Javadoc in-line tags to recognize. |
void |
setCustomStandardTags(java.util.Collection tags)
Sets the custom Javadoc standard tags to recognize. |
void |
setLexer(JavadocLexer lexer)
Sets the corresponding Javadoc lexer for the parser. |
void |
setRecognizer(Recognizer recognizer2)
|
protected void |
setTagType(antlr.collections.AST tag,
java.lang.String type)
Tries to determine and set the correct type for the given tag node. |
Methods inherited from class de.hunsicker.jalopy.language.antlr.InternalJavadocParser |
---|
acronym, address, anchor_content, anchor, big, block, blockquote, body_content, body_tag, bold, buildTokenTypeASTClassMap, caption, center, citation, code, dd, def_list_item, def_list, definition, dir, div, dt, emphasize, font_dfn, font, h1, h2, h3, h4, h5, h6, heading_content, heading, inline_tag, internalParse, italic, keyboard, list_item, list, ordered_list, paragraph, phrase, preformatted, recover, sample, small, special, standard_tag, strike, strong, subscript, superscript, table, teletype, text_tag, text, th_or_td, tr, typedclass, underline, unordered_list, variable |
Methods inherited from class antlr.LLkParser |
---|
consume, LA, LT, traceIn, traceOut |
Methods inherited from class antlr.Parser |
---|
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.hunsicker.jalopy.language.Parser |
---|
getASTFactory, getFilename, getTokenNames, setASTFactory, setFilename, setTokenBuffer |
Field Detail |
---|
public static final Node EMPTY_JAVADOC_COMMENT
Constructor Detail |
---|
public JavadocParser(antlr.TokenBuffer tokenBuf, JavaNodeFactory factory)
tokenBuf
- DOCUMENT ME!public JavadocParser(antlr.TokenStream lexer, JavaNodeFactory factory)
lexer
- DOCUMENT ME!public JavadocParser(antlr.ParserSharedInputState state)
state
- DOCUMENT ME!protected JavadocParser(antlr.TokenBuffer tokenBuf, int k, JavaNodeFactory factory)
tokenBuf
- DOCUMENT ME!k
- DOCUMENT ME!protected JavadocParser(antlr.TokenStream lexer, int k, JavaNodeFactory factory)
lexer
- DOCUMENT ME!k
- DOCUMENT ME!Method Detail |
---|
public void setLexer(JavadocLexer lexer)
lexer
- corresponding Javadoc lexer.public void setCustomStandardTags(java.util.Collection tags)
tags
- tags.public void setCustomInlineTags(java.util.Collection tags)
tags
- tags.protected void setTagType(antlr.collections.AST tag, java.lang.String type)
setTagType
in class InternalJavadocParser
tag
- tag AST to set the correct type for.type
- the type of the tag. Either InternalJavadocParser.TYPE_STANDARD
or
InternalJavadocParser.TYPE_INLINE
public void reset()
reset
in interface Parser
public antlr.collections.AST getParseTree()
Parser
getParseTree
in interface Parser
public void reportError(antlr.RecognitionException ex)
reportError
in class antlr.Parser
ex
- encountered exception.public void reportError(java.lang.String message)
reportError
in class antlr.Parser
message
- error message.public void reportWarning(java.lang.String message)
reportWarning
in class antlr.Parser
message
- warning message.public void handleRecoverableError(antlr.RecognitionException ex)
handleRecoverableError
in class InternalJavadocParser
ex
- the input violation exception.public void parse() throws antlr.RecognitionException, antlr.TokenStreamException
Parser
parse
in interface Parser
antlr.RecognitionException
- if a problem with the input occured.
antlr.TokenStreamException
- if something went wrong while generating the stream
of tokens.public void setRecognizer(Recognizer recognizer2)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |