com.steadystate.css.parser
Class SACParserCSS1

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

public class SACParserCSS1
extends Object
implements org.w3c.css.sac.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
 org.w3c.css.sac.Condition _class(org.w3c.css.sac.Condition pred)
           
protected  String add_escapes(String str)
           
protected  org.w3c.css.sac.CSSParseException createSkipWarning(String key, org.w3c.css.sac.CSSParseException e)
           
 void declaration()
           
 void disable_tracing()
          Disable tracing.
 org.w3c.css.sac.SimpleSelector elementName()
           
 void enable_tracing()
          Enable tracing.
 org.w3c.css.sac.LexicalUnit expr()
           
protected  org.w3c.css.sac.LexicalUnit functionInternal(org.w3c.css.sac.LexicalUnit prev, Token t, org.w3c.css.sac.LexicalUnit params)
           
 ParseException generateParseException()
          Generate ParseException.
protected  org.w3c.css.sac.ConditionFactory getConditionFactory()
           
protected  DocumentHandlerExt getDocumentHandler()
           
protected  org.w3c.css.sac.ErrorHandler getErrorHandler()
           
protected  String getGrammarUri()
           
protected  org.w3c.css.sac.InputSource getInputSource()
           
protected  Locale getLocale()
           
 org.w3c.css.sac.Locator getLocator()
           
 Token getNextToken()
          Get the next Token.
 String getParserVersion()
           
protected  ResourceBundle getSACParserMessages()
           
protected  org.w3c.css.sac.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(org.w3c.css.sac.SACMediaList media)
           
protected  void handleEndPage(String name, String pseudo_page)
           
protected  void handleEndSelector(org.w3c.css.sac.SelectorList selectors)
           
protected  void handleIgnorableAtRule(String s)
           
protected  void handleImportStyle(String uri, org.w3c.css.sac.SACMediaList media, String defaultNamespaceURI)
           
protected  void handleMedium(String medium)
           
protected  void handleProperty(String name, org.w3c.css.sac.LexicalUnit value, boolean important)
           
protected  void handleSelector(org.w3c.css.sac.Selector selector)
           
protected  void handleStartDocument()
           
protected  void handleStartFontFace()
           
protected  void handleStartMedia(org.w3c.css.sac.SACMediaList media)
           
protected  void handleStartPage(String name, String pseudo_page)
           
protected  void handleStartSelector(org.w3c.css.sac.SelectorList selectors)
           
 org.w3c.css.sac.Condition hash(org.w3c.css.sac.Condition pred)
           
 org.w3c.css.sac.LexicalUnit hexcolor(org.w3c.css.sac.LexicalUnit prev)
           
protected  org.w3c.css.sac.LexicalUnit hexcolorInternal(org.w3c.css.sac.LexicalUnit prev, Token t)
           
 void importRule()
           
 void importRuleIgnored()
           
 void mediaList(SACMediaListImpl ml)
           
 String medium()
           
 org.w3c.css.sac.LexicalUnit operator(org.w3c.css.sac.LexicalUnit prev)
           
 org.w3c.css.sac.SACMediaList parseMedia(org.w3c.css.sac.InputSource source)
           
 boolean parsePriority(org.w3c.css.sac.InputSource source)
           
 org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source)
           
 void parseRule(org.w3c.css.sac.InputSource source)
           
 org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source)
           
 void parseStyleDeclaration(org.w3c.css.sac.InputSource source)
           
 void parseStyleSheet(org.w3c.css.sac.InputSource source)
           
 void parseStyleSheet(String uri)
           
 boolean prio()
           
 String property()
           
 org.w3c.css.sac.Condition pseudoClass(org.w3c.css.sac.Condition pred)
           
 org.w3c.css.sac.Condition pseudoElement(org.w3c.css.sac.Condition pred)
           
 void ReInit(CharStream stream)
          Reinitialise.
 void ReInit(SACParserCSS1TokenManager tm)
          Reinitialise.
 org.w3c.css.sac.LexicalUnit rgb(org.w3c.css.sac.LexicalUnit prev)
           
 org.w3c.css.sac.Selector selector()
           
 org.w3c.css.sac.SelectorList selectorList()
           
 void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
           
 void setDocumentHandler(org.w3c.css.sac.DocumentHandler handler)
           
 void setErrorHandler(org.w3c.css.sac.ErrorHandler eh)
           
 void setLocale(Locale locale)
           
 void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
           
 org.w3c.css.sac.Selector simpleSelector(org.w3c.css.sac.Selector sel, char comb)
           
 void styleDeclaration()
           
 void styleRule()
           
 void styleSheet()
           
 void styleSheetRuleList()
           
 void styleSheetRuleSingle()
           
 org.w3c.css.sac.LexicalUnit term(org.w3c.css.sac.LexicalUnit prev)
           
protected  org.w3c.css.sac.CSSParseException toCSSParseException(String key, ParseException e)
           
protected  org.w3c.css.sac.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 org.w3c.css.sac.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 org.w3c.css.sac.LexicalUnit operator(org.w3c.css.sac.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 org.w3c.css.sac.SelectorList selectorList()
                                                throws ParseException
Throws:
ParseException

selector

public final org.w3c.css.sac.Selector selector()
                                        throws ParseException
Throws:
ParseException

simpleSelector

public final org.w3c.css.sac.Selector simpleSelector(org.w3c.css.sac.Selector sel,
                                                     char comb)
                                              throws ParseException
Throws:
ParseException

_class

public final org.w3c.css.sac.Condition _class(org.w3c.css.sac.Condition pred)
                                       throws ParseException
Throws:
ParseException

elementName

public final org.w3c.css.sac.SimpleSelector elementName()
                                                 throws ParseException
Throws:
ParseException

pseudoClass

public final org.w3c.css.sac.Condition pseudoClass(org.w3c.css.sac.Condition pred)
                                            throws ParseException
Throws:
ParseException

pseudoElement

public final org.w3c.css.sac.Condition pseudoElement(org.w3c.css.sac.Condition pred)
                                              throws ParseException
Throws:
ParseException

hash

public final org.w3c.css.sac.Condition hash(org.w3c.css.sac.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 org.w3c.css.sac.LexicalUnit expr()
                                       throws ParseException
Throws:
ParseException

term

public final org.w3c.css.sac.LexicalUnit term(org.w3c.css.sac.LexicalUnit prev)
                                       throws ParseException
Throws:
ParseException

rgb

public final org.w3c.css.sac.LexicalUnit rgb(org.w3c.css.sac.LexicalUnit prev)
                                      throws ParseException
Throws:
ParseException

hexcolor

public final org.w3c.css.sac.LexicalUnit hexcolor(org.w3c.css.sac.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(org.w3c.css.sac.DocumentHandler handler)
Specified by:
setDocumentHandler in interface org.w3c.css.sac.Parser

getErrorHandler

protected org.w3c.css.sac.ErrorHandler getErrorHandler()

setErrorHandler

public void setErrorHandler(org.w3c.css.sac.ErrorHandler eh)
Specified by:
setErrorHandler in interface org.w3c.css.sac.Parser

getInputSource

protected org.w3c.css.sac.InputSource getInputSource()

setLocale

public void setLocale(Locale locale)
Specified by:
setLocale in interface org.w3c.css.sac.Parser

getLocale

protected Locale getLocale()

getSelectorFactory

protected org.w3c.css.sac.SelectorFactory getSelectorFactory()

setSelectorFactory

public void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
Specified by:
setSelectorFactory in interface org.w3c.css.sac.Parser

getConditionFactory

protected org.w3c.css.sac.ConditionFactory getConditionFactory()

setConditionFactory

public void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
Specified by:
setConditionFactory in interface org.w3c.css.sac.Parser

getSACParserMessages

protected ResourceBundle getSACParserMessages()

getLocator

public org.w3c.css.sac.Locator getLocator()

add_escapes

protected String add_escapes(String str)

toCSSParseException

protected org.w3c.css.sac.CSSParseException toCSSParseException(String key,
                                                                ParseException e)

toCSSParseException

protected org.w3c.css.sac.CSSParseException toCSSParseException(TokenMgrError e)

createSkipWarning

protected org.w3c.css.sac.CSSParseException createSkipWarning(String key,
                                                              org.w3c.css.sac.CSSParseException e)

parseStyleSheet

public void parseStyleSheet(org.w3c.css.sac.InputSource source)
                     throws IOException
Specified by:
parseStyleSheet in interface org.w3c.css.sac.Parser
Throws:
IOException

parseStyleSheet

public void parseStyleSheet(String uri)
                     throws IOException
Specified by:
parseStyleSheet in interface org.w3c.css.sac.Parser
Throws:
IOException

parseStyleDeclaration

public void parseStyleDeclaration(org.w3c.css.sac.InputSource source)
                           throws IOException
Specified by:
parseStyleDeclaration in interface org.w3c.css.sac.Parser
Throws:
IOException

parseRule

public void parseRule(org.w3c.css.sac.InputSource source)
               throws IOException
Specified by:
parseRule in interface org.w3c.css.sac.Parser
Throws:
IOException

parseSelectors

public org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source)
                                            throws IOException
Specified by:
parseSelectors in interface org.w3c.css.sac.Parser
Throws:
IOException

parsePropertyValue

public org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source)
                                               throws IOException
Specified by:
parsePropertyValue in interface org.w3c.css.sac.Parser
Throws:
IOException

parsePriority

public boolean parsePriority(org.w3c.css.sac.InputSource source)
                      throws IOException
Specified by:
parsePriority in interface org.w3c.css.sac.Parser
Throws:
IOException

parseMedia

public org.w3c.css.sac.SACMediaList parseMedia(org.w3c.css.sac.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,
                                 org.w3c.css.sac.SACMediaList media,
                                 String defaultNamespaceURI)

handleStartMedia

protected void handleStartMedia(org.w3c.css.sac.SACMediaList media)

handleMedium

protected void handleMedium(String medium)

handleEndMedia

protected void handleEndMedia(org.w3c.css.sac.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(org.w3c.css.sac.Selector selector)

handleStartSelector

protected void handleStartSelector(org.w3c.css.sac.SelectorList selectors)

handleEndSelector

protected void handleEndSelector(org.w3c.css.sac.SelectorList selectors)

handleProperty

protected void handleProperty(String name,
                              org.w3c.css.sac.LexicalUnit value,
                              boolean important)

functionInternal

protected org.w3c.css.sac.LexicalUnit functionInternal(org.w3c.css.sac.LexicalUnit prev,
                                                       Token t,
                                                       org.w3c.css.sac.LexicalUnit params)

hexcolorInternal

protected org.w3c.css.sac.LexicalUnit hexcolorInternal(org.w3c.css.sac.LexicalUnit prev,
                                                       Token t)


Copyright © 2011. All Rights Reserved.