|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.vaadin.sass.internal.parser.Parser
public class Parser
A CSS2 parser
| Field Summary | |
|---|---|
protected org.w3c.css.sac.ConditionFactory |
conditionFactory
|
protected SCSSDocumentHandlerImpl |
documentHandler
|
protected org.w3c.css.sac.ErrorHandler |
errorHandler
|
Token |
jj_nt
Next token. |
protected org.w3c.css.sac.SelectorFactory |
selectorFactory
|
protected org.w3c.css.sac.InputSource |
source
|
Token |
token
Current token. |
ParserTokenManager |
token_source
Generated Token Manager. |
| Constructor Summary | |
|---|---|
Parser()
Creates a new Parser |
|
Parser(CharStream stream)
Constructor with user supplied CharStream. |
|
Parser(ParserTokenManager tm)
Constructor with generated Token Manager. |
|
| Method Summary | |
|---|---|
java.lang.String |
_class(java.lang.String pred)
|
void |
_parseDeclarationBlock()
|
void |
_parseImportRule()
|
void |
_parseMediaRule()
|
void |
_parseRule()
The following functions are useful for a DOM CSS implementation only and are not part of the general CSS2 parser. |
java.util.ArrayList<java.lang.String> |
_parseSelectors()
|
void |
afterImportDeclaration()
|
void |
appendDirective()
|
java.util.ArrayList<VariableNode> |
arglist()
|
java.util.ArrayList<LexicalUnitImpl> |
argValuelist()
|
void |
atRuleDeclaration()
|
java.lang.String |
attrib(java.lang.String pred)
|
java.lang.String |
booleanExpressionToken()
|
void |
charset()
|
char |
combinator()
|
char |
combinatorChar()
to refactor combinator and reuse in selector(). |
java.lang.String |
containsDirective()
|
void |
contentDirective()
|
void |
controlDirective()
|
void |
debugDirective()
|
void |
debuggingDirective()
|
void |
declaration()
|
void |
declarationOrNestedProperties()
|
void |
disable_tracing()
Disable tracing. |
void |
eachDirective()
|
java.lang.String |
element_name()
|
void |
elseDirective()
|
void |
enable_tracing()
Enable tracing. |
LexicalUnitImpl |
expr()
|
void |
extendDirective()
|
void |
fontFace()
|
Node |
forDirective()
|
LexicalUnitImpl |
function(char operator,
LexicalUnitImpl prev)
Handle all CSS2 functions. |
java.lang.String |
functionName()
|
ParseException |
generateParseException()
Generate ParseException. |
org.w3c.css.sac.InputSource |
getInputSource()
|
Token |
getNextToken()
Get the next Token. |
java.lang.String |
getParserVersion()
This methods returns "http://www.w3.org/TR/REC-CSS2". |
Token |
getToken(int index)
Get the specific Token. |
boolean |
guarded()
|
java.lang.String |
hash(java.lang.String pred)
|
LexicalUnitImpl |
hexcolor(LexicalUnitImpl prev)
|
void |
ifContentStatement()
|
void |
ifDirective()
|
void |
ignoreStatement()
|
void |
importDeclaration()
The import statement |
void |
includeDirective()
|
java.lang.String |
interpolation()
|
void |
keyframes()
|
void |
keyframeSelector()
|
void |
listModifyDirective()
|
void |
media()
|
void |
mediaStatement(MediaListImpl ml)
|
java.lang.String |
medium()
|
void |
microsoftExtension()
|
VariableNode |
mixinArg()
|
void |
mixinDirective()
|
void |
nestedProperties()
|
LexicalUnitImpl |
nonVariableTerm(LexicalUnitImpl prev)
|
LexicalUnitImpl |
operator(LexicalUnitImpl prev)
|
void |
page()
|
void |
parseImportRule(org.w3c.css.sac.InputSource source)
Parse methods used by DOM Level 2 implementation. |
void |
parseMediaRule(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)
This method parses only one rule (style rule or at-rule, except @charset). |
void |
parserUnit()
The main entry for the parser. |
org.w3c.css.sac.SelectorList |
parseSelectors(org.w3c.css.sac.InputSource source)
|
void |
parseStyleDeclaration(org.w3c.css.sac.InputSource source)
This method parses a style declaration (including the surrounding curly braces). |
void |
parseStyleSheet(org.w3c.css.sac.InputSource source)
Main parse methods |
void |
parseStyleSheet(java.lang.String systemId)
Convenient method for URIs. |
boolean |
prio()
|
java.lang.String |
property()
|
java.lang.String |
pseudo_page()
|
java.lang.String |
pseudo(java.lang.String pred)
|
void |
ReInit(CharStream stream)
Reinitialise. |
void |
ReInit(ParserTokenManager tm)
Reinitialise. |
void |
removeDirective()
|
Node |
returnDirective()
|
java.lang.String |
selector()
|
java.util.ArrayList<java.lang.String> |
selectorList()
|
void |
setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
|
void |
setDocumentHandler(org.w3c.css.sac.DocumentHandler handler)
Set the document handler for this parser |
void |
setErrorHandler(org.w3c.css.sac.ErrorHandler error)
Set the error handler for this parser |
void |
setLocale(java.util.Locale locale)
|
void |
setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
|
java.lang.String |
simple_selector(java.lang.String selector,
char comb)
|
void |
skipUnknownRule()
|
java.util.ArrayList<java.lang.String> |
stringList()
|
void |
styleRule()
|
void |
styleRuleOrDeclarationOrNestedProperties()
|
LexicalUnitImpl |
term(LexicalUnitImpl prev)
|
char |
unaryOperator()
|
LexicalUnitImpl |
unicode(LexicalUnitImpl prev)
|
LexicalUnitImpl |
url(LexicalUnitImpl prev)
|
void |
variable()
|
java.lang.String |
variableName()
|
LexicalUnitImpl |
variableTerm(LexicalUnitImpl prev)
|
void |
warnDirective()
|
Node |
whileDirective()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SCSSDocumentHandlerImpl documentHandler
protected org.w3c.css.sac.ErrorHandler errorHandler
protected org.w3c.css.sac.InputSource source
protected org.w3c.css.sac.ConditionFactory conditionFactory
protected org.w3c.css.sac.SelectorFactory selectorFactory
public ParserTokenManager token_source
public Token token
public Token jj_nt
| Constructor Detail |
|---|
public Parser()
public Parser(CharStream stream)
public Parser(ParserTokenManager tm)
| Method Detail |
|---|
public void setLocale(java.util.Locale locale)
throws org.w3c.css.sac.CSSException
setLocale in interface org.w3c.css.sac.Parserorg.w3c.css.sac.CSSException - Not yet implementedpublic org.w3c.css.sac.InputSource getInputSource()
public void setDocumentHandler(org.w3c.css.sac.DocumentHandler handler)
setDocumentHandler in interface org.w3c.css.sac.Parserpublic void setSelectorFactory(org.w3c.css.sac.SelectorFactory selectorFactory)
setSelectorFactory in interface org.w3c.css.sac.Parserpublic void setConditionFactory(org.w3c.css.sac.ConditionFactory conditionFactory)
setConditionFactory in interface org.w3c.css.sac.Parserpublic void setErrorHandler(org.w3c.css.sac.ErrorHandler error)
setErrorHandler in interface org.w3c.css.sac.Parser
public void parseStyleSheet(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parseStyleSheet in interface org.w3c.css.sac.Parsersource - the source of the style sheet.
java.io.IOException - the source can't be parsed.
org.w3c.css.sac.CSSException - the source is not CSS valid.
public void parseStyleSheet(java.lang.String systemId)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parseStyleSheet in interface org.w3c.css.sac.ParsersystemId - the fully resolved URI of the style sheet.
java.io.IOException - the source can't be parsed.
org.w3c.css.sac.CSSException - the source is not CSS valid.
public void parseRule(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parseRule in interface org.w3c.css.sac.Parsersource - the source of the rule.
java.io.IOException - the source can't be parsed.
org.w3c.css.sac.CSSException - the source is not CSS valid.
public void parseStyleDeclaration(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parseStyleDeclaration in interface org.w3c.css.sac.Parsersource - the source of the style declaration.
java.io.IOException - the source can't be parsed.
org.w3c.css.sac.CSSException - the source is not CSS valid.public java.lang.String getParserVersion()
getParserVersion in interface org.w3c.css.sac.Parser
public void parseImportRule(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
org.w3c.css.sac.CSSException
java.io.IOException
public void parseMediaRule(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
org.w3c.css.sac.CSSException
java.io.IOException
public org.w3c.css.sac.SelectorList parseSelectors(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parseSelectors in interface org.w3c.css.sac.Parserorg.w3c.css.sac.CSSException
java.io.IOException
public org.w3c.css.sac.LexicalUnit parsePropertyValue(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parsePropertyValue in interface org.w3c.css.sac.Parserorg.w3c.css.sac.CSSException
java.io.IOException
public boolean parsePriority(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException,
java.io.IOException
parsePriority in interface org.w3c.css.sac.Parserorg.w3c.css.sac.CSSException
java.io.IOException
public final void parserUnit()
throws ParseException
ParseException - exception during the parse
public final void charset()
throws ParseException
ParseException
public final void afterImportDeclaration()
throws ParseException
ParseException
public final void ignoreStatement()
throws ParseException
ParseException
public final void importDeclaration()
throws ParseException
ParseException - exception during the parse
public final void keyframes()
throws ParseException
ParseException - exception during the parse
public final void keyframeSelector()
throws ParseException
ParseException
public final void media()
throws ParseException
ParseException - exception during the parse
public final void mediaStatement(MediaListImpl ml)
throws ParseException
ParseException
public final java.lang.String medium()
throws ParseException
ParseException - exception during the parse
public final void page()
throws ParseException
ParseException - exception during the parse
public final java.lang.String pseudo_page()
throws ParseException
ParseException
public final void fontFace()
throws ParseException
ParseException
public final void atRuleDeclaration()
throws ParseException
ParseException - exception during the parse
public final void skipUnknownRule()
throws ParseException
ParseException
public final char combinator()
throws ParseException
ParseException - exception during the parse
public final char combinatorChar()
throws ParseException
ParseException
public final void microsoftExtension()
throws ParseException
ParseException
public final java.lang.String property()
throws ParseException
ParseException - exception during the parse
public final java.lang.String variableName()
throws ParseException
ParseException
public final java.lang.String functionName()
throws ParseException
ParseException
public final void styleRule()
throws ParseException
ParseException - exception during the parse
public final java.util.ArrayList<java.lang.String> selectorList()
throws ParseException
ParseException
public final java.lang.String selector()
throws ParseException
ParseException - exception during the parse
public final java.lang.String simple_selector(java.lang.String selector,
char comb)
throws ParseException
ParseException - exception during the parse
public final java.lang.String _class(java.lang.String pred)
throws ParseException
ParseException - exception during the parse
public final java.lang.String element_name()
throws ParseException
ParseException - exception during the parse
public final java.lang.String attrib(java.lang.String pred)
throws ParseException
ParseException - exception during the parse
public final java.lang.String pseudo(java.lang.String pred)
throws ParseException
ParseException - exception during the parse
public final java.lang.String hash(java.lang.String pred)
throws ParseException
ParseException - exception during the parse
public final void variable()
throws ParseException
ParseException
public final void controlDirective()
throws ParseException
ParseException
public final void ifContentStatement()
throws ParseException
ParseException
public final void ifDirective()
throws ParseException
ParseException
public final void elseDirective()
throws ParseException
ParseException
public final java.lang.String booleanExpressionToken()
throws ParseException
ParseException
public final void eachDirective()
throws ParseException
ParseException
public final java.util.ArrayList<java.lang.String> stringList()
throws ParseException
ParseException
public final void mixinDirective()
throws ParseException
ParseException
public final java.util.ArrayList<VariableNode> arglist()
throws ParseException
ParseException
public final VariableNode mixinArg()
throws ParseException
ParseException
public final java.util.ArrayList<LexicalUnitImpl> argValuelist()
throws ParseException
ParseException
public final void includeDirective()
throws ParseException
ParseException
public final java.lang.String interpolation()
throws ParseException
ParseException
public final void listModifyDirective()
throws ParseException
ParseException
public final void appendDirective()
throws ParseException
ParseException - exception during the parse
public final void removeDirective()
throws ParseException
ParseException - exception during the parse
public final java.lang.String containsDirective()
throws ParseException
ParseException - exception during the parse
public final Node returnDirective()
throws ParseException
ParseException
public final void debuggingDirective()
throws ParseException
ParseException
public final void debugDirective()
throws ParseException
ParseException
public final void warnDirective()
throws ParseException
ParseException
public final Node forDirective()
throws ParseException
ParseException
public final Node whileDirective()
throws ParseException
ParseException
public final void extendDirective()
throws ParseException
ParseException
public final void contentDirective()
throws ParseException
ParseException
public final void nestedProperties()
throws ParseException
ParseException
public final void styleRuleOrDeclarationOrNestedProperties()
throws ParseException
ParseException - exception during the parse
public final void declarationOrNestedProperties()
throws ParseException
ParseException - exception during the parse
public final void declaration()
throws ParseException
ParseException - exception during the parse
public final boolean prio()
throws ParseException
ParseException - exception during the parse
public final boolean guarded()
throws ParseException
ParseException
public final LexicalUnitImpl operator(LexicalUnitImpl prev)
throws ParseException
ParseException - exception during the parse
public final LexicalUnitImpl expr()
throws ParseException
ParseException - exception during the parse
public final char unaryOperator()
throws ParseException
ParseException - exception during the parse
public final LexicalUnitImpl term(LexicalUnitImpl prev)
throws ParseException
ParseException - exception during the parse
public final LexicalUnitImpl variableTerm(LexicalUnitImpl prev)
throws ParseException
ParseException
public final LexicalUnitImpl nonVariableTerm(LexicalUnitImpl prev)
throws ParseException
ParseException
public final LexicalUnitImpl function(char operator,
LexicalUnitImpl prev)
throws ParseException
ParseException - exception during the parse
public final LexicalUnitImpl unicode(LexicalUnitImpl prev)
throws ParseException
ParseException
public final LexicalUnitImpl url(LexicalUnitImpl prev)
throws ParseException
ParseException
public final LexicalUnitImpl hexcolor(LexicalUnitImpl prev)
throws ParseException
ParseException - exception during the parse
public final void _parseRule()
throws ParseException
ParseException
public final void _parseImportRule()
throws ParseException
ParseException
public final void _parseMediaRule()
throws ParseException
ParseException
public final void _parseDeclarationBlock()
throws ParseException
ParseException
public final java.util.ArrayList<java.lang.String> _parseSelectors()
throws ParseException
ParseExceptionpublic void ReInit(CharStream stream)
public void ReInit(ParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||