ELinks 0.18.0
dom_scanner Struct Reference

DOM scanner. More...

#include <scanner.h>

Collaboration diagram for dom_scanner:

Data Fields

char * string
 The start of the scanned string.
 
char * end
 The end of the scanned string.
 
char * position
 The current position in the sstring being scanned.
 
struct dom_scanner_tokencurrent
 The current token.
 
int tokens
 The number of scanned tokens left in the table.
 
struct dom_scanner_infoinfo
 The 'meta' scanner information.
 
unsigned int check_complete:1
 Only generate complete tokens.
 
unsigned int incomplete:1
 The scanned string is incomplete.
 
unsigned int detect_errors:1
 Check for markup errors.
 
unsigned int found_error
 Did we already report this error?
 
unsigned int count_lines:1
 Is line counting enbaled?
 
unsigned int lineno
 Line # of the last scanned token.
 
int state
 Some state indicator only meaningful to the scanner internals.
 
struct dom_scanner_token table [DOM_SCANNER_TOKENS]
 Token table.
 

Detailed Description

DOM scanner.

Holds the current state of the scanner.

Field Documentation

◆ check_complete

unsigned int dom_scanner::check_complete

Only generate complete tokens.

◆ count_lines

unsigned int dom_scanner::count_lines

Is line counting enbaled?

◆ current

struct dom_scanner_token* dom_scanner::current

The current token.

If the number of scanned tokens is less than DOM_SCANNER_TOKENS it is because there are no more tokens in the string.

◆ detect_errors

unsigned int dom_scanner::detect_errors

Check for markup errors.

◆ end

char* dom_scanner::end

The end of the scanned string.

◆ found_error

unsigned int dom_scanner::found_error

Did we already report this error?

◆ incomplete

unsigned int dom_scanner::incomplete

The scanned string is incomplete.

◆ info

struct dom_scanner_info* dom_scanner::info

The 'meta' scanner information.

◆ lineno

unsigned int dom_scanner::lineno

Line # of the last scanned token.

◆ position

char* dom_scanner::position

The current position in the sstring being scanned.

The position in the string where to scan next and the end of the string. If position is NULL it means that no more tokens can be retrieved from the string.

◆ state

int dom_scanner::state

Some state indicator only meaningful to the scanner internals.

◆ string

char* dom_scanner::string

The start of the scanned string.

◆ table

struct dom_scanner_token dom_scanner::table[DOM_SCANNER_TOKENS]

Token table.

The table contain already scanned tokens. It is maintained in order to optimize the scanning a bit and make it possible to look ahead at the next token. You should always use the accessors (defined below) for getting tokens from the scanner.

◆ tokens

int dom_scanner::tokens

The number of scanned tokens left in the table.


The documentation for this struct was generated from the following file: