Class AbstractGssParser
- java.lang.Object
-
- com.google.common.css.compiler.ast.AbstractGssParser
-
- Direct Known Subclasses:
GssParser
public abstract class AbstractGssParser extends java.lang.ObjectBase parser implementation that delegates management of the underlying JavaCC parser to the subclass. This class does not expose any public methods; subclasses should expose an appropriate interface.- See Also:
GssParser
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAbstractGssParser.ParseResult
-
Field Summary
Fields Modifier and Type Field Description protected static StringCharStreamEMPTY_CHAR_STREAM
-
Constructor Summary
Constructors Constructor Description AbstractGssParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract GssParserCCgetParser()Implementations must return an emptyGssParserCCobject.protected AbstractGssParser.ParseResultparseInternal(java.util.List<SourceCode> sources, boolean errorHandling)Parses a list of GSS sources.
-
-
-
Field Detail
-
EMPTY_CHAR_STREAM
protected static final StringCharStream EMPTY_CHAR_STREAM
-
-
Method Detail
-
parseInternal
protected final AbstractGssParser.ParseResult parseInternal(java.util.List<SourceCode> sources, boolean errorHandling) throws GssParserException
Parses a list of GSS sources. Subclasses should use this method to do the actual parsing ofSourceCodeobjects. It will in turn call the subclass's implementation ofgetParser()as necessary.- Parameters:
sources- a list of GSSSourceCodeobjects to parseerrorHandling- if error handling should be enabled. If this isfalse, noGssParserExceptions will be returned in the result.- Returns:
- ParseResult the result containing the
CssTreeand parsing errors - Throws:
GssParserException
-
getParser
protected abstract GssParserCC getParser()
Implementations must return an emptyGssParserCCobject. Whether this object is actually new or not isn't important which allows pooling.
-
-