#include <libwapcaplet/libwapcaplet.h>
#include <libcss/errors.h>
#include <libcss/functypes.h>
#include <libcss/types.h>
#include <parserutils/input/inputstream.h>
Go to the source code of this file.
|
| enum | css_lexer_opttype { CSS_LEXER_EMIT_COMMENTS
} |
| |
| enum | css_token_type {
CSS_TOKEN_IDENT
, CSS_TOKEN_ATKEYWORD
, CSS_TOKEN_HASH
, CSS_TOKEN_FUNCTION
,
CSS_TOKEN_STRING
, CSS_TOKEN_INVALID_STRING
, CSS_TOKEN_URI
, CSS_TOKEN_UNICODE_RANGE
,
CSS_TOKEN_CHAR
, CSS_TOKEN_NUMBER
, CSS_TOKEN_PERCENTAGE
, CSS_TOKEN_DIMENSION
,
CSS_TOKEN_LAST_INTERN
, CSS_TOKEN_CDO
, CSS_TOKEN_CDC
, CSS_TOKEN_S
,
CSS_TOKEN_COMMENT
, CSS_TOKEN_INCLUDES
, CSS_TOKEN_DASHMATCH
, CSS_TOKEN_PREFIXMATCH
,
CSS_TOKEN_SUFFIXMATCH
, CSS_TOKEN_SUBSTRINGMATCH
, CSS_TOKEN_EOF
} |
| |
◆ css_lexer
◆ css_lexer_optparams
◆ css_lexer_opttype
◆ css_token
◆ css_token_type
◆ css_lexer_opttype
Lexer option types
| Enumerator |
|---|
| CSS_LEXER_EMIT_COMMENTS | |
◆ css_token_type
Token type
| Enumerator |
|---|
| CSS_TOKEN_IDENT | |
| CSS_TOKEN_ATKEYWORD | |
| CSS_TOKEN_HASH | |
| CSS_TOKEN_FUNCTION | |
| CSS_TOKEN_STRING | |
| CSS_TOKEN_INVALID_STRING | |
| CSS_TOKEN_URI | |
| CSS_TOKEN_UNICODE_RANGE | |
| CSS_TOKEN_CHAR | |
| CSS_TOKEN_NUMBER | |
| CSS_TOKEN_PERCENTAGE | |
| CSS_TOKEN_DIMENSION | |
| CSS_TOKEN_LAST_INTERN | |
| CSS_TOKEN_CDO | |
| CSS_TOKEN_CDC | |
| CSS_TOKEN_S | |
| CSS_TOKEN_COMMENT | |
| CSS_TOKEN_INCLUDES | |
| CSS_TOKEN_DASHMATCH | |
| CSS_TOKEN_PREFIXMATCH | |
| CSS_TOKEN_SUFFIXMATCH | |
| CSS_TOKEN_SUBSTRINGMATCH | |
| CSS_TOKEN_EOF | |
◆ css__lexer_create()
Create a lexer instance
- Parameters
-
| input | The inputstream to read from |
| lexer | Pointer to location to receive lexer instance |
- Returns
- CSS_OK on success, CSS_BADPARM on bad parameters, CSS_NOMEM on memory exhaustion
◆ css__lexer_destroy()
Destroy a lexer instance
- Parameters
-
| lexer | The instance to destroy |
- Returns
- CSS_OK on success, appropriate error otherwise
◆ css__lexer_get_token()
Retrieve a token from a lexer
- Parameters
-
| lexer | The lexer instance to read from |
| token | Pointer to location to receive pointer to token |
- Returns
- CSS_OK on success, appropriate error otherwise
The returned token object is owned by the lexer. However, the client is permitted to modify the data members of the token. The token must not be freed by the client (it may not have been allocated in the first place), nor may any of the pointers contained within it. The client may, if they wish, overwrite any data member of the returned token object – the lexer does not depend on these remaining constant. This allows the client code to efficiently implement a push-back buffer with interned string data.
◆ css__lexer_setopt()
Configure a lexer instance
- Parameters
-
| lexer | The lexer to configure |
| type | The option type to modify |
| params | Option-specific parameters |
- Returns
- CSS_OK on success, appropriate error otherwise