From 2fcb157f28b152ba32e89baddbd811b0d6e76b79 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 4 Sep 2017 14:56:51 +0100 Subject: Strip trailing whitespace. --- docs/API | 6 ++--- docs/Bytecode | 54 +++++++++++++++++++++---------------------- docs/Grammar | 66 ++++++++++++++++++++++++++--------------------------- docs/Representation | 2 +- docs/Tokens | 8 +++---- 5 files changed, 68 insertions(+), 68 deletions(-) (limited to 'docs') diff --git a/docs/API b/docs/API index 421d720..6115b5b 100644 --- a/docs/API +++ b/docs/API @@ -182,12 +182,12 @@ The arguments are as follows: | directly; instead it gets information about it through the functions given | in the handler argument, described below. Usually this will be a node in a | document tree. -| +| + uint64_t media | The media that the style should apply to. The computed style will only | consider stylesheets or @media blocks that include this media. See the CSS | specification for more details. -| +| + const css_stylesheet *inline_style | + css_select_handler *handler @@ -213,7 +213,7 @@ following in common: * the last one or two arguments are pointers that must be updated with the required information - + * the return value is a css_error and should be CSS_OK if everything worked and an error code otherwise diff --git a/docs/Bytecode b/docs/Bytecode index f2d10cc..852a918 100644 --- a/docs/Bytecode +++ b/docs/Bytecode @@ -30,7 +30,7 @@ assigned to the fractional part. Strings are stored as a 32bit index into a table of interned string pointers. The table is found in the stylesheet object. -CSS dimensions are stored as two 32bit values: . +CSS dimensions are stored as two 32bit values: . Length is a 32bit numeric value (as described above) and unit is as follows: bit 8 clear => length unit @@ -160,7 +160,7 @@ Opcodes 04 - background-position (14bits) : bits 8-13: MBZ - bits 0-7 : + bits 0-7 : bit 7: set => percentage or length unit follows bits 4-6: MBZ clear => keywords: @@ -251,7 +251,7 @@ Opcodes 14 - bottom (14bits) : bits 8-13: MBZ - bits 0-7: + bits 0-7: bit 7 set => length/percentage follows bits 0-6: MBZ bit 7 clear => keywords: @@ -275,7 +275,7 @@ Opcodes 17 - clip (14bits) : bits 8-13: MBZ - bits 0-7: + bits 0-7: bit 7 set => shape follows bits 0-2: 000 => rect, bit 3 => top auto @@ -284,19 +284,19 @@ Opcodes bit 6 => left auto other => rffe. bits 3-6: MBZ. - + bit 7 clear => keywords: bits 0-6: 0000000 => auto, other => rffe. If the value is rect(top, right, bottom, left), then bits 3-6 encode - which of , , , is set to auto. The + which of , , , is set to auto. The subsequent parameter list is then 4 - entries long. - Each entry is a dimension. Entries are always ordered top, right, + Each entry is a dimension. Entries are always ordered top, right, bottom, left. For example, - clip: rect(10px, auto, auto, 10px) + clip: rect(10px, auto, auto, 10px) would produce the following bytecode: <02c00017> <00002800> <00000000> <00002800> <00000000> @@ -304,7 +304,7 @@ Opcodes 18 - color (14bits) : bits 8-13: MBZ - bits 0-7: + bits 0-7: bit 7: set => colour follows. bits 0-6: MBZ. clear => keywords: @@ -341,8 +341,8 @@ Opcodes declares the type of the next item. The list is terminated by a word with all bits set to zero (the encoding for "normal"). - For example, - content: open-quote url('http://example.com/') + For example, + content: open-quote url('http://example.com/') " : " attr(name) " " counter(x) "." counters(y, ".") close-quote;" would result in the following bytecode: @@ -351,9 +351,9 @@ Opcodes <00000081> <00000080> <00000084> - <00000080> + <00000080> <00000382> - <00000080> + <00000080> <00000383> <00000003> <00000000> @@ -368,8 +368,8 @@ Opcodes bits 0-6: 0000000 => none, other => rffe. - If the value is not "none", or "inherit", then there is a parameter - list. Each item is preceded by a word which declares the type + If the value is not "none", or "inherit", then there is a parameter + list. Each item is preceded by a word which declares the type of the next item. The list is terminated by a word with all bits set to zero (the encoding for "none"). @@ -384,8 +384,8 @@ Opcodes bits 0-6: 0000000 => none, other => rffe. - If the value is not "none", or "inherit", then there is a parameter - list. Each item is preceded by a word which declares the type + If the value is not "none", or "inherit", then there is a parameter + list. Each item is preceded by a word which declares the type of the next item. The list is terminated by a word with all bits set to zero (the encoding for "none"). @@ -435,7 +435,7 @@ Opcodes 0010000 => progress, other => rffe. - If the value indicates that a uri is present, then there is a + If the value indicates that a uri is present, then there is a parameter list. Each item is preceded by a word which declares the type of the next item. The list is terminated by a word with bit 7 clear. @@ -499,7 +499,7 @@ Opcodes bits 0-7 : bit 7 set => data follows bits 1-6: MBZ - bit 0 : clear => string, + bit 0 : clear => string, set => ident list (as string) bit 7 clear => keywords: bits 0-6: 0000000 => Reserved. @@ -510,8 +510,8 @@ Opcodes 0000101 => monospace, other => rffe. - In all cases, there is a parameter list. Each item is preceded by a - word which declares the type of the next item. The list is + In all cases, there is a parameter list. Each item is preceded by a + word which declares the type of the next item. The list is terminated by a word with all bits clear. 25 - font-size @@ -855,7 +855,7 @@ Opcodes bits 0-6: 0000000 => none, other => rffe. - If the value indicates that strings are present, then there is a + If the value indicates that strings are present, then there is a parameter list. Each item is preceded by a word which declares the type of the next item. The list is terminated by a word with all bits clear (the encoding for "none"). @@ -954,7 +954,7 @@ Opcodes otherwise: bits 4-7: MBZ bit 3: set => blink, clear => no blink - bit 2: set => line-through, + bit 2: set => line-through, clear => no line-through bit 1: set => overline, clear => no overline bit 0: set => underline, clear => no underline @@ -1023,7 +1023,7 @@ Opcodes bits 0-7 : bit 7 set => data follows bits 1-6: MBZ - bit 0 : clear => string, + bit 0 : clear => string, set => ident list (as string) bit 7 clear => keywords: bits 0-6: 0000000 => Reserved. @@ -1032,10 +1032,10 @@ Opcodes 0000011 => child, other => rffe. - In all cases, there is a parameter list. Each item is preceded by a - word which declares the type of the next item. The list is + In all cases, there is a parameter list. Each item is preceded by a + word which declares the type of the next item. The list is terminated by a word with all bits clear. - + 5d - volume (14bits) : bits 8-13: MBZ diff --git a/docs/Grammar b/docs/Grammar index 0fd27d3..c3d24b4 100644 --- a/docs/Grammar +++ b/docs/Grammar @@ -86,16 +86,16 @@ Differences from the specification 1) The start non-terminal has been introduced. It eats any leading whitespace and handles EOF. 2) The "stylesheet -> S stylesheet" production has been removed. -3) The "stylesheet -> CDO stylesheet" production has been changed to +3) The "stylesheet -> CDO stylesheet" production has been changed to "stylesheet -> CDO ws stylesheet". 4) The "stylesheet -> CDC stylesheet" production has been changed to "stylesheet -> CDC ws stylesheet". Essentially, the above changes remove the expectation of leading whitespace -from the stylesheet non-terminal. This is handled by either the start -non-terminal, or by the changes made to the production rules for the stylesheet -non-terminal. Note that the "stylesheet -> statement stylesheet" production -does not require modification as the statement production rule already consumes +from the stylesheet non-terminal. This is handled by either the start +non-terminal, or by the changes made to the production rules for the stylesheet +non-terminal. Note that the "stylesheet -> statement stylesheet" production +does not require modification as the statement production rule already consumes any whitespace following the statement. If '{', '}', '[', ']', '(', ')', and ';' are omitted from any, then the above @@ -104,18 +104,18 @@ grammar is LL(1). Nullable productions -------------------- -stylesheet, block-content, decl-list, decl-list-end, value0, any0, ws +stylesheet, block-content, decl-list, decl-list-end, value0, any0, ws FIRST sets ---------- -start CDO, CDC, S, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +start CDO, CDC, S, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -stylesheet CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +stylesheet CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD statement IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, PREFIXMATCH, SUFFIXMATCH, @@ -162,29 +162,29 @@ FOLLOW sets start stylesheet EOF -statement CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +statement CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -ruleset CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +ruleset CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -ruleset-end CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +ruleset-end CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -at-rule CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +at-rule CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -at-rule-end CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +at-rule-end CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF -block CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +block CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF, ';', '}' block-content '}' selector '{' @@ -202,9 +202,9 @@ any1 '{' any IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ';', ATKEYWORD, '}' -ws CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, - CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, - PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', +ws CDO, CDC, IDENT, NUMBER, PERCENTAGE, DIMENSION, STRING, + CHAR, URI, HASH, UNICODE-RANGE, INCLUDES, DASHMATCH, + PREFIXMATCH, SUFFIXMATCH, SUBSTRINGMATCH, FUNCTION, '(', '[', '{', ATKEYWORD, EOF, ';', '}', ':' diff --git a/docs/Representation b/docs/Representation index 3eb63eb..b91419f 100644 --- a/docs/Representation +++ b/docs/Representation @@ -78,7 +78,7 @@ struct stylesheet { uint32_t rule_count; /**< Number of rules in sheet */ struct rule *rule_list; /**< List of rules in sheet */ - bool disabled; /**< Whether this sheet is + bool disabled; /**< Whether this sheet is * disabled */ char *url; /**< URL of this sheet */ diff --git a/docs/Tokens b/docs/Tokens index 907fabd..9535e81 100644 --- a/docs/Tokens +++ b/docs/Tokens @@ -54,13 +54,13 @@ Differences from the CSS3 Syntax module specification 2) escape follows CSS2.1. CSS3 defines it as: escape ::= unicode | '\' [#x20-#x7E#x80-#xD7FF#xE000-#xFFFD#x10000-#x10FFFF] 3) urlchar omits ' and ): - a) If ' is permitted verbatim then, as stringchar inherits from urlchar, - single quoted strings may contain verbatim single quotes. This is + a) If ' is permitted verbatim then, as stringchar inherits from urlchar, + single quoted strings may contain verbatim single quotes. This is clearly nonsense. b) If ) is permitted verbatim then it becomes impossible to determine the true end of URI. Thus, for sanity's sake, it's omitted here. -4) stringchar explicitly includes ). See 3(b) for why it won't inherit it +4) stringchar explicitly includes ). See 3(b) for why it won't inherit it from urlchar as the spec implies. -5) BOM ::= #xFEFF is omitted. It is assumed that any leading BOM will be +5) BOM ::= #xFEFF is omitted. It is assumed that any leading BOM will be stripped from the document before lexing occurs. -- cgit v1.2.3