ELinks 0.18.0
|
#include <stdio.h>
#include <string.h>
#include "elinks.h"
#include "dom/scanner.h"
#include "dom/sgml/scanner.h"
#include "dom/string.h"
#include "util/error.h"
Enumerations | |
enum | sgml_char_group { SGML_CHAR_ENTITY = (1 << 1) , SGML_CHAR_IDENT = (1 << 2) , SGML_CHAR_NEWLINE = (1 << 3) , SGML_CHAR_WHITESPACE = (1 << 4) , SGML_CHAR_NOT_TEXT = (1 << 5) , SGML_CHAR_NOT_ATTRIBUTE = (1 << 6) } |
Functions | |
static struct dom_scanner_token * | scan_sgml_tokens (struct dom_scanner *scanner) |
static void | skip_sgml_space (struct dom_scanner *scanner, char **string) |
static void | set_sgml_incomplete (struct dom_scanner *scanner, struct dom_scanner_token *token) |
static int | check_sgml_error (struct dom_scanner *scanner) |
static char * | get_sgml_error_end (struct dom_scanner *scanner, unsigned int type, char *end) |
static struct dom_scanner_token * | set_sgml_error (struct dom_scanner *scanner, char *end) |
static void | scan_sgml_text_token (struct dom_scanner *scanner, struct dom_scanner_token *token) |
static int | check_sgml_precedence (int type, int skipto) |
static char * | skip_sgml_chars (struct dom_scanner *scanner, char *string, unsigned char skipto) |
static char * | skip_sgml (struct dom_scanner *scanner, char **string, unsigned char skipto, int check_quoting) |
static int | skip_sgml_comment (struct dom_scanner *scanner, char **string, int *possibly_incomplete) |
static int | skip_sgml_cdata_section (struct dom_scanner *scanner, char **string, int *possibly_incomplete) |
static void | scan_sgml_element_token (struct dom_scanner *scanner, struct dom_scanner_token *token) |
static void | scan_sgml_proc_inst_token (struct dom_scanner *scanner, struct dom_scanner_token *token) |
Variables | |
static struct dom_scan_table_info | sgml_scan_table_info [] |
static struct dom_scanner_string_mapping | sgml_string_mappings [] |
struct dom_scanner_info | sgml_scanner_info |
#define check_sgml_table | ( | c, | |
bit ) (sgml_scanner_info.scan_table[(unsigned char)(c)] & (bit)) |
#define foreach_sgml_cdata | ( | scanner, | |
str ) for (; ((str) < (scanner)->end && *(str) != '<' && *(str) != '&'); (str)++) |
#define is_sgml_attribute | ( | c | ) | !check_sgml_table(c, SGML_CHAR_NOT_ATTRIBUTE | SGML_CHAR_WHITESPACE) |
#define is_sgml_entity | ( | c | ) | check_sgml_table(c, SGML_CHAR_ENTITY) |
#define is_sgml_ident | ( | c | ) | check_sgml_table(c, SGML_CHAR_IDENT) |
#define is_sgml_newline | ( | c | ) | check_sgml_table(c, SGML_CHAR_NEWLINE) |
#define is_sgml_space | ( | c | ) | check_sgml_table(c, SGML_CHAR_WHITESPACE) |
#define is_sgml_text | ( | c | ) | !check_sgml_table(c, SGML_CHAR_NOT_TEXT) |
#define is_sgml_token_start | ( | c | ) | check_sgml_table(c, SGML_CHAR_TOKEN_START) |
#define scan_sgml | ( | scanner, | |
s, | |||
bit ) while ((s) < (scanner)->end && check_sgml_table(*(s), bit)) (s)++; |
#define scan_sgml_attribute | ( | scanner, | |
str ) |
#define SGML_STRING_MAP | ( | str, | |
type, | |||
family ) { STATIC_DOM_STRING(str), SGML_TOKEN_##type, SGML_TOKEN_##family } |
enum sgml_char_group |
|
inlinestatic |
|
inlinestatic |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
|
static |
|
static |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
static |
struct dom_scanner_info sgml_scanner_info |
|
static |