All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class org.w3c.css.parser.analyzer.CssParser

java.lang.Object
   |
   +----org.w3c.css.parser.analyzer.CssParser

public abstract class CssParser
extends Object
implements CssParserConstants
A CSS2 parser


Variable Index

 o atRule
 o currentContext
The current context recognized by the parser (for errors).
 o currentProperty
The current property recognized by the parser (for errors).
 o frame
I store errors and warnings here.
 o jj_nt
 o lookingAhead
 o markRule
true if the parser had recognize a rule, false otherwise.
 o mode
true if the parser should recognized Aural properties, false otherwise.
 o token
 o token_source
 o url
The URL of the document

Constructor Index

 o CssParser(CssParserTokenManager)
 o CssParser(InputStream)

Method Index

 o _class(CssSelectors)
 o afterImportDeclaration()
 o atRuleDeclaration()
 o attrib(CssSelectors)
 o charset()
 o combinator()
 o declaration()
 o declarations()
 o deprecated_class()
 o disable_tracing()
 o element_name(CssSelectors)
 o enable_tracing()
 o expr()
 o fontFace()
 o function()
 o generateParseException()
 o getAtRule()
Returns the attribute atRule
 o getLine()
Returns the current line in the style sheet
 o getNextToken()
 o getSourceFile()
Returns the source file of the style sheet
 o getToken(int)
 o getURL()
 o handleAtRule(String, String)
Call by the at-rule statement.
 o handleDeclaration(String, CssExpression, boolean)
Assign an expression to a property.
 o handleImport(URL, String, AtRuleMedia)
Call by the import statement.
 o handleRule(CssSelectors, Vector)
Adds a vector of properties to a selector.
 o hash(CssSelectors)
 o hexcolor(CssExpression)
 o ignoreStatement()
 o importDeclaration()
The import statement
 o media()
 o medium(AtRuleMedia)
 o operator(CssExpression)
 o page()
 o parserUnit()
The main entry for the parser.
 o prio()
 o property()
 o pseudo(CssSelectors)
 o pseudo_page(AtRulePage)
 o ReInit(CssParserTokenManager)
 o ReInit(InputStream)
 o ReInit(InputStream, Frame)
Reinitialized the parser.
 o ruleSet()
 o selector()
 o setAtRule(AtRule)
Set the attribute atRule
 o setFrame(Frame)
The frame for handling errors and warnings.
 o setURL(URL)
Set the URL of the style sheet.
 o simple_selector(CssSelectors)
 o term(CssExpression)
 o unaryOperator()

Variables

 o atRule
 protected AtRule atRule
 o url
 protected URL url
The URL of the document

 o frame
 protected Frame frame
I store errors and warnings here.

 o currentContext
 protected Vector currentContext
The current context recognized by the parser (for errors).

 o currentProperty
 protected String currentProperty
The current property recognized by the parser (for errors).

 o mode
 protected static boolean mode
true if the parser should recognized Aural properties, false otherwise.

 o markRule
 protected boolean markRule
true if the parser had recognize a rule, false otherwise.

 o token_source
 public CssParserTokenManager token_source
 o token
 public Token token
 o jj_nt
 public Token jj_nt
 o lookingAhead
 public boolean lookingAhead

Constructors

 o CssParser
 public CssParser(InputStream stream)
 o CssParser
 public CssParser(CssParserTokenManager tm)

Methods

 o setFrame
 public final void setFrame(Frame frame)
The frame for handling errors and warnings.

Parameters:
frame - the new frame for the parser.
 o setAtRule
 public void setAtRule(AtRule atRule)
Set the attribute atRule

Parameters:
atRule - the new value for the attribute
 o getAtRule
 public AtRule getAtRule()
Returns the attribute atRule

Returns:
the value of the attribute
 o ReInit
 public void ReInit(InputStream stream,
                    Frame frame)
Reinitialized the parser.

Parameters:
stream - the stream data to parse.
frame - the new frame to use for parsing.
 o handleImport
 public abstract void handleImport(URL url,
                                   String file,
                                   AtRuleMedia media)
Call by the import statement.

Parameters:
url - The style sheet where this import statement appears.
file - the file name in the import
 o handleAtRule
 public abstract void handleAtRule(String ident,
                                   String string)
Call by the at-rule statement.

Parameters:
ident - The ident for this at-rule (for example: 'font-face')
string - The string associate to this at-rule
See Also:
Couple
 o handleDeclaration
 public abstract CssProperty handleDeclaration(String property,
                                               CssExpression values,
                                               boolean important) throws InvalidParamException
Assign an expression to a property. This function create a new property with property and assign to it the expression with the importance. Don't forget to set informations too.

A subclass must provide an implementation of this method.

Parameters:
property - the name of the property
values - the expression representation of values
important - true if values are important
Returns:
nullor a property
See Also:
CssProperty
 o handleRule
 public abstract void handleRule(CssSelectors selector,
                                 Vector declarations)
Adds a vector of properties to a selector.

A subclass must provide an implementation of this method.

Parameters:
selector - the selector
declarations - Properties to associate with contexts
 o getSourceFile
 public final String getSourceFile()
Returns the source file of the style sheet

 o getLine
 public final int getLine()
Returns the current line in the style sheet

 o setURL
 public final void setURL(URL url)
Set the URL of the style sheet.

Parameters:
URL - The URL for the style sheet
 o getURL
 public final URL getURL()
 o parserUnit
 public final void parserUnit() throws ParseException
The main entry for the parser.

Throws: ParseException
exception during the parse
 o charset
 public final void charset() throws ParseException
 o afterImportDeclaration
 public final void afterImportDeclaration() throws ParseException
 o ignoreStatement
 public final void ignoreStatement() throws ParseException
 o importDeclaration
 public final void importDeclaration() throws ParseException
The import statement

Throws: ParseException
exception during the parse
 o media
 public final void media() throws ParseException
Throws: ParseException
exception during the parse
 o medium
 public final void medium(AtRuleMedia media) throws ParseException
Throws: ParseException
exception during the parse
 o page
 public final void page() throws ParseException
Throws: ParseException
exception during the parse
 o pseudo_page
 public final void pseudo_page(AtRulePage page) throws ParseException
 o fontFace
 public final void fontFace() throws ParseException
 o atRuleDeclaration
 public final void atRuleDeclaration() throws ParseException
Throws: ParseException
exception during the parse
 o operator
 public final void operator(CssExpression expr) throws ParseException
Throws: ParseException
exception during the parse
 o combinator
 public final char combinator() throws ParseException
Throws: ParseException
exception during the parse
 o unaryOperator
 public final char unaryOperator() throws ParseException
Throws: ParseException
exception during the parse
 o property
 public final String property() throws ParseException
Throws: ParseException
exception during the parse
 o ruleSet
 public final void ruleSet() throws ParseException
Throws: ParseException
exception during the parse
 o declarations
 public final Vector declarations() throws ParseException
 o selector
 public final CssSelectors selector() throws ParseException
Throws: ParseException
exception during the parse
 o simple_selector
 public final CssSelectors simple_selector(CssSelectors next) throws ParseException
Throws: ParseException
exception during the parse
 o _class
 public final void _class(CssSelectors s) throws ParseException
Throws: ParseException
exception during the parse
 o deprecated_class
 public final Token deprecated_class() throws ParseException
 o element_name
 public final void element_name(CssSelectors s) throws ParseException
Throws: ParseException
exception during the parse
 o attrib
 public final void attrib(CssSelectors s) throws ParseException
Throws: ParseException
exception during the parse
 o pseudo
 public final void pseudo(CssSelectors s) throws ParseException
Throws: ParseException
exception during the parse
 o hash
 public final void hash(CssSelectors s) throws ParseException
Throws: ParseException
exception during the parse
 o declaration
 public final CssProperty declaration() throws ParseException
Throws: ParseException
exception during the parse
 o prio
 public final boolean prio() throws ParseException
Throws: ParseException
exception during the parse
 o expr
 public final CssExpression expr() throws ParseException
Throws: ParseException
exception during the parse
 o term
 public final void term(CssExpression exp) throws ParseException
Throws: ParseException
exception during the parse
 o function
 public final CssValue function() throws ParseException
Throws: ParseException
exception during the parse
 o hexcolor
 public final void hexcolor(CssExpression exp) throws ParseException
Throws: ParseException
exception during the parse
 o ReInit
 public void ReInit(InputStream stream)
 o ReInit
 public void ReInit(CssParserTokenManager tm)
 o getNextToken
 public final Token getNextToken()
 o getToken
 public final Token getToken(int index)
 o generateParseException
 public final ParseException generateParseException()
 o enable_tracing
 public final void enable_tracing()
 o disable_tracing
 public final void disable_tracing()

All Packages  Class Hierarchy  This Package  Previous  Next  Index