com.steadystate.css.parser
Class SACParserCSS1

java.lang.Object
  extended by com.steadystate.css.parser.SACParserCSS1
All Implemented Interfaces:
SACParserCSS1Constants, Parser

public class SACParserCSS1
extends Object
implements Parser, SACParserCSS1Constants

Version:
$Id: SACParserCSS1.jj,v 1.1 2008/03/20 01:20:18 sdanig Exp $
Author:
David Schweinsberg

Field Summary
 Token jj_nt
          Next token.
 Token token
          Current token.
 SACParserCSS1TokenManager token_source
          Generated Token Manager.
 
Fields inherited from interface com.steadystate.css.parser.SACParserCSS1Constants
ACTIVE_PSCLASS, ASTERISK, ATKEYWORD, CDC, CDO, COLON, COMMA, COMMENT, D, DEFAULT, DOT, EMS, EOF, EQUALS, ESCAPE, EXS, FIRST_LETTER, FIRST_LINE, GT, H, HASH, HNUM, IDENT, IMPORT_SYM, IMPORTANT_SYM, LBRACE, LENGTH_CM, LENGTH_IN, LENGTH_MM, LENGTH_PC, LENGTH_PT, LENGTH_PX, LINK_PSCLASS, LSQUARE, MINUS, NAME, NL, NMCHAR, NMSTART, NONASCII, NUM, NUMBER, PERCENTAGE, PLUS, Q11, Q12, Q13, Q14, Q15, Q16, RANGE, RBRACE, RGB, RROUND, RSQUARE, S, SEMICOLON, SLASH, STRING, STRING1, STRING2, tokenImage, UNICODE, UNICODERANGE, UNKNOWN, URL, VISITED_PSCLASS
 
Constructor Summary
SACParserCSS1()
           
SACParserCSS1(CharStream stream)
          Constructor with user supplied CharStream.
SACParserCSS1(SACParserCSS1TokenManager tm)
          Constructor with generated Token Manager.
 
Method Summary
 Condition _class(Condition pred)
           
protected  String add_escapes(String str)
           
protected  CSSParseException createSkipWarning(String key, CSSParseException e)
           
 void declaration()
           
 void disable_tracing()
          Disable tracing.
 SimpleSelector elementName()
           
 void enable_tracing()
          Enable tracing.
 LexicalUnit expr()
           
protected  LexicalUnit functionInternal(LexicalUnit prev, Token t, LexicalUnit params)
           
 ParseException generateParseException()
          Generate ParseException.
protected  ConditionFactory getConditionFactory()
           
protected  DocumentHandlerExt getDocumentHandler()
           
protected  ErrorHandler getErrorHandler()
           
protected  String getGrammarUri()
           
protected  InputSource getInputSource()
           
protected  Locale getLocale()
           
 Locator getLocator()
           
 Token getNextToken()
          Get the next Token.
 String getParserVersion()
           
protected  ResourceBundle getSACParserMessages()
           
protected  SelectorFactory getSelectorFactory()
           
protected  Token getToken()
           
 Token getToken(int index)
          Get the specific Token.
protected  void handleCharset(String characterEncoding)
           
protected  void handleEndDocument()
           
protected  void handleEndFontFace()
           
protected  void handleEndMedia(SACMediaList media)
           
protected  void handleEndPage(String name, String pseudo_page)
           
protected  void handleEndSelector(SelectorList selectors)
           
protected  void handleIgnorableAtRule(String s)
           
protected  void handleImportStyle(String uri, SACMediaList media, String defaultNamespaceURI)
           
protected  void handleMedium(String medium)
           
protected  void handleProperty(String name, LexicalUnit value, boolean important)
           
protected  void handleSelector(Selector selector)
           
protected  void handleStartDocument()
           
protected  void handleStartFontFace()
           
protected  void handleStartMedia(SACMediaList media)
           
protected  void handleStartPage(String name, String pseudo_page)
           
protected  void handleStartSelector(SelectorList selectors)
           
 Condition hash(Condition pred)
           
 LexicalUnit hexcolor(LexicalUnit prev)
           
protected  LexicalUnit hexcolorInternal(LexicalUnit prev, Token t)
           
 void importRule()
           
 void importRuleIgnored()
           
 void mediaList(SACMediaListImpl ml)
           
 String medium()
           
 LexicalUnit operator(LexicalUnit prev)
           
 SACMediaList parseMedia(InputSource source)
           
 boolean parsePriority(InputSource source)
           
 LexicalUnit parsePropertyValue(InputSource source)
           
 void parseRule(InputSource source)
           
 SelectorList parseSelectors(InputSource source)
           
 void parseStyleDeclaration(InputSource source)
           
 void parseStyleSheet(InputSource source)
           
 void parseStyleSheet(String uri)
           
 boolean prio()
           
 String property()
           
 Condition pseudoClass(Condition pred)
           
 Condition pseudoElement(Condition pred)
           
 void ReInit(CharStream stream)
          Reinitialise.
 void ReInit(SACParserCSS1TokenManager tm)
          Reinitialise.
 LexicalUnit rgb(LexicalUnit prev)
           
 Selector selector()
           
 SelectorList selectorList()
           
 void setConditionFactory(ConditionFactory conditionFactory)
           
 void setDocumentHandler(DocumentHandler handler)
           
 void setErrorHandler(ErrorHandler eh)
           
 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)
           
protected  CSSParseException toCSSParseException(String key, ParseException e)
           
protected  CSSParseException toCSSParseException(TokenMgrError e)
           
 char unaryOperator()
           
 void unknownRule()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.css.sac.Parser
parsePriority, parsePropertyValue, parseRule, parseSelectors, parseStyleDeclaration, parseStyleSheet, parseStyleSheet, setConditionFactory, setDocumentHandler, setErrorHandler, setLocale, setSelectorFactory
 

Field Detail

token_source

public SACParserCSS1TokenManager token_source
Generated Token Manager.


token

public Token token
Current token.


jj_nt

public Token jj_nt
Next token.

Constructor Detail

SACParserCSS1

public SACParserCSS1()

SACParserCSS1

public SACParserCSS1(CharStream stream)
Constructor with user supplied CharStream.


SACParserCSS1

public SACParserCSS1(SACParserCSS1TokenManager tm)
Constructor with generated Token Manager.

Method Detail

getParserVersion

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

getGrammarUri

protected String getGrammarUri()

getToken

protected Token getToken()

mediaList

public void mediaList(SACMediaListImpl ml)

styleSheet

public final void styleSheet()
                      throws ParseException
Throws:
ParseException

styleSheetRuleList

public final void styleSheetRuleList()
                              throws ParseException
Throws:
ParseException

styleSheetRuleSingle

public final void styleSheetRuleSingle()
                                throws ParseException
Throws:
ParseException

unknownRule

public final void unknownRule()
                       throws ParseException
Throws:
ParseException

importRule

public final void importRule()
                      throws ParseException
Throws:
ParseException

importRuleIgnored

public final void importRuleIgnored()
                             throws ParseException
Throws:
ParseException

medium

public final String medium()
                    throws ParseException
Throws:
ParseException

operator

public final LexicalUnit operator(LexicalUnit prev)
                           throws ParseException
Throws:
ParseException

unaryOperator

public final char unaryOperator()
                         throws ParseException
Throws:
ParseException

property

public final String property()
                      throws ParseException
Throws:
ParseException

styleRule

public final void styleRule()
                     throws ParseException
Throws:
ParseException

selectorList

public final SelectorList selectorList()
                                throws ParseException
Throws:
ParseException

selector

public final Selector selector()
                        throws ParseException
Throws:
ParseException

simpleSelector

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

_class

public final Condition _class(Condition pred)
                       throws ParseException
Throws:
ParseException

elementName

public final SimpleSelector elementName()
                                 throws ParseException
Throws:
ParseException

pseudoClass

public final Condition pseudoClass(Condition pred)
                            throws ParseException
Throws:
ParseException

pseudoElement

public final Condition pseudoElement(Condition pred)
                              throws ParseException
Throws:
ParseException

hash

public final Condition hash(Condition pred)
                     throws ParseException
Throws:
ParseException

styleDeclaration

public final void styleDeclaration()
                            throws ParseException
Throws:
ParseException

declaration

public final void declaration()
                       throws ParseException
Throws:
ParseException

prio

public final boolean prio()
                   throws ParseException
Throws:
ParseException

expr

public final LexicalUnit expr()
                       throws ParseException
Throws:
ParseException

term

public final LexicalUnit term(LexicalUnit prev)
                       throws ParseException
Throws:
ParseException

rgb

public final LexicalUnit rgb(LexicalUnit prev)
                      throws ParseException
Throws:
ParseException

hexcolor

public final LexicalUnit hexcolor(LexicalUnit prev)
                           throws ParseException
Throws:
ParseException

ReInit

public void ReInit(CharStream stream)
Reinitialise.


ReInit

public void ReInit(SACParserCSS1TokenManager 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.


getDocumentHandler

protected DocumentHandlerExt getDocumentHandler()

setDocumentHandler

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

getErrorHandler

protected ErrorHandler getErrorHandler()

setErrorHandler

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

getInputSource

protected InputSource getInputSource()

setLocale

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

getLocale

protected Locale getLocale()

getSelectorFactory

protected SelectorFactory getSelectorFactory()

setSelectorFactory

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

getConditionFactory

protected ConditionFactory getConditionFactory()

setConditionFactory

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

getSACParserMessages

protected ResourceBundle getSACParserMessages()

getLocator

public Locator getLocator()

add_escapes

protected String add_escapes(String str)

toCSSParseException

protected CSSParseException toCSSParseException(String key,
                                                ParseException e)

toCSSParseException

protected CSSParseException toCSSParseException(TokenMgrError e)

createSkipWarning

protected CSSParseException createSkipWarning(String key,
                                              CSSParseException e)

parseStyleSheet

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

parseStyleSheet

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

parseStyleDeclaration

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

parseRule

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

parseSelectors

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

parsePropertyValue

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

parsePriority

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

parseMedia

public SACMediaList parseMedia(InputSource source)
                        throws IOException
Throws:
IOException

handleStartDocument

protected void handleStartDocument()

handleEndDocument

protected void handleEndDocument()

handleIgnorableAtRule

protected void handleIgnorableAtRule(String s)

handleCharset

protected void handleCharset(String characterEncoding)

handleImportStyle

protected void handleImportStyle(String uri,
                                 SACMediaList media,
                                 String defaultNamespaceURI)

handleStartMedia

protected void handleStartMedia(SACMediaList media)

handleMedium

protected void handleMedium(String medium)

handleEndMedia

protected void handleEndMedia(SACMediaList media)

handleStartPage

protected void handleStartPage(String name,
                               String pseudo_page)

handleEndPage

protected void handleEndPage(String name,
                             String pseudo_page)

handleStartFontFace

protected void handleStartFontFace()

handleEndFontFace

protected void handleEndFontFace()

handleSelector

protected void handleSelector(Selector selector)

handleStartSelector

protected void handleStartSelector(SelectorList selectors)

handleEndSelector

protected void handleEndSelector(SelectorList selectors)

handleProperty

protected void handleProperty(String name,
                              LexicalUnit value,
                              boolean important)

functionInternal

protected LexicalUnit functionInternal(LexicalUnit prev,
                                       Token t,
                                       LexicalUnit params)

hexcolorInternal

protected LexicalUnit hexcolorInternal(LexicalUnit prev,
                                       Token t)


Copyright © 2011. All Rights Reserved.