ELinks 0.18.0
scanner.c File Reference
#include <stdio.h>
#include <string.h>
#include "elinks.h"
#include "dom/scanner.h"
#include "util/error.h"
Include dependency graph for scanner.c:

Functions

int map_dom_scanner_string (struct dom_scanner *scanner, char *ident, char *end, int base_type)
 Map a string to internal ID.
struct dom_scanner_tokenskip_dom_scanner_tokens (struct dom_scanner *scanner, int skipto, int precedence)
 Conditionally skip tokens.
static void init_dom_scanner_info (struct dom_scanner_info *scanner_info)
void init_dom_scanner (struct dom_scanner *scanner, struct dom_scanner_info *scanner_info, struct dom_string *string, int state, int count_lines, int complete, int check_complete, int detect_errors)
 Initializes a DOM scanner.

Function Documentation

◆ init_dom_scanner()

void init_dom_scanner ( struct dom_scanner * scanner,
struct dom_scanner_info * scanner_info,
struct dom_string * string,
int state,
int count_lines,
int complete,
int check_complete,
int detect_error )

Initializes a DOM scanner.

See struct dom_scanner for a description of the int flags.

◆ init_dom_scanner_info()

void init_dom_scanner_info ( struct dom_scanner_info * scanner_info)
inlinestatic

◆ map_dom_scanner_string()

int map_dom_scanner_string ( struct dom_scanner * scanner,
char * ident,
char * end,
int base_type )

Map a string to internal ID.

Looks up the string from ident to end to in the scanners string mapping table.

◆ skip_dom_scanner_tokens()

struct dom_scanner_token * skip_dom_scanner_tokens ( struct dom_scanner * scanner,
int skipto,
int precedence )

Conditionally skip tokens.

Removes tokens from the scanner until it meets a token of the given type. This token will then also be skipped.