Class SyntaxParser

java.lang.Object
io.sf.carte.doc.style.css.parser.SyntaxParser

public class SyntaxParser extends Object
Parses a syntax specification according to CSS Properties and Values API Level 1 (accepts additional types like <string>).
  • Constructor Details

    • SyntaxParser

      public SyntaxParser()
  • Method Details

    • createSimpleSyntax

      public static CSSValueSyntax createSimpleSyntax(String category)
      Create a single-component syntax without multipliers.
      Parameters:
      category - the category name (url, string, image, etc).
      Returns:
      the single-component syntax, or null if the category name was not recognized.
    • parseSyntax

      public CSSValueSyntax parseSyntax(String def) throws CSSException
      Parse a syntax definition.
      Parameters:
      def - the syntax definition.
      Returns:
      the object representing the syntax.
      Throws:
      CSSException - if the definition was not valid.