summaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2008-11-28 18:57:34 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2008-11-28 18:57:34 +0000
commit23ec03c90f2fdc91dfad16e2de69e466d58f0a42 (patch)
tree9762612960a36bd8f56417c23f474da574699e7e /src/parse
parentf6fb8c8a662e8403a579ceb548b8b51701ed58cf (diff)
downloadlibcss-23ec03c90f2fdc91dfad16e2de69e466d58f0a42.tar.gz
libcss-23ec03c90f2fdc91dfad16e2de69e466d58f0a42.tar.bz2
Tidy things up somewhat.
css21 is now language, as everything will share the same parsing rules (although there is facility to alter behaviour based upon the language level -- consult language->sheet->level and then decide what to do) svn path=/trunk/libcss/; revision=5815
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/Makefile2
-rw-r--r--src/parse/language.c (renamed from src/parse/css21.c)455
-rw-r--r--src/parse/language.h (renamed from src/parse/css21.h)12
-rw-r--r--src/parse/properties.c (renamed from src/parse/css21props.c)430
-rw-r--r--src/parse/propstrings.h305
5 files changed, 610 insertions, 594 deletions
diff --git a/src/parse/Makefile b/src/parse/Makefile
index fc27e8e..7d42214 100644
--- a/src/parse/Makefile
+++ b/src/parse/Makefile
@@ -35,7 +35,7 @@ d := $(DIR)
CFLAGS := $(CFLAGS) -I$(d)
# Sources
-SRCS_$(d) := parse.c css21.c
+SRCS_$(d) := parse.c language.c
# Append to sources for component
SOURCES += $(addprefix $(d), $(SRCS_$(d)))
diff --git a/src/parse/css21.c b/src/parse/language.c
index 4303313..4273658 100644
--- a/src/parse/css21.c
+++ b/src/parse/language.c
@@ -12,314 +12,23 @@
#include "stylesheet.h"
#include "lex/lex.h"
-#include "parse/css21.h"
+#include "parse/language.h"
#include "parse/parse.h"
+#include "parse/propstrings.h"
#include "utils/parserutilserror.h"
#include "utils/utils.h"
-enum {
- /* At-rules */
- CHARSET, IMPORT, MEDIA, PAGE,
-
- /* Properties */
- FIRST_PROP,
-
- AZIMUTH = FIRST_PROP, BACKGROUND_ATTACHMENT, BACKGROUND_COLOR,
- BACKGROUND_IMAGE, BACKGROUND_POSITION, BACKGROUND_REPEAT,
- BORDER_BOTTOM_COLOR, BORDER_BOTTOM_STYLE, BORDER_BOTTOM_WIDTH,
- BORDER_COLLAPSE, BORDER_LEFT_COLOR, BORDER_LEFT_STYLE,
- BORDER_LEFT_WIDTH, BORDER_RIGHT_COLOR, BORDER_RIGHT_STYLE,
- BORDER_RIGHT_WIDTH, BORDER_SPACING, BORDER_TOP_COLOR, BORDER_TOP_STYLE,
- BORDER_TOP_WIDTH, BOTTOM, CAPTION_SIDE, CLEAR, CLIP, COLOR, CONTENT,
- COUNTER_INCREMENT, COUNTER_RESET, CUE_AFTER, CUE_BEFORE, CURSOR,
- DIRECTION, DISPLAY, ELEVATION, EMPTY_CELLS, FLOAT, FONT_FAMILY,
- FONT_SIZE, FONT_STYLE, FONT_VARIANT, FONT_WEIGHT, HEIGHT, LEFT,
- LETTER_SPACING, LINE_HEIGHT, LIST_STYLE_IMAGE, LIST_STYLE_POSITION,
- LIST_STYLE_TYPE, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP,
- MAX_HEIGHT, MAX_WIDTH, MIN_HEIGHT, MIN_WIDTH, ORPHANS, OUTLINE_COLOR,
- OUTLINE_STYLE, OUTLINE_WIDTH, OVERFLOW, PADDING_BOTTOM, PADDING_LEFT,
- PADDING_RIGHT, PADDING_TOP, PAGE_BREAK_AFTER, PAGE_BREAK_BEFORE,
- PAGE_BREAK_INSIDE, PAUSE_AFTER, PAUSE_BEFORE, PITCH_RANGE, PITCH,
- PLAY_DURING, POSITION, QUOTES, RICHNESS, RIGHT, SPEAK_HEADER,
- SPEAK_NUMERAL, SPEAK_PUNCTUATION, SPEAK, SPEECH_RATE, STRESS,
- TABLE_LAYOUT, TEXT_ALIGN, TEXT_DECORATION, TEXT_INDENT, TEXT_TRANSFORM,
- TOP, UNICODE_BIDI, VERTICAL_ALIGN, VISIBILITY, VOICE_FAMILY, VOLUME,
- WHITE_SPACE, WIDOWS, WIDTH, WORD_SPACING, Z_INDEX,
-
- LAST_PROP = Z_INDEX,
-
- /* Other keywords */
- INHERIT, IMPORTANT, NONE, BOTH, FIXED, SCROLL, TRANSPARENT,
- NO_REPEAT, REPEAT_X, REPEAT_Y, REPEAT, HIDDEN, DOTTED, DASHED,
- SOLID, DOUBLE, GROOVE, RIDGE, INSET, OUTSET, THIN, MEDIUM, THICK,
- COLLAPSE, SEPARATE, AUTO, LTR, RTL, INLINE, BLOCK, LIST_ITEM, RUN_IN,
- INLINE_BLOCK, TABLE, INLINE_TABLE, TABLE_ROW_GROUP, TABLE_HEADER_GROUP,
- TABLE_FOOTER_GROUP, TABLE_ROW, TABLE_COLUMN_GROUP, TABLE_COLUMN,
- TABLE_CELL, TABLE_CAPTION, BELOW, LEVEL, ABOVE, HIGHER, LOWER,
- SHOW, HIDE, XX_SMALL, X_SMALL, SMALL, LARGE, X_LARGE, XX_LARGE,
- LARGER, SMALLER, NORMAL, ITALIC, OBLIQUE, SMALL_CAPS, BOLD, BOLDER,
- LIGHTER, INSIDE, OUTSIDE, DISC, CIRCLE, SQUARE, DECIMAL,
- DECIMAL_LEADING_ZERO, LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
- LOWER_LATIN, UPPER_LATIN, ARMENIAN, GEORGIAN, LOWER_ALPHA, UPPER_ALPHA,
- INVERT, VISIBLE, ALWAYS, AVOID, X_LOW, LOW, HIGH, X_HIGH, STATIC,
- RELATIVE, ABSOLUTE, ONCE, DIGITS, CONTINUOUS, CODE, SPELL_OUT, X_SLOW,
- SLOW, FAST, X_FAST, FASTER, SLOWER, CENTER, JUSTIFY, CAPITALIZE,
- UPPERCASE, LOWERCASE, EMBED, BIDI_OVERRIDE, BASELINE, SUB, SUPER,
- TEXT_TOP, MIDDLE, TEXT_BOTTOM, SILENT, X_SOFT, SOFT, LOUD, X_LOUD,
- PRE, NOWRAP, PRE_WRAP, PRE_LINE,
-
- LAST_KNOWN
-};
-
-/* Must be synchronised with above enum */
-static struct {
- const char *data;
- size_t len;
-} stringmap[LAST_KNOWN] = {
- { "charset", SLEN("charset") },
- { "import", SLEN("import") },
- { "media", SLEN("media") },
- { "page", SLEN("page") },
-
- { "azimuth", SLEN("azimuth") },
- { "background-attachment", SLEN("background-attachment") },
- { "background-color", SLEN("background-color") },
- { "background-image", SLEN("background-image") },
- { "background-position", SLEN("background-position") },
- { "background-repeat", SLEN("background-repeat") },
- { "border-bottom-color", SLEN("border-bottom-color") },
- { "border-bottom-style", SLEN("border-bottom-style") },
- { "border-bottom-width", SLEN("border-bottom-width") },
- { "border-collapse", SLEN("border-collapse") },
- { "border-left-color", SLEN("border-left-color") },
- { "border-left-style", SLEN("border-left-style") },
- { "border-left-width", SLEN("border-left-width") },
- { "border-right-color", SLEN("border-right-color") },
- { "border-right-style", SLEN("border-right-style") },
- { "border-right-width", SLEN("border-right-width") },
- { "border-spacing", SLEN("border-spacing") },
- { "border-top-color", SLEN("border-top-color") },
- { "border-top-style", SLEN("border-top-style") },
- { "border-top-width", SLEN("border-top-width") },
- { "bottom", SLEN("bottom") },
- { "caption-side", SLEN("caption-side") },
- { "clear", SLEN("clear") },
- { "clip", SLEN("clip") },
- { "color", SLEN("color") },
- { "content", SLEN("content") },
- { "counter-increment", SLEN("counter-increment") },
- { "counter-reset", SLEN("counter-reset") },
- { "cue-after", SLEN("cue-after") },
- { "cue-before", SLEN("cue-before") },
- { "cursor", SLEN("cursor") },
- { "direction", SLEN("direction") },
- { "display", SLEN("display") },
- { "elevation", SLEN("elevation") },
- { "empty-cells", SLEN("empty-cells") },
- { "float", SLEN("float") },
- { "font-family", SLEN("font-family") },
- { "font-size", SLEN("font-size") },
- { "font-style", SLEN("font-style") },
- { "font-variant", SLEN("font-variant") },
- { "font-weight", SLEN("font-weight") },
- { "height", SLEN("height") },
- { "left", SLEN("left") },
- { "letter-spacing", SLEN("letter-spacing") },
- { "line-height", SLEN("line-height") },
- { "list-style-image", SLEN("list-style-image") },
- { "list-style-position", SLEN("list-style-position") },
- { "list-style-type", SLEN("list-style-type") },
- { "margin-bottom", SLEN("margin-bottom") },
- { "margin-left", SLEN("margin-left") },
- { "margin-right", SLEN("margin-right") },
- { "margin-top", SLEN("margin-top") },
- { "max-height", SLEN("max-height") },
- { "max-width", SLEN("max-width") },
- { "min-height", SLEN("min-height") },
- { "min-width", SLEN("min-width") },
- { "orphans", SLEN("orphans") },
- { "outline-color", SLEN("outline-color") },
- { "outline-style", SLEN("outline-style") },
- { "outline-width", SLEN("outline-width") },
- { "overflow", SLEN("overflow") },
- { "padding-bottom", SLEN("padding-bottom") },
- { "padding-left", SLEN("padding-left") },
- { "padding-right", SLEN("padding-right") },
- { "padding-top", SLEN("padding-top") },
- { "page-break-after", SLEN("page-break-after") },
- { "page-break-before", SLEN("page-break-before") },
- { "page-break-inside", SLEN("page-break-inside") },
- { "pause-after", SLEN("pause-after") },
- { "pause-before", SLEN("pause-before") },
- { "pitch-range", SLEN("pitch-range") },
- { "pitch", SLEN("pitch") },
- { "play-during", SLEN("play-during") },
- { "position", SLEN("position") },
- { "quotes", SLEN("quotes") },
- { "richness", SLEN("richness") },
- { "right", SLEN("right") },
- { "speak-header", SLEN("speak-header") },
- { "speak-numeral", SLEN("speak-numeral") },
- { "speak-punctuation", SLEN("speak-punctuation") },
- { "speak", SLEN("speak") },
- { "speech-rate", SLEN("speech-rate") },
- { "stress", SLEN("stress") },
- { "table-layout", SLEN("table-layout") },
- { "text-align", SLEN("text-align") },
- { "text-decoration", SLEN("text-decoration") },
- { "text-indent", SLEN("text-indent") },
- { "text-transform", SLEN("text-transform") },
- { "top", SLEN("top") },
- { "unicode-bidi", SLEN("unicode-bidi") },
- { "vertical-align", SLEN("vertical-align") },
- { "visibility", SLEN("visibility") },
- { "voice-family", SLEN("voice-family") },
- { "volume", SLEN("volume") },
- { "white-space", SLEN("white-space") },
- { "widows", SLEN("widows") },
- { "width", SLEN("width") },
- { "word-spacing", SLEN("word-spacing") },
- { "z-index", SLEN("z-index") },
-
- { "inherit", SLEN("inherit") },
- { "important", SLEN("important") },
- { "none", SLEN("none") },
- { "both", SLEN("both") },
- { "fixed", SLEN("fixed") },
- { "scroll", SLEN("scroll") },
- { "transparent", SLEN("transparent") },
- { "no-repeat", SLEN("no-repeat") },
- { "repeat-x", SLEN("repeat-x") },
- { "repeat-y", SLEN("repeat-y") },
- { "repeat", SLEN("repeat") },
- { "hidden", SLEN("hidden") },
- { "dotted", SLEN("dotted") },
- { "dashed", SLEN("dashed") },
- { "solid", SLEN("solid") },
- { "double", SLEN("double") },
- { "groove", SLEN("groove") },
- { "ridge", SLEN("ridge") },
- { "inset", SLEN("inset") },
- { "outset", SLEN("outset") },
- { "thin", SLEN("thin") },
- { "medium", SLEN("medium") },
- { "thick", SLEN("thick") },
- { "collapse", SLEN("collapse") },
- { "separate", SLEN("separate") },
- { "auto", SLEN("auto") },
- { "ltr", SLEN("ltr") },
- { "rtl", SLEN("rtl") },
- { "inline", SLEN("inline") },
- { "block", SLEN("block") },
- { "list-item", SLEN("list-item") },
- { "run-in", SLEN("run-in") },
- { "inline-block", SLEN("inline-block") },
- { "table", SLEN("table") },
- { "inline-table", SLEN("inline-table") },
- { "table-row-group", SLEN("table-row-group") },
- { "table-header-group", SLEN("table-header-group") },
- { "table-footer-group", SLEN("table-footer-group") },
- { "table-row", SLEN("table-row") },
- { "table-column-group", SLEN("table-column-group") },
- { "table-column", SLEN("table-column") },
- { "table-cell", SLEN("table-cell") },
- { "table-caption", SLEN("table-caption") },
- { "below", SLEN("below") },
- { "level", SLEN("level") },
- { "above", SLEN("above") },
- { "higher", SLEN("higher") },
- { "lower", SLEN("lower") },
- { "show", SLEN("show") },
- { "hide", SLEN("hide") },
- { "xx-small", SLEN("xx-small") },
- { "x-small", SLEN("x-small") },
- { "small", SLEN("small") },
- { "large", SLEN("large") },
- { "x-large", SLEN("x-large") },
- { "xx-large", SLEN("xx-large") },
- { "larger", SLEN("larger") },
- { "smaller", SLEN("smaller") },
- { "normal", SLEN("normal") },
- { "italic", SLEN("italic") },
- { "oblique", SLEN("oblique") },
- { "small-caps", SLEN("small-caps") },
- { "bold", SLEN("bold") },
- { "bolder", SLEN("bolder") },
- { "lighter", SLEN("lighter") },
- { "inside", SLEN("inside") },
- { "outside", SLEN("outside") },
- { "disc", SLEN("disc") },
- { "circle", SLEN("circle") },
- { "square", SLEN("square") },
- { "decimal", SLEN("decimal") },
- { "decimal-leading-zero", SLEN("decimal-leading-zero") },
- { "lower-roman", SLEN("lower-roman") },
- { "upper-roman", SLEN("upper-roman") },
- { "lower-greek", SLEN("lower-greek") },
- { "lower-latin", SLEN("lower-latin") },
- { "upper-latin", SLEN("upper-latin") },
- { "armenian", SLEN("armenian") },
- { "georgian", SLEN("georgian") },
- { "lower-alpha", SLEN("lower-alpha") },
- { "upper-alpha", SLEN("upper-alpha") },
- { "invert", SLEN("invert") },
- { "visible", SLEN("visible") },
- { "always", SLEN("always") },
- { "avoid", SLEN("avoid") },
- { "x-low", SLEN("x-low") },
- { "low", SLEN("low") },
- { "high", SLEN("high") },
- { "x-high", SLEN("x-high") },
- { "static", SLEN("static") },
- { "relative", SLEN("relative") },
- { "absolute", SLEN("absolute") },
- { "once", SLEN("once") },
- { "digits", SLEN("digits") },
- { "continuous", SLEN("continuous") },
- { "code", SLEN("code") },
- { "spell-out", SLEN("spell-out") },
- { "x-slow", SLEN("x-slow") },
- { "slow", SLEN("slow") },
- { "fast", SLEN("fast") },
- { "x-fast", SLEN("x-fast") },
- { "faster", SLEN("faster") },
- { "slower", SLEN("slower") },
- { "center", SLEN("center") },
- { "justify", SLEN("justify") },
- { "capitalize", SLEN("capitalize") },
- { "uppercase", SLEN("uppercase") },
- { "lowercase", SLEN("lowercase") },
- { "embed", SLEN("embed") },
- { "bidi-override", SLEN("bidi-override") },
- { "baseline", SLEN("baseline") },
- { "sub", SLEN("sub") },
- { "super", SLEN("super") },
- { "text-top", SLEN("text-top") },
- { "middle", SLEN("middle") },
- { "text-bottom", SLEN("text-bottom") },
- { "silent", SLEN("silent") },
- { "x-soft", SLEN("x-soft") },
- { "soft", SLEN("soft") },
- { "loud", SLEN("loud") },
- { "x-loud", SLEN("x-loud") },
- { "pre", SLEN("pre") },
- { "nowrap", SLEN("nowrap") },
- { "pre-wrap", SLEN("pre-wrap") },
- { "pre-line", SLEN("pre-line") },
-};
-
typedef struct context_entry {
css_parser_event type; /**< Type of entry */
void *data; /**< Data for context */
} context_entry;
/**
- * Context for a CSS 2.1 parser
+ * Context for a CSS language parser
*/
-struct css_css21 {
+struct css_language {
css_stylesheet *sheet; /**< The stylesheet to parse for */
- css_parser *parser; /**< The underlying core parser */
#define STACK_CHUNK 32
parserutils_stack *context; /**< Context stack */
@@ -330,6 +39,7 @@ struct css_css21 {
HAD_RULE,
} state; /**< State flag, for at-rule handling */
+ /** \todo These should be statically allocated */
const uint8_t *strings[LAST_KNOWN]; /**< Interned strings */
css_alloc alloc; /**< Memory (de)allocation function */
@@ -337,59 +47,59 @@ struct css_css21 {
};
/* Event handlers */
-static css_error css21_handle_event(css_parser_event type,
+static css_error language_handle_event(css_parser_event type,
const parserutils_vector *tokens, void *pw);
-static inline css_error handleStartStylesheet(css_css21 *c,
+static inline css_error handleStartStylesheet(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleEndStylesheet(css_css21 *c,
+static inline css_error handleEndStylesheet(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleStartRuleset(css_css21 *c,
+static inline css_error handleStartRuleset(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleEndRuleset(css_css21 *c,
+static inline css_error handleEndRuleset(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleStartAtRule(css_css21 *c,
+static inline css_error handleStartAtRule(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleEndAtRule(css_css21 *c,
+static inline css_error handleEndAtRule(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleStartBlock(css_css21 *c,
+static inline css_error handleStartBlock(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleEndBlock(css_css21 *c,
+static inline css_error handleEndBlock(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleBlockContent(css_css21 *c,
+static inline css_error handleBlockContent(css_language *c,
const parserutils_vector *vector);
-static inline css_error handleDeclaration(css_css21 *c,
+static inline css_error handleDeclaration(css_language *c,
const parserutils_vector *vector);
/* Selector list parsing */
-static inline css_error parseClass(css_css21 *c,
+static inline css_error parseClass(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector_detail **specific);
-static inline css_error parseAttrib(css_css21 *c,
+static inline css_error parseAttrib(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector_detail **specific);
-static inline css_error parsePseudo(css_css21 *c,
+static inline css_error parsePseudo(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector_detail **specific);
-static inline css_error parseSpecific(css_css21 *c,
+static inline css_error parseSpecific(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent);
-static inline css_error parseSelectorSpecifics(css_css21 *c,
+static inline css_error parseSelectorSpecifics(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent);
-static inline css_error parseSimpleSelector(css_css21 *c,
+static inline css_error parseSimpleSelector(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **result);
-static inline css_error parseCombinator(css_css21 *c,
+static inline css_error parseCombinator(css_language *c,
const parserutils_vector *vector, int *ctx,
css_combinator *result);
-static inline css_error parseSelector(css_css21 *c,
+static inline css_error parseSelector(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **result);
-static inline css_error parseSelectorList(css_css21 *c,
+static inline css_error parseSelectorList(css_language *c,
const parserutils_vector *vector, css_rule *rule);
/* Declaration parsing */
-static inline css_error parseProperty(css_css21 *c,
+static inline css_error parseProperty(css_language *c,
const css_token *property, const parserutils_vector *vector,
int *ctx, css_rule *rule);
@@ -399,29 +109,30 @@ static inline void consumeWhitespace(const parserutils_vector *vector,
static inline bool tokenIsChar(const css_token *token, uint8_t c);
/**
- * Create a CSS 2.1 parser
+ * Create a CSS language parser
*
- * \param sheet The stylesheet object to parse for
- * \param parser The core parser object to use
- * \param alloc Memory (de)allocation function
- * \param pw Pointer to client-specific private data
- * \param css21 Pointer to location to receive parser object
+ * \param sheet The stylesheet object to parse for
+ * \param parser The core parser object to use
+ * \param alloc Memory (de)allocation function
+ * \param pw Pointer to client-specific private data
+ * \param language Pointer to location to receive parser object
* \return CSS_OK on success,
* CSS_BADPARM on bad parameters,
* CSS_NOMEM on memory exhaustion
*/
-css_error css_css21_create(css_stylesheet *sheet, css_parser *parser,
- css_alloc alloc, void *pw, void **css21)
+css_error css_language_create(css_stylesheet *sheet, css_parser *parser,
+ css_alloc alloc, void *pw, void **language)
{
- css_css21 *c;
+ css_language *c;
css_parser_optparams params;
parserutils_error perror;
css_error error;
- if (sheet == NULL || parser == NULL || alloc == NULL || css21 == NULL)
+ if (sheet == NULL || parser == NULL || alloc == NULL ||
+ language == NULL)
return CSS_BADPARM;
- c = alloc(NULL, sizeof(css_css21), pw);
+ c = alloc(NULL, sizeof(css_language), pw);
if (c == NULL)
return CSS_NOMEM;
@@ -445,7 +156,7 @@ css_error css_css21_create(css_stylesheet *sheet, css_parser *parser,
}
}
- params.event_handler.handler = css21_handle_event;
+ params.event_handler.handler = language_handle_event;
params.event_handler.pw = c;
error = css_parser_setopt(parser, CSS_PARSER_EVENT_HANDLER, &params);
if (error != CSS_OK) {
@@ -455,30 +166,29 @@ css_error css_css21_create(css_stylesheet *sheet, css_parser *parser,
}
c->sheet = sheet;
- c->parser = parser;
c->state = BEFORE_CHARSET;
c->alloc = alloc;
c->pw = pw;
- *css21 = c;
+ *language = c;
return CSS_OK;
}
/**
- * Destroy a CSS 2.1 parser
+ * Destroy a CSS language parser
*
- * \param css21 The parser to destroy
+ * \param language The parser to destroy
* \return CSS_OK on success, appropriate error otherwise
*/
-css_error css_css21_destroy(css_css21 *css21)
+css_error css_language_destroy(css_language *language)
{
- if (css21 == NULL)
+ if (language == NULL)
return CSS_BADPARM;
- parserutils_stack_destroy(css21->context);
+ parserutils_stack_destroy(language->context);
- css21->alloc(css21, 0, css21->pw);
+ language->alloc(language, 0, language->pw);
return CSS_OK;
}
@@ -492,32 +202,32 @@ css_error css_css21_destroy(css_css21 *css21)
* \return CSS_OK on success, CSS_INVALID to indicate parse error,
* appropriate error otherwise.
*/
-css_error css21_handle_event(css_parser_event type,
+css_error language_handle_event(css_parser_event type,
const parserutils_vector *tokens, void *pw)
{
- css_css21 *css21 = (css_css21 *) pw;
+ css_language *language = (css_language *) pw;
switch (type) {
case CSS_PARSER_START_STYLESHEET:
- return handleStartStylesheet(css21, tokens);
+ return handleStartStylesheet(language, tokens);
case CSS_PARSER_END_STYLESHEET:
- return handleEndStylesheet(css21, tokens);
+ return handleEndStylesheet(language, tokens);
case CSS_PARSER_START_RULESET:
- return handleStartRuleset(css21, tokens);
+ return handleStartRuleset(language, tokens);
case CSS_PARSER_END_RULESET:
- return handleEndRuleset(css21, tokens);
+ return handleEndRuleset(language, tokens);
case CSS_PARSER_START_ATRULE:
- return handleStartAtRule(css21, tokens);
+ return handleStartAtRule(language, tokens);
case CSS_PARSER_END_ATRULE:
- return handleEndAtRule(css21, tokens);
+ return handleEndAtRule(language, tokens);
case CSS_PARSER_START_BLOCK:
- return handleStartBlock(css21, tokens);
+ return handleStartBlock(language, tokens);
case CSS_PARSER_END_BLOCK:
- return handleEndBlock(css21, tokens);
+ return handleEndBlock(language, tokens);
case CSS_PARSER_BLOCK_CONTENT:
- return handleBlockContent(css21, tokens);
+ return handleBlockContent(language, tokens);
case CSS_PARSER_DECLARATION:
- return handleDeclaration(css21, tokens);
+ return handleDeclaration(language, tokens);
}
return CSS_OK;
@@ -527,7 +237,8 @@ css_error css21_handle_event(css_parser_event type,
* Parser stages *
******************************************************************************/
-css_error handleStartStylesheet(css_css21 *c, const parserutils_vector *vector)
+css_error handleStartStylesheet(css_language *c,
+ const parserutils_vector *vector)
{
parserutils_error perror;
context_entry entry = { CSS_PARSER_START_STYLESHEET, NULL };
@@ -544,7 +255,7 @@ css_error handleStartStylesheet(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleEndStylesheet(css_css21 *c, const parserutils_vector *vector)
+css_error handleEndStylesheet(css_language *c, const parserutils_vector *vector)
{
parserutils_error perror;
context_entry *entry;
@@ -565,7 +276,7 @@ css_error handleEndStylesheet(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleStartRuleset(css_css21 *c, const parserutils_vector *vector)
+css_error handleStartRuleset(css_language *c, const parserutils_vector *vector)
{
parserutils_error perror;
css_error error;
@@ -604,7 +315,7 @@ css_error handleStartRuleset(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleEndRuleset(css_css21 *c, const parserutils_vector *vector)
+css_error handleEndRuleset(css_language *c, const parserutils_vector *vector)
{
parserutils_error perror;
context_entry *entry;
@@ -625,7 +336,7 @@ css_error handleEndRuleset(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleStartAtRule(css_css21 *c, const parserutils_vector *vector)
+css_error handleStartAtRule(css_language *c, const parserutils_vector *vector)
{
parserutils_error perror;
context_entry entry = { CSS_PARSER_START_ATRULE, NULL };
@@ -708,7 +419,7 @@ css_error handleStartAtRule(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleEndAtRule(css_css21 *c, const parserutils_vector *vector)
+css_error handleEndAtRule(css_language *c, const parserutils_vector *vector)
{
parserutils_error perror;
context_entry *entry;
@@ -729,7 +440,7 @@ css_error handleEndAtRule(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleStartBlock(css_css21 *c, const parserutils_vector *vector)
+css_error handleStartBlock(css_language *c, const parserutils_vector *vector)
{
UNUSED(c);
UNUSED(vector);
@@ -740,7 +451,7 @@ css_error handleStartBlock(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleEndBlock(css_css21 *c, const parserutils_vector *vector)
+css_error handleEndBlock(css_language *c, const parserutils_vector *vector)
{
UNUSED(c);
UNUSED(vector);
@@ -751,7 +462,7 @@ css_error handleEndBlock(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleBlockContent(css_css21 *c, const parserutils_vector *vector)
+css_error handleBlockContent(css_language *c, const parserutils_vector *vector)
{
UNUSED(c);
UNUSED(vector);
@@ -765,7 +476,7 @@ css_error handleBlockContent(css_css21 *c, const parserutils_vector *vector)
return CSS_OK;
}
-css_error handleDeclaration(css_css21 *c, const parserutils_vector *vector)
+css_error handleDeclaration(css_language *c, const parserutils_vector *vector)
{
css_error error;
const css_token *token, *ident;
@@ -815,8 +526,8 @@ css_error handleDeclaration(css_css21 *c, const parserutils_vector *vector)
* Selector list parsing functions *
******************************************************************************/
-css_error parseClass(css_css21 *c, const parserutils_vector *vector, int *ctx,
- css_selector_detail **specific)
+css_error parseClass(css_language *c, const parserutils_vector *vector,
+ int *ctx, css_selector_detail **specific)
{
const css_token *token;
@@ -833,8 +544,8 @@ css_error parseClass(css_css21 *c, const parserutils_vector *vector, int *ctx,
CSS_SELECTOR_CLASS, &token->data, NULL, specific);
}
-css_error parseAttrib(css_css21 *c, const parserutils_vector *vector, int *ctx,
- css_selector_detail **specific)
+css_error parseAttrib(css_language *c, const parserutils_vector *vector,
+ int *ctx, css_selector_detail **specific)
{
const css_token *token, *name, *value = NULL;
css_selector_type type = CSS_SELECTOR_ATTRIBUTE;
@@ -892,8 +603,8 @@ css_error parseAttrib(css_css21 *c, const parserutils_vector *vector, int *ctx,
specific);
}
-css_error parsePseudo(css_css21 *c, const parserutils_vector *vector, int *ctx,
- css_selector_detail **specific)
+css_error parsePseudo(css_language *c, const parserutils_vector *vector,
+ int *ctx, css_selector_detail **specific)
{
const css_token *token, *name, *value = NULL;
@@ -932,7 +643,7 @@ css_error parsePseudo(css_css21 *c, const parserutils_vector *vector, int *ctx,
value != NULL ? &value->data : NULL, specific);
}
-css_error parseSpecific(css_css21 *c,
+css_error parseSpecific(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent)
{
@@ -979,7 +690,7 @@ css_error parseSpecific(css_css21 *c,
return CSS_OK;
}
-css_error parseSelectorSpecifics(css_css21 *c,
+css_error parseSelectorSpecifics(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **parent)
{
@@ -1000,7 +711,7 @@ css_error parseSelectorSpecifics(css_css21 *c,
return CSS_OK;
}
-css_error parseSimpleSelector(css_css21 *c,
+css_error parseSimpleSelector(css_language *c,
const parserutils_vector *vector, int *ctx,
css_selector **result)
{
@@ -1054,7 +765,7 @@ css_error parseSimpleSelector(css_css21 *c,
return CSS_OK;
}
-css_error parseCombinator(css_css21 *c, const parserutils_vector *vector,
+css_error parseCombinator(css_language *c, const parserutils_vector *vector,
int *ctx, css_combinator *result)
{
const css_token *token;
@@ -1093,7 +804,7 @@ css_error parseCombinator(css_css21 *c, const parserutils_vector *vector,
return CSS_OK;
}
-css_error parseSelector(css_css21 *c, const parserutils_vector *vector,
+css_error parseSelector(css_language *c, const parserutils_vector *vector,
int *ctx, css_selector **result)
{
css_error error;
@@ -1152,7 +863,7 @@ css_error parseSelector(css_css21 *c, const parserutils_vector *vector,
return CSS_OK;
}
-css_error parseSelectorList(css_css21 *c, const parserutils_vector *vector,
+css_error parseSelectorList(css_language *c, const parserutils_vector *vector,
css_rule *rule)
{
css_error error;
@@ -1212,9 +923,9 @@ css_error parseSelectorList(css_css21 *c, const parserutils_vector *vector,
* Property parsing functions *
******************************************************************************/
-#include "css21props.c"
+#include "parse/properties.c"
-css_error parseProperty(css_css21 *c, const css_token *property,
+css_error parseProperty(css_language *c, const css_token *property,
const parserutils_vector *vector, int *ctx, css_rule *rule)
{
css_error error;
diff --git a/src/parse/css21.h b/src/parse/language.h
index 8951308..00317c6 100644
--- a/src/parse/css21.h
+++ b/src/parse/language.h
@@ -5,8 +5,8 @@
* Copyright 2008 John-Mark Bell <jmb@netsurf-browser.org>
*/
-#ifndef css_parse_css21_h_
-#define css_parse_css21_h_
+#ifndef css_parse_language_h_
+#define css_parse_language_h_
#include <parserutils/utils/vector.h>
@@ -15,11 +15,11 @@
#include "parse/parse.h"
-typedef struct css_css21 css_css21;
+typedef struct css_language css_language;
-css_error css_css21_create(css_stylesheet *sheet, css_parser *parser,
- css_alloc alloc, void *pw, void **css21);
-css_error css_css21_destroy(css_css21 *css21);
+css_error css_language_create(css_stylesheet *sheet, css_parser *parser,
+ css_alloc alloc, void *pw, void **language);
+css_error css_language_destroy(css_language *language);
#endif
diff --git a/src/parse/css21props.c b/src/parse/properties.c
index 43b0710..aceb720 100644
--- a/src/parse/css21props.c
+++ b/src/parse/properties.c
@@ -11,334 +11,334 @@
#include "bytecode/bytecode.h"
#include "bytecode/opcodes.h"
-static css_error parse_azimuth(css_css21 *c,
+static css_error parse_azimuth(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_background_attachment(css_css21 *c,
+static css_error parse_background_attachment(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_background_color(css_css21 *c,
+static css_error parse_background_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_background_image(css_css21 *c,
+static css_error parse_background_image(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_background_position(css_css21 *c,
+static css_error parse_background_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_background_repeat(css_css21 *c,
+static css_error parse_background_repeat(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_bottom_color(css_css21 *c,
+static css_error parse_border_bottom_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_bottom_style(css_css21 *c,
+static css_error parse_border_bottom_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_bottom_width(css_css21 *c,
+static css_error parse_border_bottom_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_collapse(css_css21 *c,
+static css_error parse_border_collapse(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_left_color(css_css21 *c,
+static css_error parse_border_left_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_left_style(css_css21 *c,
+static css_error parse_border_left_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_left_width(css_css21 *c,
+static css_error parse_border_left_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_right_color(css_css21 *c,
+static css_error parse_border_right_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_right_style(css_css21 *c,
+static css_error parse_border_right_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_right_width(css_css21 *c,
+static css_error parse_border_right_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_spacing(css_css21 *c,
+static css_error parse_border_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_top_color(css_css21 *c,
+static css_error parse_border_top_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_top_style(css_css21 *c,
+static css_error parse_border_top_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_border_top_width(css_css21 *c,
+static css_error parse_border_top_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_bottom(css_css21 *c,
+static css_error parse_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_caption_side(css_css21 *c,
+static css_error parse_caption_side(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_clear(css_css21 *c,
+static css_error parse_clear(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_clip(css_css21 *c,
+static css_error parse_clip(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_color(css_css21 *c,
+static css_error parse_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_content(css_css21 *c,
+static css_error parse_content(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_counter_increment(css_css21 *c,
+static css_error parse_counter_increment(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_counter_reset(css_css21 *c,
+static css_error parse_counter_reset(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_cue_after(css_css21 *c,
+static css_error parse_cue_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_cue_before(css_css21 *c,
+static css_error parse_cue_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_cursor(css_css21 *c,
+static css_error parse_cursor(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_direction(css_css21 *c,
+static css_error parse_direction(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_display(css_css21 *c,
+static css_error parse_display(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_elevation(css_css21 *c,
+static css_error parse_elevation(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_empty_cells(css_css21 *c,
+static css_error parse_empty_cells(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_float(css_css21 *c,
+static css_error parse_float(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_font_family(css_css21 *c,
+static css_error parse_font_family(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_font_size(css_css21 *c,
+static css_error parse_font_size(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_font_style(css_css21 *c,
+static css_error parse_font_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_font_variant(css_css21 *c,
+static css_error parse_font_variant(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_font_weight(css_css21 *c,
+static css_error parse_font_weight(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_height(css_css21 *c,
+static css_error parse_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_left(css_css21 *c,
+static css_error parse_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_letter_spacing(css_css21 *c,
+static css_error parse_letter_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_line_height(css_css21 *c,
+static css_error parse_line_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_list_style_image(css_css21 *c,
+static css_error parse_list_style_image(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_list_style_position(css_css21 *c,
+static css_error parse_list_style_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_list_style_type(css_css21 *c,
+static css_error parse_list_style_type(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_margin_bottom(css_css21 *c,
+static css_error parse_margin_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_margin_left(css_css21 *c,
+static css_error parse_margin_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_margin_right(css_css21 *c,
+static css_error parse_margin_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_margin_top(css_css21 *c,
+static css_error parse_margin_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_max_height(css_css21 *c,
+static css_error parse_max_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_max_width(css_css21 *c,
+static css_error parse_max_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_min_height(css_css21 *c,
+static css_error parse_min_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_min_width(css_css21 *c,
+static css_error parse_min_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_orphans(css_css21 *c,
+static css_error parse_orphans(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_outline_color(css_css21 *c,
+static css_error parse_outline_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_outline_style(css_css21 *c,
+static css_error parse_outline_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_outline_width(css_css21 *c,
+static css_error parse_outline_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_overflow(css_css21 *c,
+static css_error parse_overflow(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_padding_bottom(css_css21 *c,
+static css_error parse_padding_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_padding_left(css_css21 *c,
+static css_error parse_padding_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_padding_right(css_css21 *c,
+static css_error parse_padding_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_padding_top(css_css21 *c,
+static css_error parse_padding_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_page_break_after(css_css21 *c,
+static css_error parse_page_break_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_page_break_before(css_css21 *c,
+static css_error parse_page_break_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_page_break_inside(css_css21 *c,
+static css_error parse_page_break_inside(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_pause_after(css_css21 *c,
+static css_error parse_pause_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_pause_before(css_css21 *c,
+static css_error parse_pause_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_pitch_range(css_css21 *c,
+static css_error parse_pitch_range(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_pitch(css_css21 *c,
+static css_error parse_pitch(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_play_during(css_css21 *c,
+static css_error parse_play_during(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_position(css_css21 *c,
+static css_error parse_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_quotes(css_css21 *c,
+static css_error parse_quotes(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_richness(css_css21 *c,
+static css_error parse_richness(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_right(css_css21 *c,
+static css_error parse_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_speak_header(css_css21 *c,
+static css_error parse_speak_header(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_speak_numeral(css_css21 *c,
+static css_error parse_speak_numeral(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_speak_punctuation(css_css21 *c,
+static css_error parse_speak_punctuation(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_speak(css_css21 *c,
+static css_error parse_speak(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_speech_rate(css_css21 *c,
+static css_error parse_speech_rate(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_stress(css_css21 *c,
+static css_error parse_stress(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_table_layout(css_css21 *c,
+static css_error parse_table_layout(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_text_align(css_css21 *c,
+static css_error parse_text_align(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_text_decoration(css_css21 *c,
+static css_error parse_text_decoration(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_text_indent(css_css21 *c,
+static css_error parse_text_indent(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_text_transform(css_css21 *c,
+static css_error parse_text_transform(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_top(css_css21 *c,
+static css_error parse_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_unicode_bidi(css_css21 *c,
+static css_error parse_unicode_bidi(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_vertical_align(css_css21 *c,
+static css_error parse_vertical_align(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_visibility(css_css21 *c,
+static css_error parse_visibility(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_voice_family(css_css21 *c,
+static css_error parse_voice_family(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_volume(css_css21 *c,
+static css_error parse_volume(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_white_space(css_css21 *c,
+static css_error parse_white_space(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_widows(css_css21 *c,
+static css_error parse_widows(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_width(css_css21 *c,
+static css_error parse_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_word_spacing(css_css21 *c,
+static css_error parse_word_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static css_error parse_z_index(css_css21 *c,
+static css_error parse_z_index(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
-static inline css_error parse_important(css_css21 *c,
+static inline css_error parse_important(css_language *c,
const parserutils_vector *vector, int *ctx,
uint8_t *result);
-static inline css_error parse_colour_specifier(css_css21 *c,
+static inline css_error parse_colour_specifier(css_language *c,
const parserutils_vector *vector, int *ctx,
uint32_t *result);
-static inline css_error parse_unit_specifier(css_css21 *c,
+static inline css_error parse_unit_specifier(css_language *c,
const parserutils_vector *vector, int *ctx,
fixed *length, uint32_t *unit);
-static inline css_error parse_border_side_color(css_css21 *c,
+static inline css_error parse_border_side_color(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result);
-static inline css_error parse_border_side_style(css_css21 *c,
+static inline css_error parse_border_side_style(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result);
-static inline css_error parse_border_side_width(css_css21 *c,
+static inline css_error parse_border_side_width(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result);
-static inline css_error parse_margin_side(css_css21 *c,
+static inline css_error parse_margin_side(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result);
-static inline css_error parse_padding_side(css_css21 *c,
+static inline css_error parse_padding_side(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result);
/**
* Type of property handler function
*/
-typedef css_error (*css_prop_handler)(css_css21 *c,
+typedef css_error (*css_prop_handler)(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result);
@@ -448,7 +448,7 @@ static const css_prop_handler property_handlers[LAST_PROP + 1 - FIRST_PROP] =
parse_z_index,
};
-css_error parse_azimuth(css_css21 *c,
+css_error parse_azimuth(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -461,7 +461,7 @@ css_error parse_azimuth(css_css21 *c,
return CSS_OK;
}
-css_error parse_background_attachment(css_css21 *c,
+css_error parse_background_attachment(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -502,7 +502,7 @@ css_error parse_background_attachment(css_css21 *c,
return CSS_OK;
}
-css_error parse_background_color(css_css21 *c,
+css_error parse_background_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -560,7 +560,7 @@ css_error parse_background_color(css_css21 *c,
return CSS_OK;
}
-css_error parse_background_image(css_css21 *c,
+css_error parse_background_image(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -616,7 +616,7 @@ css_error parse_background_image(css_css21 *c,
return CSS_OK;
}
-css_error parse_background_position(css_css21 *c,
+css_error parse_background_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -629,7 +629,7 @@ css_error parse_background_position(css_css21 *c,
return CSS_OK;
}
-css_error parse_background_repeat(css_css21 *c,
+css_error parse_background_repeat(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -674,28 +674,28 @@ css_error parse_background_repeat(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_bottom_color(css_css21 *c,
+css_error parse_border_bottom_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_color(c, vector, ctx, SIDE_BOTTOM, result);
}
-css_error parse_border_bottom_style(css_css21 *c,
+css_error parse_border_bottom_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_style(c, vector, ctx, SIDE_BOTTOM, result);
}
-css_error parse_border_bottom_width(css_css21 *c,
+css_error parse_border_bottom_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_width(c, vector, ctx, SIDE_BOTTOM, result);
}
-css_error parse_border_collapse(css_css21 *c,
+css_error parse_border_collapse(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -736,49 +736,49 @@ css_error parse_border_collapse(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_left_color(css_css21 *c,
+css_error parse_border_left_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_color(c, vector, ctx, SIDE_LEFT, result);
}
-css_error parse_border_left_style(css_css21 *c,
+css_error parse_border_left_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_style(c, vector, ctx, SIDE_LEFT, result);
}
-css_error parse_border_left_width(css_css21 *c,
+css_error parse_border_left_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_width(c, vector, ctx, SIDE_LEFT, result);
}
-css_error parse_border_right_color(css_css21 *c,
+css_error parse_border_right_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_color(c, vector, ctx, SIDE_RIGHT, result);
}
-css_error parse_border_right_style(css_css21 *c,
+css_error parse_border_right_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_style(c, vector, ctx, SIDE_RIGHT, result);
}
-css_error parse_border_right_width(css_css21 *c,
+css_error parse_border_right_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_width(c, vector, ctx, SIDE_RIGHT, result);
}
-css_error parse_border_spacing(css_css21 *c,
+css_error parse_border_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -791,28 +791,28 @@ css_error parse_border_spacing(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_top_color(css_css21 *c,
+css_error parse_border_top_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_color(c, vector, ctx, SIDE_TOP, result);
}
-css_error parse_border_top_style(css_css21 *c,
+css_error parse_border_top_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_style(c, vector, ctx, SIDE_TOP, result);
}
-css_error parse_border_top_width(css_css21 *c,
+css_error parse_border_top_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_border_side_width(c, vector, ctx, SIDE_TOP, result);
}
-css_error parse_bottom(css_css21 *c,
+css_error parse_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -876,7 +876,7 @@ css_error parse_bottom(css_css21 *c,
return CSS_OK;
}
-css_error parse_caption_side(css_css21 *c,
+css_error parse_caption_side(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -917,7 +917,7 @@ css_error parse_caption_side(css_css21 *c,
return CSS_OK;
}
-css_error parse_clear(css_css21 *c,
+css_error parse_clear(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -962,7 +962,7 @@ css_error parse_clear(css_css21 *c,
return CSS_OK;
}
-css_error parse_clip(css_css21 *c,
+css_error parse_clip(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -975,7 +975,7 @@ css_error parse_clip(css_css21 *c,
return CSS_OK;
}
-css_error parse_color(css_css21 *c,
+css_error parse_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1029,7 +1029,7 @@ css_error parse_color(css_css21 *c,
return CSS_OK;
}
-css_error parse_content(css_css21 *c,
+css_error parse_content(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1042,7 +1042,7 @@ css_error parse_content(css_css21 *c,
return CSS_OK;
}
-css_error parse_counter_increment(css_css21 *c,
+css_error parse_counter_increment(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1055,7 +1055,7 @@ css_error parse_counter_increment(css_css21 *c,
return CSS_OK;
}
-css_error parse_counter_reset(css_css21 *c,
+css_error parse_counter_reset(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1068,7 +1068,7 @@ css_error parse_counter_reset(css_css21 *c,
return CSS_OK;
}
-css_error parse_cue_after(css_css21 *c,
+css_error parse_cue_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1124,7 +1124,7 @@ css_error parse_cue_after(css_css21 *c,
return CSS_OK;
}
-css_error parse_cue_before(css_css21 *c,
+css_error parse_cue_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1180,7 +1180,7 @@ css_error parse_cue_before(css_css21 *c,
return CSS_OK;
}
-css_error parse_cursor(css_css21 *c,
+css_error parse_cursor(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1193,7 +1193,7 @@ css_error parse_cursor(css_css21 *c,
return CSS_OK;
}
-css_error parse_direction(css_css21 *c,
+css_error parse_direction(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1234,7 +1234,7 @@ css_error parse_direction(css_css21 *c,
return CSS_OK;
}
-css_error parse_display(css_css21 *c,
+css_error parse_display(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1306,7 +1306,7 @@ css_error parse_display(css_css21 *c,
return CSS_OK;
}
-css_error parse_elevation(css_css21 *c,
+css_error parse_elevation(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1386,7 +1386,7 @@ css_error parse_elevation(css_css21 *c,
return CSS_OK;
}
-css_error parse_empty_cells(css_css21 *c,
+css_error parse_empty_cells(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1427,7 +1427,7 @@ css_error parse_empty_cells(css_css21 *c,
return CSS_OK;
}
-css_error parse_float(css_css21 *c,
+css_error parse_float(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1470,7 +1470,7 @@ css_error parse_float(css_css21 *c,
return CSS_OK;
}
-css_error parse_font_family(css_css21 *c,
+css_error parse_font_family(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1484,7 +1484,7 @@ css_error parse_font_family(css_css21 *c,
return CSS_OK;
}
-css_error parse_font_size(css_css21 *c,
+css_error parse_font_size(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1581,7 +1581,7 @@ css_error parse_font_size(css_css21 *c,
return CSS_OK;
}
-css_error parse_font_style(css_css21 *c,
+css_error parse_font_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1624,7 +1624,7 @@ css_error parse_font_style(css_css21 *c,
return CSS_OK;
}
-css_error parse_font_variant(css_css21 *c,
+css_error parse_font_variant(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1665,7 +1665,7 @@ css_error parse_font_variant(css_css21 *c,
return CSS_OK;
}
-css_error parse_font_weight(css_css21 *c,
+css_error parse_font_weight(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1731,7 +1731,7 @@ css_error parse_font_weight(css_css21 *c,
return CSS_OK;
}
-css_error parse_height(css_css21 *c,
+css_error parse_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1795,7 +1795,7 @@ css_error parse_height(css_css21 *c,
return CSS_OK;
}
-css_error parse_left(css_css21 *c,
+css_error parse_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1859,7 +1859,7 @@ css_error parse_left(css_css21 *c,
return CSS_OK;
}
-css_error parse_letter_spacing(css_css21 *c,
+css_error parse_letter_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1924,7 +1924,7 @@ css_error parse_letter_spacing(css_css21 *c,
return CSS_OK;
}
-css_error parse_line_height(css_css21 *c,
+css_error parse_line_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -1999,7 +1999,7 @@ css_error parse_line_height(css_css21 *c,
return CSS_OK;
}
-css_error parse_list_style_image(css_css21 *c,
+css_error parse_list_style_image(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2055,7 +2055,7 @@ css_error parse_list_style_image(css_css21 *c,
return CSS_OK;
}
-css_error parse_list_style_position(css_css21 *c,
+css_error parse_list_style_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2096,7 +2096,7 @@ css_error parse_list_style_position(css_css21 *c,
return CSS_OK;
}
-css_error parse_list_style_type(css_css21 *c,
+css_error parse_list_style_type(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2167,35 +2167,35 @@ css_error parse_list_style_type(css_css21 *c,
return CSS_OK;
}
-css_error parse_margin_bottom(css_css21 *c,
+css_error parse_margin_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_margin_side(c, vector, ctx, SIDE_BOTTOM, result);
}
-css_error parse_margin_left(css_css21 *c,
+css_error parse_margin_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_margin_side(c, vector, ctx, SIDE_LEFT, result);
}
-css_error parse_margin_right(css_css21 *c,
+css_error parse_margin_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_margin_side(c, vector, ctx, SIDE_RIGHT, result);
}
-css_error parse_margin_top(css_css21 *c,
+css_error parse_margin_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_margin_side(c, vector, ctx, SIDE_TOP, result);
}
-css_error parse_max_height(css_css21 *c,
+css_error parse_max_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2259,7 +2259,7 @@ css_error parse_max_height(css_css21 *c,
return CSS_OK;
}
-css_error parse_max_width(css_css21 *c,
+css_error parse_max_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2323,7 +2323,7 @@ css_error parse_max_width(css_css21 *c,
return CSS_OK;
}
-css_error parse_min_height(css_css21 *c,
+css_error parse_min_height(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2383,7 +2383,7 @@ css_error parse_min_height(css_css21 *c,
return CSS_OK;
}
-css_error parse_min_width(css_css21 *c,
+css_error parse_min_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2443,7 +2443,7 @@ css_error parse_min_width(css_css21 *c,
return CSS_OK;
}
-css_error parse_orphans(css_css21 *c,
+css_error parse_orphans(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2500,7 +2500,7 @@ css_error parse_orphans(css_css21 *c,
return CSS_OK;
}
-css_error parse_outline_color(css_css21 *c,
+css_error parse_outline_color(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2558,7 +2558,7 @@ css_error parse_outline_color(css_css21 *c,
return CSS_OK;
}
-css_error parse_outline_style(css_css21 *c,
+css_error parse_outline_style(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2585,7 +2585,7 @@ css_error parse_outline_style(css_css21 *c,
return CSS_OK;
}
-css_error parse_outline_width(css_css21 *c,
+css_error parse_outline_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2612,7 +2612,7 @@ css_error parse_outline_width(css_css21 *c,
return CSS_OK;
}
-css_error parse_overflow(css_css21 *c,
+css_error parse_overflow(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2657,35 +2657,35 @@ css_error parse_overflow(css_css21 *c,
return CSS_OK;
}
-css_error parse_padding_bottom(css_css21 *c,
+css_error parse_padding_bottom(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_padding_side(c, vector, ctx, SIDE_BOTTOM, result);
}
-css_error parse_padding_left(css_css21 *c,
+css_error parse_padding_left(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_padding_side(c, vector, ctx, SIDE_LEFT, result);
}
-css_error parse_padding_right(css_css21 *c,
+css_error parse_padding_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_padding_side(c, vector, ctx, SIDE_RIGHT, result);
}
-css_error parse_padding_top(css_css21 *c,
+css_error parse_padding_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
return parse_padding_side(c, vector, ctx, SIDE_TOP, result);
}
-css_error parse_page_break_after(css_css21 *c,
+css_error parse_page_break_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2732,7 +2732,7 @@ css_error parse_page_break_after(css_css21 *c,
return CSS_OK;
}
-css_error parse_page_break_before(css_css21 *c,
+css_error parse_page_break_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2779,7 +2779,7 @@ css_error parse_page_break_before(css_css21 *c,
return CSS_OK;
}
-css_error parse_page_break_inside(css_css21 *c,
+css_error parse_page_break_inside(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2820,7 +2820,7 @@ css_error parse_page_break_inside(css_css21 *c,
return CSS_OK;
}
-css_error parse_pause_after(css_css21 *c,
+css_error parse_pause_after(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2880,7 +2880,7 @@ css_error parse_pause_after(css_css21 *c,
return CSS_OK;
}
-css_error parse_pause_before(css_css21 *c,
+css_error parse_pause_before(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2940,7 +2940,7 @@ css_error parse_pause_before(css_css21 *c,
return CSS_OK;
}
-css_error parse_pitch_range(css_css21 *c,
+css_error parse_pitch_range(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -2996,7 +2996,7 @@ css_error parse_pitch_range(css_css21 *c,
return CSS_OK;
}
-css_error parse_pitch(css_css21 *c,
+css_error parse_pitch(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3071,7 +3071,7 @@ css_error parse_pitch(css_css21 *c,
return CSS_OK;
}
-css_error parse_play_during(css_css21 *c,
+css_error parse_play_during(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3085,7 +3085,7 @@ css_error parse_play_during(css_css21 *c,
return CSS_OK;
}
-css_error parse_position(css_css21 *c,
+css_error parse_position(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3130,7 +3130,7 @@ css_error parse_position(css_css21 *c,
return CSS_OK;
}
-css_error parse_quotes(css_css21 *c,
+css_error parse_quotes(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3144,7 +3144,7 @@ css_error parse_quotes(css_css21 *c,
return CSS_OK;
}
-css_error parse_richness(css_css21 *c,
+css_error parse_richness(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3200,7 +3200,7 @@ css_error parse_richness(css_css21 *c,
return CSS_OK;
}
-css_error parse_right(css_css21 *c,
+css_error parse_right(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3264,7 +3264,7 @@ css_error parse_right(css_css21 *c,
return CSS_OK;
}
-css_error parse_speak_header(css_css21 *c,
+css_error parse_speak_header(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3305,7 +3305,7 @@ css_error parse_speak_header(css_css21 *c,
return CSS_OK;
}
-css_error parse_speak_numeral(css_css21 *c,
+css_error parse_speak_numeral(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3346,7 +3346,7 @@ css_error parse_speak_numeral(css_css21 *c,
return CSS_OK;
}
-css_error parse_speak_punctuation(css_css21 *c,
+css_error parse_speak_punctuation(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3387,7 +3387,7 @@ css_error parse_speak_punctuation(css_css21 *c,
return CSS_OK;
}
-css_error parse_speak(css_css21 *c,
+css_error parse_speak(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3430,7 +3430,7 @@ css_error parse_speak(css_css21 *c,
return CSS_OK;
}
-css_error parse_speech_rate(css_css21 *c,
+css_error parse_speech_rate(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3510,7 +3510,7 @@ css_error parse_speech_rate(css_css21 *c,
return CSS_OK;
}
-css_error parse_stress(css_css21 *c,
+css_error parse_stress(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3566,7 +3566,7 @@ css_error parse_stress(css_css21 *c,
return CSS_OK;
}
-css_error parse_table_layout(css_css21 *c,
+css_error parse_table_layout(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3607,7 +3607,7 @@ css_error parse_table_layout(css_css21 *c,
return CSS_OK;
}
-css_error parse_text_align(css_css21 *c,
+css_error parse_text_align(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3652,7 +3652,7 @@ css_error parse_text_align(css_css21 *c,
return CSS_OK;
}
-css_error parse_text_decoration(css_css21 *c,
+css_error parse_text_decoration(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3666,7 +3666,7 @@ css_error parse_text_decoration(css_css21 *c,
return CSS_OK;
}
-css_error parse_text_indent(css_css21 *c,
+css_error parse_text_indent(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3726,7 +3726,7 @@ css_error parse_text_indent(css_css21 *c,
return CSS_OK;
}
-css_error parse_text_transform(css_css21 *c,
+css_error parse_text_transform(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3771,7 +3771,7 @@ css_error parse_text_transform(css_css21 *c,
return CSS_OK;
}
-css_error parse_top(css_css21 *c,
+css_error parse_top(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3835,7 +3835,7 @@ css_error parse_top(css_css21 *c,
return CSS_OK;
}
-css_error parse_unicode_bidi(css_css21 *c,
+css_error parse_unicode_bidi(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3878,7 +3878,7 @@ css_error parse_unicode_bidi(css_css21 *c,
return CSS_OK;
}
-css_error parse_vertical_align(css_css21 *c,
+css_error parse_vertical_align(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -3972,7 +3972,7 @@ css_error parse_vertical_align(css_css21 *c,
return CSS_OK;
}
-css_error parse_visibility(css_css21 *c,
+css_error parse_visibility(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4015,7 +4015,7 @@ css_error parse_visibility(css_css21 *c,
return CSS_OK;
}
-css_error parse_voice_family(css_css21 *c,
+css_error parse_voice_family(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4029,7 +4029,7 @@ css_error parse_voice_family(css_css21 *c,
return CSS_OK;
}
-css_error parse_volume(css_css21 *c,
+css_error parse_volume(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4125,7 +4125,7 @@ css_error parse_volume(css_css21 *c,
return CSS_OK;
}
-css_error parse_white_space(css_css21 *c,
+css_error parse_white_space(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4172,7 +4172,7 @@ css_error parse_white_space(css_css21 *c,
return CSS_OK;
}
-css_error parse_widows(css_css21 *c,
+css_error parse_widows(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4229,7 +4229,7 @@ css_error parse_widows(css_css21 *c,
return CSS_OK;
}
-css_error parse_width(css_css21 *c,
+css_error parse_width(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4293,7 +4293,7 @@ css_error parse_width(css_css21 *c,
return CSS_OK;
}
-css_error parse_word_spacing(css_css21 *c,
+css_error parse_word_spacing(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4358,7 +4358,7 @@ css_error parse_word_spacing(css_css21 *c,
return CSS_OK;
}
-css_error parse_z_index(css_css21 *c,
+css_error parse_z_index(css_language *c,
const parserutils_vector *vector, int *ctx,
css_style **result)
{
@@ -4419,7 +4419,7 @@ css_error parse_z_index(css_css21 *c,
return CSS_OK;
}
-css_error parse_important(css_css21 *c,
+css_error parse_important(css_language *c,
const parserutils_vector *vector, int *ctx,
uint8_t *result)
{
@@ -4443,7 +4443,7 @@ css_error parse_important(css_css21 *c,
return CSS_OK;
}
-css_error parse_colour_specifier(css_css21 *c,
+css_error parse_colour_specifier(css_language *c,
const parserutils_vector *vector, int *ctx,
uint32_t *result)
{
@@ -4463,7 +4463,7 @@ css_error parse_colour_specifier(css_css21 *c,
return CSS_OK;
}
-css_error parse_unit_specifier(css_css21 *c,
+css_error parse_unit_specifier(css_language *c,
const parserutils_vector *vector, int *ctx,
fixed *length, uint32_t *unit)
{
@@ -4484,7 +4484,7 @@ css_error parse_unit_specifier(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_side_color(css_css21 *c,
+css_error parse_border_side_color(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result)
{
@@ -4542,7 +4542,7 @@ css_error parse_border_side_color(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_side_style(css_css21 *c,
+css_error parse_border_side_style(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result)
{
@@ -4600,7 +4600,7 @@ css_error parse_border_side_style(css_css21 *c,
return CSS_OK;
}
-css_error parse_border_side_width(css_css21 *c,
+css_error parse_border_side_width(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result)
{
@@ -4673,7 +4673,7 @@ css_error parse_border_side_width(css_css21 *c,
return CSS_OK;
}
-css_error parse_margin_side(css_css21 *c,
+css_error parse_margin_side(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result)
{
@@ -4737,7 +4737,7 @@ css_error parse_margin_side(css_css21 *c,
return CSS_OK;
}
-css_error parse_padding_side(css_css21 *c,
+css_error parse_padding_side(css_language *c,
const parserutils_vector *vector, int *ctx,
uint16_t side, css_style **result)
{
diff --git a/src/parse/propstrings.h b/src/parse/propstrings.h
new file mode 100644
index 0000000..4050840
--- /dev/null
+++ b/src/parse/propstrings.h
@@ -0,0 +1,305 @@
+/*
+ * This file is part of LibCSS.
+ * Licensed under the MIT License,
+ * http://www.opensource.org/licenses/mit-license.php
+ * Copyright 2008 John-Mark Bell <jmb@netsurf-browser.org>
+ */
+
+#ifndef css_parse_propstrings_h_
+#define css_parse_propstrings_h_
+
+#include "utils/utils.h"
+
+enum {
+ /* At-rules */
+ CHARSET, IMPORT, MEDIA, PAGE,
+
+ /* Properties */
+ FIRST_PROP,
+
+ AZIMUTH = FIRST_PROP, BACKGROUND_ATTACHMENT, BACKGROUND_COLOR,
+ BACKGROUND_IMAGE, BACKGROUND_POSITION, BACKGROUND_REPEAT,
+ BORDER_BOTTOM_COLOR, BORDER_BOTTOM_STYLE, BORDER_BOTTOM_WIDTH,
+ BORDER_COLLAPSE, BORDER_LEFT_COLOR, BORDER_LEFT_STYLE,
+ BORDER_LEFT_WIDTH, BORDER_RIGHT_COLOR, BORDER_RIGHT_STYLE,
+ BORDER_RIGHT_WIDTH, BORDER_SPACING, BORDER_TOP_COLOR, BORDER_TOP_STYLE,
+ BORDER_TOP_WIDTH, BOTTOM, CAPTION_SIDE, CLEAR, CLIP, COLOR, CONTENT,
+ COUNTER_INCREMENT, COUNTER_RESET, CUE_AFTER, CUE_BEFORE, CURSOR,
+ DIRECTION, DISPLAY, ELEVATION, EMPTY_CELLS, FLOAT, FONT_FAMILY,
+ FONT_SIZE, FONT_STYLE, FONT_VARIANT, FONT_WEIGHT, HEIGHT, LEFT,
+ LETTER_SPACING, LINE_HEIGHT, LIST_STYLE_IMAGE, LIST_STYLE_POSITION,
+ LIST_STYLE_TYPE, MARGIN_BOTTOM, MARGIN_LEFT, MARGIN_RIGHT, MARGIN_TOP,
+ MAX_HEIGHT, MAX_WIDTH, MIN_HEIGHT, MIN_WIDTH, ORPHANS, OUTLINE_COLOR,
+ OUTLINE_STYLE, OUTLINE_WIDTH, OVERFLOW, PADDING_BOTTOM, PADDING_LEFT,
+ PADDING_RIGHT, PADDING_TOP, PAGE_BREAK_AFTER, PAGE_BREAK_BEFORE,
+ PAGE_BREAK_INSIDE, PAUSE_AFTER, PAUSE_BEFORE, PITCH_RANGE, PITCH,
+ PLAY_DURING, POSITION, QUOTES, RICHNESS, RIGHT, SPEAK_HEADER,
+ SPEAK_NUMERAL, SPEAK_PUNCTUATION, SPEAK, SPEECH_RATE, STRESS,
+ TABLE_LAYOUT, TEXT_ALIGN, TEXT_DECORATION, TEXT_INDENT, TEXT_TRANSFORM,
+ TOP, UNICODE_BIDI, VERTICAL_ALIGN, VISIBILITY, VOICE_FAMILY, VOLUME,
+ WHITE_SPACE, WIDOWS, WIDTH, WORD_SPACING, Z_INDEX,
+
+ LAST_PROP = Z_INDEX,
+
+ /* Other keywords */
+ INHERIT, IMPORTANT, NONE, BOTH, FIXED, SCROLL, TRANSPARENT,
+ NO_REPEAT, REPEAT_X, REPEAT_Y, REPEAT, HIDDEN, DOTTED, DASHED,
+ SOLID, DOUBLE, GROOVE, RIDGE, INSET, OUTSET, THIN, MEDIUM, THICK,
+ COLLAPSE, SEPARATE, AUTO, LTR, RTL, INLINE, BLOCK, LIST_ITEM, RUN_IN,
+ INLINE_BLOCK, TABLE, INLINE_TABLE, TABLE_ROW_GROUP, TABLE_HEADER_GROUP,
+ TABLE_FOOTER_GROUP, TABLE_ROW, TABLE_COLUMN_GROUP, TABLE_COLUMN,
+ TABLE_CELL, TABLE_CAPTION, BELOW, LEVEL, ABOVE, HIGHER, LOWER,
+ SHOW, HIDE, XX_SMALL, X_SMALL, SMALL, LARGE, X_LARGE, XX_LARGE,
+ LARGER, SMALLER, NORMAL, ITALIC, OBLIQUE, SMALL_CAPS, BOLD, BOLDER,
+ LIGHTER, INSIDE, OUTSIDE, DISC, CIRCLE, SQUARE, DECIMAL,
+ DECIMAL_LEADING_ZERO, LOWER_ROMAN, UPPER_ROMAN, LOWER_GREEK,
+ LOWER_LATIN, UPPER_LATIN, ARMENIAN, GEORGIAN, LOWER_ALPHA, UPPER_ALPHA,
+ INVERT, VISIBLE, ALWAYS, AVOID, X_LOW, LOW, HIGH, X_HIGH, STATIC,
+ RELATIVE, ABSOLUTE, ONCE, DIGITS, CONTINUOUS, CODE, SPELL_OUT, X_SLOW,
+ SLOW, FAST, X_FAST, FASTER, SLOWER, CENTER, JUSTIFY, CAPITALIZE,
+ UPPERCASE, LOWERCASE, EMBED, BIDI_OVERRIDE, BASELINE, SUB, SUPER,
+ TEXT_TOP, MIDDLE, TEXT_BOTTOM, SILENT, X_SOFT, SOFT, LOUD, X_LOUD,
+ PRE, NOWRAP, PRE_WRAP, PRE_LINE,
+
+ LAST_KNOWN
+};
+
+/* Must be synchronised with above enum */
+static struct {
+ const char *data;
+ size_t len;
+} stringmap[LAST_KNOWN] = {
+ { "charset", SLEN("charset") },
+ { "import", SLEN("import") },
+ { "media", SLEN("media") },
+ { "page", SLEN("page") },
+
+ { "azimuth", SLEN("azimuth") },
+ { "background-attachment", SLEN("background-attachment") },
+ { "background-color", SLEN("background-color") },
+ { "background-image", SLEN("background-image") },
+ { "background-position", SLEN("background-position") },
+ { "background-repeat", SLEN("background-repeat") },
+ { "border-bottom-color", SLEN("border-bottom-color") },
+ { "border-bottom-style", SLEN("border-bottom-style") },
+ { "border-bottom-width", SLEN("border-bottom-width") },
+ { "border-collapse", SLEN("border-collapse") },
+ { "border-left-color", SLEN("border-left-color") },
+ { "border-left-style", SLEN("border-left-style") },
+ { "border-left-width", SLEN("border-left-width") },
+ { "border-right-color", SLEN("border-right-color") },
+ { "border-right-style", SLEN("border-right-style") },
+ { "border-right-width", SLEN("border-right-width") },
+ { "border-spacing", SLEN("border-spacing") },
+ { "border-top-color", SLEN("border-top-color") },
+ { "border-top-style", SLEN("border-top-style") },
+ { "border-top-width", SLEN("border-top-width") },
+ { "bottom", SLEN("bottom") },
+ { "caption-side", SLEN("caption-side") },
+ { "clear", SLEN("clear") },
+ { "clip", SLEN("clip") },
+ { "color", SLEN("color") },
+ { "content", SLEN("content") },
+ { "counter-increment", SLEN("counter-increment") },
+ { "counter-reset", SLEN("counter-reset") },
+ { "cue-after", SLEN("cue-after") },
+ { "cue-before", SLEN("cue-before") },
+ { "cursor", SLEN("cursor") },
+ { "direction", SLEN("direction") },
+ { "display", SLEN("display") },
+ { "elevation", SLEN("elevation") },
+ { "empty-cells", SLEN("empty-cells") },
+ { "float", SLEN("float") },
+ { "font-family", SLEN("font-family") },
+ { "font-size", SLEN("font-size") },
+ { "font-style", SLEN("font-style") },
+ { "font-variant", SLEN("font-variant") },
+ { "font-weight", SLEN("font-weight") },
+ { "height", SLEN("height") },
+ { "left", SLEN("left") },
+ { "letter-spacing", SLEN("letter-spacing") },
+ { "line-height", SLEN("line-height") },
+ { "list-style-image", SLEN("list-style-image") },
+ { "list-style-position", SLEN("list-style-position") },
+ { "list-style-type", SLEN("list-style-type") },
+ { "margin-bottom", SLEN("margin-bottom") },
+ { "margin-left", SLEN("margin-left") },
+ { "margin-right", SLEN("margin-right") },
+ { "margin-top", SLEN("margin-top") },
+ { "max-height", SLEN("max-height") },
+ { "max-width", SLEN("max-width") },
+ { "min-height", SLEN("min-height") },
+ { "min-width", SLEN("min-width") },
+ { "orphans", SLEN("orphans") },
+ { "outline-color", SLEN("outline-color") },
+ { "outline-style", SLEN("outline-style") },
+ { "outline-width", SLEN("outline-width") },
+ { "overflow", SLEN("overflow") },
+ { "padding-bottom", SLEN("padding-bottom") },
+ { "padding-left", SLEN("padding-left") },
+ { "padding-right", SLEN("padding-right") },
+ { "padding-top", SLEN("padding-top") },
+ { "page-break-after", SLEN("page-break-after") },
+ { "page-break-before", SLEN("page-break-before") },
+ { "page-break-inside", SLEN("page-break-inside") },
+ { "pause-after", SLEN("pause-after") },
+ { "pause-before", SLEN("pause-before") },
+ { "pitch-range", SLEN("pitch-range") },
+ { "pitch", SLEN("pitch") },
+ { "play-during", SLEN("play-during") },
+ { "position", SLEN("position") },
+ { "quotes", SLEN("quotes") },
+ { "richness", SLEN("richness") },
+ { "right", SLEN("right") },
+ { "speak-header", SLEN("speak-header") },
+ { "speak-numeral", SLEN("speak-numeral") },
+ { "speak-punctuation", SLEN("speak-punctuation") },
+ { "speak", SLEN("speak") },
+ { "speech-rate", SLEN("speech-rate") },
+ { "stress", SLEN("stress") },
+ { "table-layout", SLEN("table-layout") },
+ { "text-align", SLEN("text-align") },
+ { "text-decoration", SLEN("text-decoration") },
+ { "text-indent", SLEN("text-indent") },
+ { "text-transform", SLEN("text-transform") },
+ { "top", SLEN("top") },
+ { "unicode-bidi", SLEN("unicode-bidi") },
+ { "vertical-align", SLEN("vertical-align") },
+ { "visibility", SLEN("visibility") },
+ { "voice-family", SLEN("voice-family") },
+ { "volume", SLEN("volume") },
+ { "white-space", SLEN("white-space") },
+ { "widows", SLEN("widows") },
+ { "width", SLEN("width") },
+ { "word-spacing", SLEN("word-spacing") },
+ { "z-index", SLEN("z-index") },
+
+ { "inherit", SLEN("inherit") },
+ { "important", SLEN("important") },
+ { "none", SLEN("none") },
+ { "both", SLEN("both") },
+ { "fixed", SLEN("fixed") },
+ { "scroll", SLEN("scroll") },
+ { "transparent", SLEN("transparent") },
+ { "no-repeat", SLEN("no-repeat") },
+ { "repeat-x", SLEN("repeat-x") },
+ { "repeat-y", SLEN("repeat-y") },
+ { "repeat", SLEN("repeat") },
+ { "hidden", SLEN("hidden") },
+ { "dotted", SLEN("dotted") },
+ { "dashed", SLEN("dashed") },
+ { "solid", SLEN("solid") },
+ { "double", SLEN("double") },
+ { "groove", SLEN("groove") },
+ { "ridge", SLEN("ridge") },
+ { "inset", SLEN("inset") },
+ { "outset", SLEN("outset") },
+ { "thin", SLEN("thin") },
+ { "medium", SLEN("medium") },
+ { "thick", SLEN("thick") },
+ { "collapse", SLEN("collapse") },
+ { "separate", SLEN("separate") },
+ { "auto", SLEN("auto") },
+ { "ltr", SLEN("ltr") },
+ { "rtl", SLEN("rtl") },
+ { "inline", SLEN("inline") },
+ { "block", SLEN("block") },
+ { "list-item", SLEN("list-item") },
+ { "run-in", SLEN("run-in") },
+ { "inline-block", SLEN("inline-block") },
+ { "table", SLEN("table") },
+ { "inline-table", SLEN("inline-table") },
+ { "table-row-group", SLEN("table-row-group") },
+ { "table-header-group", SLEN("table-header-group") },
+ { "table-footer-group", SLEN("table-footer-group") },
+ { "table-row", SLEN("table-row") },
+ { "table-column-group", SLEN("table-column-group") },
+ { "table-column", SLEN("table-column") },
+ { "table-cell", SLEN("table-cell") },
+ { "table-caption", SLEN("table-caption") },
+ { "below", SLEN("below") },
+ { "level", SLEN("level") },
+ { "above", SLEN("above") },
+ { "higher", SLEN("higher") },
+ { "lower", SLEN("lower") },
+ { "show", SLEN("show") },
+ { "hide", SLEN("hide") },
+ { "xx-small", SLEN("xx-small") },
+ { "x-small", SLEN("x-small") },
+ { "small", SLEN("small") },
+ { "large", SLEN("large") },
+ { "x-large", SLEN("x-large") },
+ { "xx-large", SLEN("xx-large") },
+ { "larger", SLEN("larger") },
+ { "smaller", SLEN("smaller") },
+ { "normal", SLEN("normal") },
+ { "italic", SLEN("italic") },
+ { "oblique", SLEN("oblique") },
+ { "small-caps", SLEN("small-caps") },
+ { "bold", SLEN("bold") },
+ { "bolder", SLEN("bolder") },
+ { "lighter", SLEN("lighter") },
+ { "inside", SLEN("inside") },
+ { "outside", SLEN("outside") },
+ { "disc", SLEN("disc") },
+ { "circle", SLEN("circle") },
+ { "square", SLEN("square") },
+ { "decimal", SLEN("decimal") },
+ { "decimal-leading-zero", SLEN("decimal-leading-zero") },
+ { "lower-roman", SLEN("lower-roman") },
+ { "upper-roman", SLEN("upper-roman") },
+ { "lower-greek", SLEN("lower-greek") },
+ { "lower-latin", SLEN("lower-latin") },
+ { "upper-latin", SLEN("upper-latin") },
+ { "armenian", SLEN("armenian") },
+ { "georgian", SLEN("georgian") },
+ { "lower-alpha", SLEN("lower-alpha") },
+ { "upper-alpha", SLEN("upper-alpha") },
+ { "invert", SLEN("invert") },
+ { "visible", SLEN("visible") },
+ { "always", SLEN("always") },
+ { "avoid", SLEN("avoid") },
+ { "x-low", SLEN("x-low") },
+ { "low", SLEN("low") },
+ { "high", SLEN("high") },
+ { "x-high", SLEN("x-high") },
+ { "static", SLEN("static") },
+ { "relative", SLEN("relative") },
+ { "absolute", SLEN("absolute") },
+ { "once", SLEN("once") },
+ { "digits", SLEN("digits") },
+ { "continuous", SLEN("continuous") },
+ { "code", SLEN("code") },
+ { "spell-out", SLEN("spell-out") },
+ { "x-slow", SLEN("x-slow") },
+ { "slow", SLEN("slow") },
+ { "fast", SLEN("fast") },
+ { "x-fast", SLEN("x-fast") },
+ { "faster", SLEN("faster") },
+ { "slower", SLEN("slower") },
+ { "center", SLEN("center") },
+ { "justify", SLEN("justify") },
+ { "capitalize", SLEN("capitalize") },
+ { "uppercase", SLEN("uppercase") },
+ { "lowercase", SLEN("lowercase") },
+ { "embed", SLEN("embed") },
+ { "bidi-override", SLEN("bidi-override") },
+ { "baseline", SLEN("baseline") },
+ { "sub", SLEN("sub") },
+ { "super", SLEN("super") },
+ { "text-top", SLEN("text-top") },
+ { "middle", SLEN("middle") },
+ { "text-bottom", SLEN("text-bottom") },
+ { "silent", SLEN("silent") },
+ { "x-soft", SLEN("x-soft") },
+ { "soft", SLEN("soft") },
+ { "loud", SLEN("loud") },
+ { "x-loud", SLEN("x-loud") },
+ { "pre", SLEN("pre") },
+ { "nowrap", SLEN("nowrap") },
+ { "pre-wrap", SLEN("pre-wrap") },
+ { "pre-line", SLEN("pre-line") },
+};
+
+#endif
+