Package net.sourceforge.pmd.lang.vf.ast
Class VfParser
- java.lang.Object
-
- net.sourceforge.pmd.lang.vf.ast.VfParser
-
- All Implemented Interfaces:
VfParserConstants,VfParserTreeConstants
public class VfParser extends java.lang.Object implements VfParserTreeConstants, VfParserConstants
-
-
Field Summary
Fields Modifier and Type Field Description Tokenjj_ntNext token.protected JJTVfParserStatejjtreeTokentokenCurrent token.VfParserTokenManagertoken_sourceGenerated Token Manager.-
Fields inherited from interface net.sourceforge.pmd.lang.vf.ast.VfParserConstants
AfterTagState, ALPHA_CHAR, ALPHANUM_CHAR, AMP_AMP, ATTR_EQ, ATTR_NAME, AttrValueBetweenDoubleQuotesState, AttrValueBetweenSingleQuotesState, AttrValueNoQuotesState, AttrValueState, BYTE_ORDER_MARK, CDATA_END, CDATA_START, CDataState, CLOSEBRACE, COLON, COMMA, COMMENT_CLOSE_DQ, COMMENT_CLOSE_SCRIPT, COMMENT_CLOSE_SQ, COMMENT_END, COMMENT_INNER_TEXT_DQ, COMMENT_INNER_TEXT_SCRIPT, COMMENT_INNER_TEXT_SQ, COMMENT_OPEN_DQ, COMMENT_OPEN_SCRIPT, COMMENT_OPEN_SQ, COMMENT_START, COMMENT_TEXT, CommentState, COMMNT_END, COMMNT_START, CONCAT, CONCATEQ, DECL_END, DECL_START, DEFAULT, DIGITS, DIV, DIVEQ, DOCTYPE_DECL_END, DOCTYPE_DECL_START, DocTypeExternalIdState, DocTypeState, DOT, DOUBLE_EQ, DOUBLE_QUOTE, EL_EXPRESSION, EL_EXPRESSION_IN_ATTRIBUTE_DQ, EL_EXPRESSION_IN_ATTRIBUTE_NQ, EL_EXPRESSION_IN_ATTRIBUTE_SQ, EL_EXPRESSION_IN_SCRIPT, ElAttribTagStateDQ, ElAttribTagStateNQ, ElAttribTagStateSQ, ElInScriptState, ElTagState, END_OF_EL, END_OF_EL_ATTRIB_DQ, END_OF_EL_ATTRIB_NQ, END_OF_EL_ATTRIB_SQ, END_OF_EL_SCRIPT, ENDING_DOUBLE_QUOTE, ENDING_SINGLE_QUOTE, ENDING_WHITESPACE, ENDTAG_START, EOF, EQ, EXCL, EXP_DOT, FALSE, GE, GT, HTML_SCRIPT_CONTENT, HTML_SCRIPT_END_TAG, HTML_SCRIPT_START, HtmlScriptContentState, IDENTIFIER, IDENTIFIER_CHAR, IDENTIFIER_EL, IN_ATTR_WHITESPACE, IN_TAG_ERROR, InlineCommentStateDQ, InlineCommentStateScript, InlineCommentStateSQ, InTagState, LE, LPAREN, LSQUARE, LST_ERROR, LT, MINUS, MINUSEQ, MUL, MULEQ, NAME, NEWLINE, NO_BANG, NO_ENDTAG_START, NO_LT_OR_OPENBRACE, NO_QUOTE_NO_WHITESPACE, NO_WHITESPACE_OR_LT_OR_DOLLAR, NOT_EQ, NULL, NUM_CHAR, OPENBRACE, PERCENT, PIPE_PIPE, PLUS, PLUSEQ, POW, PUBLIC, QQ, QUOTE, QUOTED_LITERAL, QUOTED_STRING, QUOTED_STRING_NO_BREAKS, RPAREN, RSQUARE, SINGLE_QUOTE, StartTagState, STRING_LITERAL, SYSTEM, TAG_END, TAG_NAME, TAG_SLASHEND, TAG_START, TEXT_IN_EL, tokenImage, TRUE, UNPARSED, UNPARSED_TEXT, UNPARSED_TEXT_NO_DOUBLE_QUOTES, UNPARSED_TEXT_NO_SINGLE_QUOTES, UNPARSED_TEXT_NO_WHITESPACE, WHITESPACE, WHITESPACES, XMLNAME
-
Fields inherited from interface net.sourceforge.pmd.lang.vf.ast.VfParserTreeConstants
JJTARGUMENTS, JJTATTRIBUTE, JJTATTRIBUTEVALUE, JJTCDATA, JJTCOMPILATIONUNIT, JJTCONTENT, JJTDECLARATION, JJTDOCTYPEDECLARATION, JJTDOCTYPEEXTERNALID, JJTDOTEXPRESSION, JJTELEMENT, JJTELEXPRESSION, JJTEXPRESSION, JJTHTMLSCRIPT, JJTIDENTIFIER, JJTLITERAL, JJTNEGATIONEXPRESSION, jjtNodeName, JJTTEXT, JJTVOID
-
-
Constructor Summary
Constructors Constructor Description VfParser(net.sourceforge.pmd.lang.ast.CharStream stream)Constructor with user supplied CharStream.VfParser(VfParserTokenManager tm)Constructor with generated Token Manager.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAdditiveExpression()voidArgumentList()voidArguments()voidAssignmentOperator()voidAttribute()voidAttributeValue()The value of an attribute of an element.voidBom()java.lang.StringBooleanLiteral()voidCData()voidCommentExpression()voidCommentTag()ASTCompilationUnitCompilationUnit()The root of the AST of a VF.voidConcatExpression()voidConditionalAndExpression()voidConditionalExpression()voidConditionalOrExpression()voidContent()Everything between a start-tag and the corresponding end-tag of an element (if an end tag exists).voidContentElement()A single (non-text) element that can occur between a start-tag and end-tag of an element.voidDeclaration()voiddisable_tracing()Disable tracing.voidDoctypeDeclaration()voidDoctypeExternalId()voidDotExpression()voidELDQCommentExpression()voidElement()A XML element, either with a single empty tag, or with a starting and closing tag with optional contained content.voidElExpression()An EL expression, not within an attribute value.voidElExpressionInAttribute()voidElExpressionInScript()voidElOrText()This production groups all characters between two tags, where tag is an xml-tag "<...>" or CDATA "<![CDATA[...]]>".voidELSQCommentExpression()voidenable_tracing()Enable tracing.voidEqualityExpression()voidExpression()ParseExceptiongenerateParseException()Generate ParseException.TokengetNextToken()Get the next Token.TokengetToken(int index)Get the specific Token.voidHtmlScript()voidHtmlScriptContent()voidIdentifier()voidLiteral()voidMultiplicativeExpression()voidNegationExpression()java.lang.StringNullLiteral()voidPowerExpression()voidPrimaryExpression()voidPrimaryPrefix()voidPrimarySuffix()voidProlog()The optional prolog of a VF, including (xml) declarations and DTD.voidReInit(net.sourceforge.pmd.lang.ast.CharStream stream)Reinitialise.voidReInit(VfParserTokenManager tm)Reinitialise.voidRelationalExpression()voidText()voidUnaryExpression()voidUnparsedTextNoDoubleQuotes()Text that contains no double quotes, and that does not contain the start of a EL expression.voidUnparsedTextNoSingleQuotes()Text that contains no single quotes, and that does not contain the start of a EL expression.voidUnparsedTextNoWhitespace()
-
-
-
Field Detail
-
jjtree
protected JJTVfParserState jjtree
-
token_source
public VfParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
VfParser
public VfParser(net.sourceforge.pmd.lang.ast.CharStream stream)
Constructor with user supplied CharStream.
-
VfParser
public VfParser(VfParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
CompilationUnit
public final ASTCompilationUnit CompilationUnit() throws ParseException
The root of the AST of a VF.- Throws:
ParseException
-
Prolog
public final void Prolog() throws ParseExceptionThe optional prolog of a VF, including (xml) declarations and DTD.- Throws:
ParseException
-
Bom
public final void Bom() throws ParseException- Throws:
ParseException
-
Content
public final void Content() throws ParseExceptionEverything between a start-tag and the corresponding end-tag of an element (if an end tag exists).- Throws:
ParseException
-
ContentElement
public final void ContentElement() throws ParseExceptionA single (non-text) element that can occur between a start-tag and end-tag of an element.- Throws:
ParseException
-
ElOrText
public final void ElOrText() throws ParseExceptionThis production groups all characters between two tags, where tag is an xml-tag "<...>" or CDATA "<![CDATA[...]]>". Text consists of unparsed text and/or Expression Language expressions.- Throws:
ParseException
-
Text
public final void Text() throws ParseException- Throws:
ParseException
-
UnparsedTextNoWhitespace
public final void UnparsedTextNoWhitespace() throws ParseException- Throws:
ParseException
-
UnparsedTextNoSingleQuotes
public final void UnparsedTextNoSingleQuotes() throws ParseExceptionText that contains no single quotes, and that does not contain the start of a EL expression.- Throws:
ParseException
-
UnparsedTextNoDoubleQuotes
public final void UnparsedTextNoDoubleQuotes() throws ParseExceptionText that contains no double quotes, and that does not contain the start of a EL expression.- Throws:
ParseException
-
ElExpression
public final void ElExpression() throws ParseExceptionAn EL expression, not within an attribute value.- Throws:
ParseException
-
Expression
public final void Expression() throws ParseException- Throws:
ParseException
-
AssignmentOperator
public final void AssignmentOperator() throws ParseException- Throws:
ParseException
-
ConditionalExpression
public final void ConditionalExpression() throws ParseException- Throws:
ParseException
-
ConditionalOrExpression
public final void ConditionalOrExpression() throws ParseException- Throws:
ParseException
-
ConditionalAndExpression
public final void ConditionalAndExpression() throws ParseException- Throws:
ParseException
-
PowerExpression
public final void PowerExpression() throws ParseException- Throws:
ParseException
-
ConcatExpression
public final void ConcatExpression() throws ParseException- Throws:
ParseException
-
EqualityExpression
public final void EqualityExpression() throws ParseException- Throws:
ParseException
-
RelationalExpression
public final void RelationalExpression() throws ParseException- Throws:
ParseException
-
AdditiveExpression
public final void AdditiveExpression() throws ParseException- Throws:
ParseException
-
MultiplicativeExpression
public final void MultiplicativeExpression() throws ParseException- Throws:
ParseException
-
UnaryExpression
public final void UnaryExpression() throws ParseException- Throws:
ParseException
-
PrimaryExpression
public final void PrimaryExpression() throws ParseException- Throws:
ParseException
-
ELSQCommentExpression
public final void ELSQCommentExpression() throws ParseException- Throws:
ParseException
-
ELDQCommentExpression
public final void ELDQCommentExpression() throws ParseException- Throws:
ParseException
-
CommentExpression
public final void CommentExpression() throws ParseException- Throws:
ParseException
-
PrimaryPrefix
public final void PrimaryPrefix() throws ParseException- Throws:
ParseException
-
PrimarySuffix
public final void PrimarySuffix() throws ParseException- Throws:
ParseException
-
NegationExpression
public final void NegationExpression() throws ParseException- Throws:
ParseException
-
DotExpression
public final void DotExpression() throws ParseException- Throws:
ParseException
-
Arguments
public final void Arguments() throws ParseException- Throws:
ParseException
-
ArgumentList
public final void ArgumentList() throws ParseException- Throws:
ParseException
-
Literal
public final void Literal() throws ParseException- Throws:
ParseException
-
BooleanLiteral
public final java.lang.String BooleanLiteral() throws ParseException- Throws:
ParseException
-
NullLiteral
public final java.lang.String NullLiteral() throws ParseException- Throws:
ParseException
-
Identifier
public final void Identifier() throws ParseException- Throws:
ParseException
-
ElExpressionInAttribute
public final void ElExpressionInAttribute() throws ParseException- Throws:
ParseException
-
ElExpressionInScript
public final void ElExpressionInScript() throws ParseException- Throws:
ParseException
-
CData
public final void CData() throws ParseException- Throws:
ParseException
-
Element
public final void Element() throws ParseExceptionA XML element, either with a single empty tag, or with a starting and closing tag with optional contained content.- Throws:
ParseException
-
Attribute
public final void Attribute() throws ParseException- Throws:
ParseException
-
AttributeValue
public final void AttributeValue() throws ParseExceptionThe value of an attribute of an element. EL expressions are parsed as sub-nodes of the AttributeValue node.- Throws:
ParseException
-
CommentTag
public final void CommentTag() throws ParseException- Throws:
ParseException
-
Declaration
public final void Declaration() throws ParseException- Throws:
ParseException
-
DoctypeDeclaration
public final void DoctypeDeclaration() throws ParseException- Throws:
ParseException
-
DoctypeExternalId
public final void DoctypeExternalId() throws ParseException- Throws:
ParseException
-
HtmlScript
public final void HtmlScript() throws ParseException- Throws:
ParseException
-
HtmlScriptContent
public final void HtmlScriptContent() throws ParseException- Throws:
ParseException
-
ReInit
public void ReInit(net.sourceforge.pmd.lang.ast.CharStream stream)
Reinitialise.
-
ReInit
public void ReInit(VfParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-