class Syntax extends AbstractSchemaElement {

  public static Syntax parse(final String definition)
    throws ParseException
  {
    final Matcher m = DEFINITION_PATTERN.matcher(definition);
    if (!m.matches()) {
      throw new ParseException("Invalid attribute syntax definition: " + definition, definition.length());
    }

    final Syntax asd = new Syntax(m.group(1).trim());

    // CheckStyle:MagicNumber OFF
    asd.setDescription(m.group(2) != null ? m.group(2).trim() : null);

    // parse extensions
    if (m.group(3) != null) {
      asd.setExtensions(Extensions.parse(m.group(3).trim()));
    }
    return asd;
    // CheckStyle:MagicNumber ON
  }

  public  Syntax(final String s);
  public  Syntax(final String oid, final String description, final Extensions extensions);

}