de.hunsicker.jalopy.language.antlr
Class JavadocParser

java.lang.Object
  |
  +--antlr.Parser
        |
        +--antlr.LLkParser
              |
              +--de.hunsicker.jalopy.language.antlr.InternalJavadocParser
                    |
                    +--de.hunsicker.jalopy.language.antlr.JavadocParser
All Implemented Interfaces:
de.hunsicker.jalopy.language.antlr.JavadocTokenTypes, Parser

public class JavadocParser
extends de.hunsicker.jalopy.language.antlr.InternalJavadocParser
implements Parser

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.

Version:
1.0
Author:
Marco Hunsicker
See Also:
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
 
Fields inherited from interface de.hunsicker.jalopy.language.antlr.JavadocTokenTypes
AT, ATTR, BR, C_TH_OR_TD, C_TR, CACRO, CADDRESS, CANCHOR, CBIG, CBOLD, CBQUOTE, CCAP, CCENTER, CCITE, CCODE, CDDEF, CDFN, CDIR, CDIR_OR_CDIV, CDIV, CDLIST, CDTERM, CEM, CFONT, CH1, CH2, CH3, CH4, CH5, CH6, CITALIC, CKBD, CLITEM, COLIST, COMMENT, COMMENT_DATA, CPARA, CSAMP, CSMALL, CSTRIKE, CSTRIKE_OR_CSTRONG, CSTRONG, CSUB, CSUB_OR_CSUP, CSUP, CTABLE, CTD, CTH, CTTYPE, CULIST, CUNDER, CVAR, DIGIT, EMAILSTART, EOF, HEXDIGIT, HEXINT, HEXNUM, HR, IMG, INT, JAVADOC_CLOSE, JAVADOC_COMMENT, JAVADOC_OPEN, LCLETTER, LCURLY, NEWLINE, NULL_TREE_LOOKAHEAD, O_TH_OR_TD, O_TR, OACRO, OADDRESS, OANCHOR, OBIG, OBOLD, OBQUOTE, OCAP, OCENTER, OCITE, OCODE, ODDEF, ODFN, ODIR, ODIV, ODLIST, ODTERM, OEM, OFONT, OH1, OH2, OH3, OH4, OH5, OH6, OITALIC, OKBD, OLITEM, OOLIST, OPARA, OSAMP, OSMALL, OSTRIKE, OSTRIKE_OR_OSTRONG, OSTRONG, OSUB, OSUP, OTABLE, OTD, OTH, OTTYPE, OULIST, OUNDER, OVAR, PCDATA, PRE, RCURLY, SPECIAL, STAR, STRING, TAG, TAG_AUTHOR, TAG_CUSTOM, TAG_DEPRECATED, TAG_EXCEPTION, TAG_INLINE_CUSTOM, TAG_INLINE_DOCROOT, TAG_INLINE_INHERITDOC, TAG_INLINE_LINK, TAG_INLINE_LINKPLAIN, TAG_INLINE_VALUE, TAG_OR_AT, TAG_PARAM, TAG_RETURN, TAG_SEE, TAG_SERIAL, TAG_SERIAL_DATA, TAG_SERIAL_FIELD, TAG_SINCE, TAG_THROWS, TAG_TODO, TAG_VERSION, TYPEDCLASS, WORD, WS
 
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

EMPTY_JAVADOC_COMMENT

public static final Node EMPTY_JAVADOC_COMMENT
The empty Javadoc comment.

Constructor Detail

JavadocParser

public JavadocParser(antlr.TokenBuffer tokenBuf,
                     JavaNodeFactory factory)
Creates a new JavadocParser object.

Parameters:
tokenBuf - DOCUMENT ME!

JavadocParser

public JavadocParser(antlr.TokenStream lexer,
                     JavaNodeFactory factory)
Creates a new JavadocParser object.

Parameters:
lexer - DOCUMENT ME!

JavadocParser

public JavadocParser(antlr.ParserSharedInputState state)
Creates a new JavadocParser object.

Parameters:
state - DOCUMENT ME!

JavadocParser

protected JavadocParser(antlr.TokenBuffer tokenBuf,
                        int k,
                        JavaNodeFactory factory)
Creates a new JavadocParser object.

Parameters:
tokenBuf - DOCUMENT ME!
k - DOCUMENT ME!

JavadocParser

protected JavadocParser(antlr.TokenStream lexer,
                        int k,
                        JavaNodeFactory factory)
Creates a new JavadocParser object.

Parameters:
lexer - DOCUMENT ME!
k - DOCUMENT ME!
Method Detail

setLexer

public void setLexer(JavadocLexer lexer)
Sets the corresponding Javadoc lexer for the parser.

Parameters:
lexer - corresponding Javadoc lexer.

setCustomStandardTags

public void setCustomStandardTags(java.util.Collection tags)
Sets the custom Javadoc standard tags to recognize.

Parameters:
tags - tags.

setCustomInlineTags

public void setCustomInlineTags(java.util.Collection tags)
Sets the custom Javadoc in-line tags to recognize.

Parameters:
tags - tags.

setTagType

protected void setTagType(antlr.collections.AST tag,
                          java.lang.String type)
Tries to determine and set the correct type for the given tag node.

Specified by:
setTagType in class de.hunsicker.jalopy.language.antlr.InternalJavadocParser
Parameters:
tag - tag AST to set the correct type for.
type - the type of the tag. Either InternalJavadocParser.TYPE_STANDARD or InternalJavadocParser.TYPE_INLINE

reset

public void reset()
Resets the parser.

Specified by:
reset in interface Parser

getParseTree

public antlr.collections.AST getParseTree()
Description copied from interface: Parser
Returns the root node of the generated parse tree.

Specified by:
getParseTree in interface Parser
Returns:
root node of the generated parse tree.

reportError

public void reportError(antlr.RecognitionException ex)
Reports the given error.

Overrides:
reportError in class antlr.Parser
Parameters:
ex - encountered exception.

reportError

public void reportError(java.lang.String message)
Reports the given error.

Overrides:
reportError in class antlr.Parser
Parameters:
message - error message.

reportWarning

public void reportWarning(java.lang.String message)
Reports the given warning.

Overrides:
reportWarning in class antlr.Parser
Parameters:
message - warning message.

handleRecoverableError

public void handleRecoverableError(antlr.RecognitionException ex)
Handler for recoverable errors. If the error can't be handled it will be rethrown.

Specified by:
handleRecoverableError in class de.hunsicker.jalopy.language.antlr.InternalJavadocParser
Parameters:
ex - the input violation exception.

parse

public void parse()
           throws antlr.RecognitionException,
                  antlr.TokenStreamException
Description copied from interface: Parser
Start parsing.

Specified by:
parse in interface Parser
Throws:
antlr.RecognitionException - if a problem with the input occured.
antlr.TokenStreamException - if something went wrong while generating the stream of tokens.

setRecognizer

public void setRecognizer(Recognizer recognizer2)


Copyright © 1997-2005 Jalopy. All Rights Reserved.