org.jamon.parser
Class AbstractBodyParser<Node extends AbstractBodyNode>
java.lang.Object
org.jamon.parser.AbstractParser
org.jamon.parser.AbstractBodyParser<Node>
- Direct Known Subclasses:
- NamedFragmentParser, SubcomponentParser, TopLevelParser, UnnamedFragmentParser
public abstract class AbstractBodyParser<Node extends AbstractBodyNode>
- extends AbstractParser
- Author:
- ian
| Methods inherited from class org.jamon.parser.AbstractParser |
addError, addError, checkForTagClosure, checkToken, eofErrorMessage, parsePath, readAndAppendChar, readChar, readClassName, readIdentifier, readIdentifierOrThrow, readJava, readType, readUntil, soakWhitespace |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ENCOUNTERED_ELSE_TAG_WITHOUT_PRIOR_IF_TAG
public static final java.lang.String ENCOUNTERED_ELSE_TAG_WITHOUT_PRIOR_IF_TAG
- See Also:
- Constant Field Values
ENCOUNTERED_ELSEIF_TAG_WITHOUT_PRIOR_IF_TAG
public static final java.lang.String ENCOUNTERED_ELSEIF_TAG_WITHOUT_PRIOR_IF_TAG
- See Also:
- Constant Field Values
ESCAPE_TAG_IN_SUBCOMPONENT
public static final java.lang.String ESCAPE_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
GENERIC_TAG_IN_SUBCOMPONENT
public static final java.lang.String GENERIC_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
ANNOTATE_TAG_IN_SUBCOMPONENT
public static final java.lang.String ANNOTATE_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
CLASS_TAG_IN_SUBCOMPONENT
public static final java.lang.String CLASS_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
UNEXPECTED_NAMED_FRAGMENT_CLOSE_ERROR
public static final java.lang.String UNEXPECTED_NAMED_FRAGMENT_CLOSE_ERROR
- See Also:
- Constant Field Values
UNEXPECTED_FRAGMENTS_CLOSE_ERROR
public static final java.lang.String UNEXPECTED_FRAGMENTS_CLOSE_ERROR
- See Also:
- Constant Field Values
EMIT_ESCAPE_CODE_ERROR
public static final java.lang.String EMIT_ESCAPE_CODE_ERROR
- See Also:
- Constant Field Values
EMIT_MISSING_TAG_END_ERROR
public static final java.lang.String EMIT_MISSING_TAG_END_ERROR
- See Also:
- Constant Field Values
PERCENT_GREATER_THAN_EOF_ERROR
public static final java.lang.String PERCENT_GREATER_THAN_EOF_ERROR
- See Also:
- Constant Field Values
EXTENDS_TAG_IN_SUBCOMPONENT
public static final java.lang.String EXTENDS_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
IMPLEMENTS_TAG_IN_SUBCOMPONENT
public static final java.lang.String IMPLEMENTS_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
PARENT_ARGS_TAG_IN_SUBCOMPONENT
public static final java.lang.String PARENT_ARGS_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
PARENT_MARKER_TAG_IN_SUBCOMPONENT
public static final java.lang.String PARENT_MARKER_TAG_IN_SUBCOMPONENT
- See Also:
- Constant Field Values
m_text
protected java.lang.StringBuilder m_text
m_root
protected final Node extends AbstractBodyNode m_root
m_bodyStart
protected final org.jamon.api.Location m_bodyStart
AbstractBodyParser
protected AbstractBodyParser(Node p_rootNode,
PositionalPushbackReader p_reader,
ParserErrorsImpl p_errors)
handleText
protected void handleText()
parse
public AbstractBodyParser<Node> parse()
throws java.io.IOException
- Throws:
java.io.IOException
doneParsing
protected void doneParsing()
isTopLevel
protected boolean isTopLevel()
- Returns:
true if this is a top level parser
handleTag
protected void handleTag(java.lang.String p_tagName,
org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleTagClose
protected void handleTagClose(java.lang.String p_tagName,
org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Handle a tag closure
- Parameters:
p_tagName - The tag namep_tagLocation - The tag location
- Throws:
java.io.IOException
handleEof
protected abstract void handleEof()
- This method is called when an end of file is reached, and should add an
error if this is not acceptable
handleNamedFragmentClose
protected boolean handleNamedFragmentClose(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Handle the occurence of a '</|;>' tag
- Returns:
true if this parser is done
- Throws:
java.io.IOException
handleFragmentsClose
protected boolean handleFragmentsClose(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Handle the occurence of a '</&>' tag
- Returns:
true if this parser is done
- Throws:
java.io.IOException
handleMethodTag
protected void handleMethodTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Parameters:
p_tagLocation - location of the def tag
- Throws:
java.io.IOException
handleOverrideTag
protected void handleOverrideTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Parameters:
p_tagLocation - location of the def tag
- Throws:
java.io.IOException
handleDefTag
protected void handleDefTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Parameters:
p_tagLocation - location of the def tag
- Throws:
java.io.IOException
handleAbsMethodTag
protected void handleAbsMethodTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleWhileTag
protected void handleWhileTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleForTag
protected void handleForTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleIfTag
protected void handleIfTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
readCondition
protected java.lang.String readCondition(org.jamon.api.Location p_tagLocation,
java.lang.String p_tagName)
throws java.io.IOException,
ParserErrorImpl
- Throws:
java.io.IOException
ParserErrorImpl
handleElseTag
protected void handleElseTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleElseIfTag
protected void handleElseIfTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleParentArgsNode
protected void handleParentArgsNode(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleParentMarkerTag
protected void handleParentMarkerTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleEscapeTag
protected void handleEscapeTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleGenericTag
protected void handleGenericTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleAnnotationTag
protected void handleAnnotationTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleLiteralTag
protected void handleLiteralTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleClassTag
protected void handleClassTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleExtendsTag
protected void handleExtendsTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleImplementsTag
protected void handleImplementsTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleImportTag
protected void handleImportTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
handleAliasesTag
protected void handleAliasesTag(org.jamon.api.Location p_tagLocation)
throws java.io.IOException
- Throws:
java.io.IOException
readTagName
protected java.lang.String readTagName()
throws java.io.IOException
- Throws:
java.io.IOException
readLine
protected java.lang.String readLine()
throws java.io.IOException
- Throws:
java.io.IOException
getRootNode
public Node getRootNode()
jamon