com.steadystate.css.parser

Class SACParser

Implemented Interfaces:
Parser, SACParserConstants

public class SACParser
extends java.lang.Object
implements Parser, SACParserConstants

Version:
$Release$
Author:
David Schweinsberg

Field Summary

Token
jj_nt
boolean
lookingAhead
Token
token
SACParserTokenManager
token_source

Fields inherited from interface com.steadystate.css.parser.SACParserConstants

AND, ANGLE_DEG, ANGLE_GRAD, ANGLE_RAD, ASTERISK, ATKEYWORD, CDC, CDO, CHARSET_SYM, COLON, COMMA, COMMENT, DASHMATCH, DEFAULT, DIMEN, DOT, EMS, EOF, EQUALS, ESCAPE, EXS, FONT_FACE_SYM, FREQ_HZ, FREQ_KHZ, FUNCTION, GT, H, HASH, HNUM, IDENT, IMPORTANT_SYM, IMPORT_SYM, INCLUDES, INHERIT, LBRACE, LENGTH_CM, LENGTH_IN, LENGTH_MM, LENGTH_PC, LENGTH_PT, LENGTH_PX, LPAREN, LSQUARE, MEDIA_SYM, MEDIUM, MINUS, NAME, NL, NMCHAR, NMSTART, NONASCII, NOT, NUM, NUMBER, ONLY, PAGE_SYM, PERCENTAGE, PLUS, Q11, Q12, Q13, Q14, Q15, Q16, RANGE, RBRACE, RGB, RROUND, RSQUARE, S, SEMICOLON, SLASH, STRING, STRING1, STRING2, TIME_MS, TIME_S, UNICODE, UNICODERANGE, UNKNOWN, URI, URL, tokenImage

Constructor Summary

SACParser()
SACParser(CharStream stream)
SACParser(SACParserTokenManager tm)

Method Summary

void
ReInit(CharStream stream)
void
ReInit(SACParserTokenManager tm)
Condition
_class(Condition pred)
Condition
attrib(Condition pred)
void
charsetRule()
char
combinator()
void
declaration()
void
disable_tracing()
SimpleSelector
elementName()
void
enable_tracing()
LexicalUnit
expr()
void
fontFaceRule()
LexicalUnit
function(LexicalUnit prev)
ParseException
generateParseException()
Token
getNextToken()
String
getParserVersion()
Token
getToken(int index)
Condition
hash(Condition pred)
LexicalUnit
hexcolor(LexicalUnit prev)
void
importRule()
void
mediaExpression(SACMediaListImpl ml)
void
mediaFeature(SACMediaListImpl ml)
void
mediaList(SACMediaListImpl ml)
void
mediaListOrExpression(SACMediaListImpl ml)
void
mediaQuery(SACMediaListImpl ml)
void
mediaRule()
void
mediaRuleList()
void
mediaRuleSingle()
String
medium()
LexicalUnit
operator(LexicalUnit prev)
void
pageRule()
boolean
parsePriority(InputSource source)
LexicalUnit
parsePropertyValue(InputSource source)
void
parseRule(InputSource source)
SelectorList
parseSelectors(InputSource source)
void
parseStyleDeclaration(InputSource source)
void
parseStyleSheet(String uri)
void
parseStyleSheet(InputSource source)
boolean
prio()
String
property()
Condition
pseudo(Condition pred)
String
pseudoPage()
LexicalUnit
rgb(LexicalUnit prev)
Selector
selector()
SelectorList
selectorList()
void
setConditionFactory(ConditionFactory conditionFactory)
void
setDocumentHandler(DocumentHandler handler)
void
setErrorHandler(ErrorHandler handler)
void
setLocale(Locale locale)
void
setSelectorFactory(SelectorFactory selectorFactory)
Selector
simpleSelector(Selector sel, char comb)
void
styleDeclaration()
void
styleRule()
void
styleSheet()
void
styleSheetRuleList()
void
styleSheetRuleSingle()
LexicalUnit
term(LexicalUnit prev)
char
unaryOperator()
void
unknownRule()

Field Details

jj_nt

public Token jj_nt

lookingAhead

public boolean lookingAhead

token

public Token token

token_source

public SACParserTokenManager token_source

Constructor Details

SACParser

public SACParser()

SACParser

public SACParser(CharStream stream)

SACParser

public SACParser(SACParserTokenManager tm)

Method Details

ReInit

public void ReInit(CharStream stream)

ReInit

public void ReInit(SACParserTokenManager tm)

_class

public final Condition _class(Condition pred)
            throws ParseException

attrib

public final Condition attrib(Condition pred)
            throws ParseException

charsetRule

public final void charsetRule()
            throws ParseException

combinator

public final char combinator()
            throws ParseException

declaration

public final void declaration()
            throws ParseException

disable_tracing

public final void disable_tracing()

elementName

public final SimpleSelector elementName()
            throws ParseException

enable_tracing

public final void enable_tracing()

expr

public final LexicalUnit expr()
            throws ParseException

fontFaceRule

public final void fontFaceRule()
            throws ParseException

function

public final LexicalUnit function(LexicalUnit prev)
            throws ParseException

generateParseException

public ParseException generateParseException()

getNextToken

public final Token getNextToken()

getParserVersion

public String getParserVersion()
Specified by:
getParserVersion in interface Parser

getToken

public final Token getToken(int index)

hash

public final Condition hash(Condition pred)
            throws ParseException

hexcolor

public final LexicalUnit hexcolor(LexicalUnit prev)
            throws ParseException

importRule

public final void importRule()
            throws ParseException

mediaExpression

public final void mediaExpression(SACMediaListImpl ml)
            throws ParseException

mediaFeature

public final void mediaFeature(SACMediaListImpl ml)
            throws ParseException

mediaList

public final void mediaList(SACMediaListImpl ml)
            throws ParseException

mediaListOrExpression

public final void mediaListOrExpression(SACMediaListImpl ml)
            throws ParseException

mediaQuery

public final void mediaQuery(SACMediaListImpl ml)
            throws ParseException

mediaRule

public final void mediaRule()
            throws ParseException

mediaRuleList

public final void mediaRuleList()
            throws ParseException

mediaRuleSingle

public final void mediaRuleSingle()
            throws ParseException

medium

public final String medium()
            throws ParseException

operator

public final LexicalUnit operator(LexicalUnit prev)
            throws ParseException

pageRule

public final void pageRule()
            throws ParseException

parsePriority

public boolean parsePriority(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parsePriority in interface Parser

parsePropertyValue

public LexicalUnit parsePropertyValue(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parsePropertyValue in interface Parser

parseRule

public void parseRule(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parseRule in interface Parser

parseSelectors

public SelectorList parseSelectors(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parseSelectors in interface Parser

parseStyleDeclaration

public void parseStyleDeclaration(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parseStyleDeclaration in interface Parser

parseStyleSheet

public void parseStyleSheet(String uri)
            throws CSSException,
                   IOException
Specified by:
parseStyleSheet in interface Parser

parseStyleSheet

public void parseStyleSheet(InputSource source)
            throws CSSException,
                   IOException
Specified by:
parseStyleSheet in interface Parser

prio

public final boolean prio()
            throws ParseException

property

public final String property()
            throws ParseException

pseudo

public final Condition pseudo(Condition pred)
            throws ParseException

pseudoPage

public final String pseudoPage()
            throws ParseException

rgb

public final LexicalUnit rgb(LexicalUnit prev)
            throws ParseException

selector

public final Selector selector()
            throws ParseException

selectorList

public final SelectorList selectorList()
            throws ParseException

setConditionFactory

public void setConditionFactory(ConditionFactory conditionFactory)
Specified by:
setConditionFactory in interface Parser

setDocumentHandler

public void setDocumentHandler(DocumentHandler handler)
Specified by:
setDocumentHandler in interface Parser

setErrorHandler

public void setErrorHandler(ErrorHandler handler)
Specified by:
setErrorHandler in interface Parser

setLocale

public void setLocale(Locale locale)
            throws CSSException
Specified by:
setLocale in interface Parser

setSelectorFactory

public void setSelectorFactory(SelectorFactory selectorFactory)
Specified by:
setSelectorFactory in interface Parser

simpleSelector

public final Selector simpleSelector(Selector sel,
                                     char comb)
            throws ParseException

styleDeclaration

public final void styleDeclaration()
            throws ParseException

styleRule

public final void styleRule()
            throws ParseException

styleSheet

public final void styleSheet()
            throws ParseException

styleSheetRuleList

public final void styleSheetRuleList()
            throws ParseException

styleSheetRuleSingle

public final void styleSheetRuleSingle()
            throws ParseException

term

public final LexicalUnit term(LexicalUnit prev)
            throws ParseException

unaryOperator

public final char unaryOperator()
            throws ParseException

unknownRule

public final void unknownRule()
            throws ParseException