com.sun.perseus.parser |
Perseus Parser Package
The Perseus Parser package provides parsers used to handle complex attributes such as transforms
or path data.
The main classes are:
AbstractParser . This is the base class for all the Perseus parsers. It is a helper
class to ease the development of parsers (e.g., it contains common methods for skipping separators).
ColorParser . Parses CSS 2 color values
NumberParser . Parses SVG numbers. It is also the base class for parsers that need to
handle lists of numbers or parsers that need to parse numbers as part of their syntax (e.g.,
TransformListParser .
PathParser . Parses SVG path data (e.g., the 'd' attribute on <path>
TransformListParser . Parses transform list values (e.g., the 'transform' attribute)
ViewBoxParser . Parses the view box values
LengthParser . Parses SVG length values (e.g., the 'width' attribute on <svg>
|
Java Source File Name | Type | Comment |
AbstractParser.java | Class | AbstractParser is the base class for parsers found
in this package. |
ClockParser.java | Class | |
ColorParser.java | Class | The ColorParser class parses CSS 2 color values as
defined in the SVG specification for SVG Tiny:
color: hex3Color | hex6Color | rgbColor | predefinedColor
hex3Color: '#' hexDigit hexDigit hexDigit
hexDigit: 0|1|2|3|4|5|6|7|8|9|A|a|B|b|C|c|D|d|E|e|F|f
hex6Color: '#' hexDigit hexDigit hexDigi hexDigit hexDigit hexDigit
rgbColor: rgbColorInt | rgbColorPercent
rgbColorInt: rgbPrefix wsp* colInt wsp* comma wsp* colInt wsp*
comma wsp* colInt wsp* rgbSuffix
rgbPrefix: 'rgb('
wsp: ' '
comma: ','
colInt: int[0-255]
rgbColorPercent: rgbPrefix wsp* colPct wsp* comma wsp* colPct wsp*
comma wsp* colPct wsp* rgbSuffix
colPct: pctInt '%'
pctInt: int[0-100]
predefinedColor: 'black' | 'silver' | 'gray' | 'white' | 'maroon' | 'red'
| 'purple' | 'fuchia' | 'green' | 'lime' | 'olive'
| 'yellow' | 'navy' | 'blue' | 'teal' | 'aqua'
The above captures the verbal description of the CSS 2 specification
for CSS 2
Color Values. |
Length.java | Class | The LengthParser returns Length objects
from its parserLength method.
The Length class captures the value of the length
valut along with its unit. |
LengthParser.java | Class | |
NumberListParser.java | Class | The NumberListParser class converts attributes
conforming to the SVG Tiny definition of coordinate or number
list (see
Basic Data Types).. |
NumberParser.java | Class | This class represents a parser with support for numbers. |
PathParser.java | Class | The PathParser class converts attributes conforming to the
SVG path
syntax with the
limitation of SVG
Tiny which says that SVG Tiny does not support arc to commands. |
TimeConditionParser.java | Class | |
TransformListParser.java | Class | The TransformListParser class converts attributes
conforming to the SVG
transform
syntax into AffineTransform objects. |
UnicodeParser.java | Class | The UnicodeParser class converts attributes conforming to the
<hkern> 's u1/u2 attributes syntax. |
ViewBoxParser.java | Class | The ViewBoxParser class converts attributes conforming to the
SVG viewbox
syntax
into an array of four floating point values corresponding to the input
string. |