net.sourceforge.pmd.jsp.ast

Class JspParser

public class JspParser extends Object implements JspParserTreeConstants, JspParserConstants

JSP Parser for PMD.

Author: Pieter o?= Application Engineers NV/SA o?= http://www.ae.be

Field Summary
protected JJTJspParserStatejjtree
Tokenjj_nt
booleanlookingAhead
Tokentoken
JspParserTokenManagertoken_source
Constructor Summary
JspParser(CharStream stream)
JspParser(JspParserTokenManager tm)
Method Summary
voidAttribute()
voidAttributeValue()
The value of an attribute of an element.
voidCData()
voidCommentTag()
ASTCompilationUnitCompilationUnit()
The root of the AST of a JSP.
voidContent()
Everything between a start-tag and the corresponding end-tag of an element.
voidContentElementPossiblyWithText()
A single (non-text) element that can occur between a start- and end-tag of an element.
voiddisable_tracing()
voidDeclaration()
voidDoctypeDeclaration()
voidDoctypeExternalId()
voidenable_tracing()
voidElement()
A XML element, either with a single empty tag, or with a starting and closing tag with optional contained content.
StringElExpression()
An EL expression, not within an attribute value.
StringElExpressionInAttribute()
ParseExceptiongenerateParseException()
TokengetNextToken()
TokengetToken(int index)
voidJspComment()
voidJspDeclaration()
voidJspDirective()
voidJspDirectiveAttribute()
voidJspExpression()
StringJspExpressionInAttribute()
voidJspScriptlet()
voidProlog()
The optional prolog of a JSP, including (xml) declarations and DTD.
StringQuoteIndependentAttributeValueContent()
Partial content of an attribute value that can contain all quotes.
voidReInit(CharStream stream)
voidReInit(JspParserTokenManager tm)
voidText()
This production groups all characters between two tags, where tag is an xml-tag "<...>" or a jsp-page-tag "<%...%>" or CDATA "
StringUnparsedText()
StringUnparsedTextNoDoubleQuotes()
Text that contains no double quotes, and that does not contain the start of a EL expression or value binding.
StringUnparsedTextNoSingleQuotes()
Text that contains no single quotes, and that does not contain the start of a EL expression or value binding.
StringValueBindingInAttribute()

Field Detail

jjtree

protected JJTJspParserState jjtree

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public JspParserTokenManager token_source

Constructor Detail

JspParser

public JspParser(CharStream stream)

JspParser

public JspParser(JspParserTokenManager tm)

Method Detail

Attribute

public final void Attribute()

AttributeValue

public final void AttributeValue()
The value of an attribute of an element. EL expressions, JSF value bindings, and JSP expressions are parsed as sub-nodes of the AttributeValue node.

CData

public final void CData()

CommentTag

public final void CommentTag()

CompilationUnit

public final ASTCompilationUnit CompilationUnit()
The root of the AST of a JSP.

Content

public final void Content()
Everything between a start-tag and the corresponding end-tag of an element.

ContentElementPossiblyWithText

public final void ContentElementPossiblyWithText()
A single (non-text) element that can occur between a start- and end-tag of an element. Possibly followed by text.

disable_tracing

public final void disable_tracing()

Declaration

public final void Declaration()

DoctypeDeclaration

public final void DoctypeDeclaration()

DoctypeExternalId

public final void DoctypeExternalId()

enable_tracing

public final void enable_tracing()

Element

public final void Element()
A XML element, either with a single empty tag, or with a starting and closing tag with optional contained content.

ElExpression

public final String ElExpression()
An EL expression, not within an attribute value.

ElExpressionInAttribute

public final String ElExpressionInAttribute()

generateParseException

public ParseException generateParseException()

getNextToken

public final Token getNextToken()

getToken

public final Token getToken(int index)

JspComment

public final void JspComment()

JspDeclaration

public final void JspDeclaration()

JspDirective

public final void JspDirective()

JspDirectiveAttribute

public final void JspDirectiveAttribute()

JspExpression

public final void JspExpression()

JspExpressionInAttribute

public final String JspExpressionInAttribute()

JspScriptlet

public final void JspScriptlet()

Prolog

public final void Prolog()
The optional prolog of a JSP, including (xml) declarations and DTD.

QuoteIndependentAttributeValueContent

public final String QuoteIndependentAttributeValueContent()
Partial content of an attribute value that can contain all quotes. This groups EL expressions, value bindings, and JSP expressions.

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(JspParserTokenManager tm)

Text

public final void Text()
This production groups all characters between two tags, where tag is an xml-tag "<...>" or a jsp-page-tag "<%...%>" or CDATA "". Text consists of unparsed text and/or Expression Language expressions.

UnparsedText

public final String UnparsedText()

UnparsedTextNoDoubleQuotes

public final String UnparsedTextNoDoubleQuotes()
Text that contains no double quotes, and that does not contain the start of a EL expression or value binding.

UnparsedTextNoSingleQuotes

public final String UnparsedTextNoSingleQuotes()
Text that contains no single quotes, and that does not contain the start of a EL expression or value binding.

ValueBindingInAttribute

public final String ValueBindingInAttribute()