|
ELinks 0.18.0
|
CSS token scanner utilities. More...
#include <stdio.h>#include <string.h>#include "elinks.h"#include "document/css/scanner.h"#include "util/error.h"#include "util/scanner.h"#include "util/string.h"
Macros | |
| #define | check_css_table(c, bit) (css_scanner_info.scan_table[(unsigned char)(c)] & (bit)) |
| #define | scan_css(scanner, s, bit) while ((s) < (scanner)->end && check_css_table(*(s), bit)) (s)++; |
| #define | scan_back_css(scanner, s, bit) while ((s) >= (scanner)->string && check_css_table(*(s), bit)) (s)--; |
| #define | is_css_ident_start(c) check_css_table(c, CSS_CHAR_IDENT_START) |
| #define | is_css_ident(c) check_css_table(c, CSS_CHAR_IDENT) |
| #define | is_css_digit(c) check_css_table(c, CSS_CHAR_DIGIT) |
| #define | is_css_hexdigit(c) check_css_table(c, CSS_CHAR_HEX_DIGIT) |
| #define | is_css_char_token(c) check_css_table(c, CSS_CHAR_TOKEN) |
| #define | is_css_token_start(c) check_css_table(c, CSS_CHAR_TOKEN_START) |
| #define | skip_css(scanner, s, skipto) |
Enumerations | |
| enum | css_char_group { CSS_CHAR_ALPHA = (1 << 0) , CSS_CHAR_DIGIT = (1 << 1) , CSS_CHAR_HEX_DIGIT = (1 << 2) , CSS_CHAR_IDENT = (1 << 3) , CSS_CHAR_IDENT_START = (1 << 4) , CSS_CHAR_NEWLINE = (1 << 5) , CSS_CHAR_NON_ASCII = (1 << 6) , CSS_CHAR_SGML_MARKUP = (1 << 7) , CSS_CHAR_TOKEN = (1 << 8) , CSS_CHAR_TOKEN_START = (1 << 9) , CSS_CHAR_WHITESPACE = (1 << 10) } |
| Bitmap entries for the CSS character groups used in the scanner table. More... | |
Functions | |
| static struct scanner_token * | scan_css_tokens (struct scanner *scanner) |
| static void | scan_css_token (struct scanner *scanner, struct scanner_token *token) |
Variables | |
| static const struct scan_table_info | css_scan_table_info [] |
| static const struct scanner_string_mapping | css_string_mappings [] |
| struct scanner_info | css_scanner_info |
CSS token scanner utilities.
| #define check_css_table | ( | c, | |
| bit | |||
| ) | (css_scanner_info.scan_table[(unsigned char)(c)] & (bit)) |
| #define is_css_char_token | ( | c | ) | check_css_table(c, CSS_CHAR_TOKEN) |
| #define is_css_digit | ( | c | ) | check_css_table(c, CSS_CHAR_DIGIT) |
| #define is_css_hexdigit | ( | c | ) | check_css_table(c, CSS_CHAR_HEX_DIGIT) |
| #define is_css_ident | ( | c | ) | check_css_table(c, CSS_CHAR_IDENT) |
| #define is_css_ident_start | ( | c | ) | check_css_table(c, CSS_CHAR_IDENT_START) |
| #define is_css_token_start | ( | c | ) | check_css_table(c, CSS_CHAR_TOKEN_START) |
| #define scan_back_css | ( | scanner, | |
| s, | |||
| bit | |||
| ) | while ((s) >= (scanner)->string && check_css_table(*(s), bit)) (s)--; |
| #define scan_css | ( | scanner, | |
| s, | |||
| bit | |||
| ) | while ((s) < (scanner)->end && check_css_table(*(s), bit)) (s)++; |
| enum css_char_group |
|
inlinestatic |
|
static |
|
static |
| struct scanner_info css_scanner_info |
|
static |