#include "string.h"
#include "cr-parser.h"
#include "cr-num.h"
#include "cr-term.h"
#include "cr-simple-sel.h"
#include "cr-attr-sel.h"
Go to the source code of this file.
Data Structures | |
struct | _CRParserError |
An abstraction of an error reported by by the parsing routines. More... | |
struct | _CRParserPriv |
The private attributes of CRParser. More... | |
Defines | |
#define | PRIVATE(obj) ((obj)->priv) |
#define | CHARS_TAB_SIZE 12 |
#define | IS_NUM(a_char) (((a_char) >= '0' && (a_char) <= '9')?TRUE:FALSE) |
return TRUE if the character is a number ([0-9]), FALSE otherwise | |
#define | CHECK_PARSING_STATUS(status, is_exception) |
Checks if 'status' equals CR_OK. | |
#define | CHECK_PARSING_STATUS_ERR(a_this, a_status, a_is_exception, a_err_msg, a_err_status) |
same as CHECK_PARSING_STATUS() but this one pushes an error on the parser error stack when an error arises. | |
#define | PEEK_NEXT_CHAR(a_this, a_to_char) |
Peeks the next char from the input stream of the current parser by invoking cr_tknzr_input_peek_char(). | |
#define | READ_NEXT_CHAR(a_this, a_to_char) |
Reads the next char from the input stream of the current parser. | |
#define | RECORD_INITIAL_POS(a_this, a_pos) |
Gets information about the current position in the input of the parser. | |
#define | RECORD_CUR_BYTE_ADDR(a_this, a_addr) |
Gets the address of the current byte inside the parser input. | |
#define | PEEK_BYTE(a_parser, a_offset, a_byte_ptr) |
Peeks a byte from the topmost parser input at a given offset from the current position. | |
#define | BYTE(a_parser, a_offset, a_eof) cr_tknzr_peek_byte2 (PRIVATE (a_this)->tknzr, a_offset, a_eof) |
#define | READ_NEXT_BYTE(a_this, a_byte_ptr) |
Reads a byte from the topmost parser input steam. | |
#define | SKIP_BYTES(a_this, a_nb_bytes) |
Skips a given number of byte in the topmost parser input. | |
#define | SKIP_CHARS(a_parser, a_nb_chars) |
Skip utf8 encoded characters. | |
#define | ENSURE_PARSING_COND(condition) if (! (condition)) {status = CR_PARSING_ERROR; goto error ;} |
Tests the condition and if it is false, sets status to "CR_PARSING_ERROR" and goto the 'error' label. | |
#define | ENSURE_PARSING_COND_ERR(a_this, a_condition, a_err_msg, a_err_status) |
#define | GET_NEXT_TOKEN(a_this, a_token_ptr) |
Typedefs | |
typedef _CRParserError | CRParserError |
Enumerations | |
enum | CRParserState { READY_STATE = 0, TRY_PARSE_CHARSET_STATE, CHARSET_PARSED_STATE, TRY_PARSE_IMPORT_STATE, IMPORT_PARSED_STATE, TRY_PARSE_RULESET_STATE, RULESET_PARSED_STATE, TRY_PARSE_MEDIA_STATE, MEDIA_PARSED_STATE, TRY_PARSE_PAGE_STATE, PAGE_PARSED_STATE, TRY_PARSE_FONT_FACE_STATE, FONT_FACE_PARSED_STATE } |
Functions | |
enum CRStatus | cr_parser_try_to_skip_spaces_and_comments (CRParser *a_this) |
Same as cr_parser_try_to_skip_spaces() but this one skips spaces and comments. | |
CRParser * | cr_parser_new (CRTknzr *a_tknzr) |
Creates a new parser to parse data coming the input stream given in parameter. | |
CRParser * | cr_parser_new_from_buf (const guchar *a_buf, gulong a_len, enum CREncoding a_enc, gboolean a_free_buf) |
Instanciates a new parser from a memory buffer. | |
CRParser * | cr_parser_new_from_input (CRInput *a_input) |
CRParser * | cr_parser_new_from_file (const guchar *a_file_uri, enum CREncoding a_enc) |
enum CRStatus | cr_parser_set_sac_handler (CRParser *a_this, CRDocHandler *a_handler) |
Sets a SAC document handler to the parser. | |
enum CRStatus | cr_parser_get_sac_handler (CRParser *a_this, CRDocHandler **a_handler) |
Gets the SAC document handler. | |
enum CRStatus | cr_parser_set_default_sac_handler (CRParser *a_this) |
Sets the SAC handler associated to the current instance of CRParser to the default SAC handler. | |
enum CRStatus | cr_parser_set_use_core_grammar (CRParser *a_this, gboolean a_use_core_grammar) |
enum CRStatus | cr_parser_get_use_core_grammar (CRParser *a_this, gboolean *a_use_core_grammar) |
enum CRStatus | cr_parser_parse_file (CRParser *a_this, const guchar *a_file_uri, enum CREncoding a_enc) |
Parses a the given in parameter. | |
enum CRStatus | cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr) |
Parses an expression as defined by the css2 spec in appendix D.1: expr: term [ operator term ]*. | |
enum CRStatus | cr_parser_parse_declaration (CRParser *a_this, GString **a_property, CRTerm **a_expr) |
Parses a "declaration" as defined by the css2 spec in appendix D.1: declaration ::= [property ':' S* expr prio?]? | |
enum CRStatus | cr_parser_parse_statement_core (CRParser *a_this) |
Parses a statement as defined by the css core grammar in chapter 4.1 of the css2 spec. | |
enum CRStatus | cr_parser_parse_ruleset (CRParser *a_this) |
Parses a "ruleset" as defined in the css2 spec at appendix D.1. | |
enum CRStatus | cr_parser_parse_import (CRParser *a_this, GList **a_media_list, GString **a_import_string) |
Parses an 'import' declaration as defined in the css2 spec in appendix D.1:. | |
enum CRStatus | cr_parser_parse_media (CRParser *a_this) |
Parses a 'media' declaration as specified in the css2 spec at appendix D.1:. | |
enum CRStatus | cr_parser_parse_page (CRParser *a_this) |
Parses '' rule as specified in the css2 spec in appendix D.1: page ::= PAGE_SYM S* IDENT? pseudo_page? S* '{' S* declaration [ ';' S* declaration ]* '}' S*. | |
enum CRStatus | cr_parser_parse_charset (CRParser *a_this, GString **a_value) |
Parses a charset declaration as defined implictly by the css2 spec in appendix D.1: charset ::= CHARSET_SYM S* STRING S* ';'. | |
enum CRStatus | cr_parser_parse_font_face (CRParser *a_this) |
Parses the "@font-face" rule specified in the css1 spec in appendix D.1:. | |
enum CRStatus | cr_parser_parse (CRParser *a_this) |
Parses the data that comes from the input previously associated to the current instance of CRParser. | |
enum CRStatus | cr_parser_set_tknzr (CRParser *a_this, CRTknzr *a_tknzr) |
enum CRStatus | cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf, gulong a_len, enum CREncoding a_enc) |
void | cr_parser_destroy (CRParser *a_this) |
Destroys the current instance of CRParser. |
Definition in file cr-parser.c.
|
Definition at line 274 of file cr-parser.c. Referenced by cr_parser_parse_import(), and cr_tknzr_get_next_token(). |
|
Definition at line 146 of file cr-parser.c. |
|
Value: if ((status) != CR_OK) \ { \ if (is_exception == FALSE) \ { \ status = CR_PARSING_ERROR ; \ } \ goto error ; \ } If not, goto the 'error' label.
Definition at line 163 of file cr-parser.c. Referenced by cr_parser_parse_expr(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_page(), cr_parser_parse_ruleset(), cr_parser_parse_statement_core(), and cr_tknzr_get_next_token(). |
|
Value: if ((status) != CR_OK) \ { \ if (a_is_exception == FALSE) status = CR_PARSING_ERROR ; \ cr_parser_push_error (a_this, a_err_msg, a_err_status) ; \ goto error ; \ }
Definition at line 187 of file cr-parser.c. Referenced by cr_parser_parse_declaration(), and cr_parser_parse_ruleset(). |
|
Tests the condition and if it is false, sets status to "CR_PARSING_ERROR" and goto the 'error' label.
Definition at line 325 of file cr-parser.c. Referenced by cr_parser_parse_charset(), cr_parser_parse_font_face(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_page(), cr_parser_parse_statement_core(), and cr_tknzr_get_next_token(). |
|
Value: if (! (a_condition)) \ { \ status = CR_PARSING_ERROR; \ cr_parser_push_error (a_this, a_err_msg, a_err_status) ; \ goto error ; \ } Definition at line 331 of file cr-parser.c. Referenced by cr_parser_parse_ruleset(). |
|
Value: status = cr_tknzr_get_next_token (PRIVATE (a_this)->tknzr, \ a_token_ptr) ; \ ENSURE_PARSING_COND (status == CR_OK) ; Definition at line 340 of file cr-parser.c. |
|
return TRUE if the character is a number ([0-9]), FALSE otherwise
Definition at line 152 of file cr-parser.c. |
|
Value: status = cr_tknzr_peek_byte (PRIVATE (a_this)->tknzr, \ a_offset, \ a_byte_ptr) ; \ CHECK_PARSING_STATUS (status, TRUE) ; If it fails, goto the "error:" label.
Definition at line 268 of file cr-parser.c. |
|
Value: {\ enum CRStatus status ; \ status = cr_tknzr_peek_char (PRIVATE (a_this)->tknzr, a_to_char) ; \ CHECK_PARSING_STATUS (status, TRUE) \ } invokes CHECK_PARSING_STATUS on the status returned by cr_tknzr_peek_char().
Definition at line 206 of file cr-parser.c. Referenced by cr_parser_parse_font_face(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_ruleset(), and cr_tknzr_get_next_token(). |
|
Definition at line 144 of file cr-parser.c. |
|
Value: status = cr_tknzr_read_byte (PRIVATE (a_this)->tknzr, a_byte_ptr) ; \ CHECK_PARSING_STATUS (status, TRUE) ; If it fails, goto the "error" label.
Definition at line 284 of file cr-parser.c. Referenced by cr_parser_parse_expr(). |
|
Value: status = cr_tknzr_read_char (PRIVATE (a_this)->tknzr, a_to_char) ; \ CHECK_PARSING_STATUS (status, TRUE) In case of error, jumps to the "error:" label located in the function where this macro is called.
Definition at line 223 of file cr-parser.c. Referenced by cr_parser_parse_declaration(), cr_parser_parse_font_face(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_ruleset(), and cr_tknzr_get_next_token(). |
|
Value: status = cr_tknzr_get_cur_byte_addr \ (PRIVATE (a_this)->tknzr, a_addr) ; \ CHECK_PARSING_STATUS (status, TRUE)
Definition at line 251 of file cr-parser.c. |
|
Value: status = cr_tknzr_get_cur_pos (PRIVATE \ (a_this)->tknzr, a_pos) ; \ g_return_val_if_fail (status == CR_OK, status) In case of failure, this macro returns from the calling function and returns a status code of type enum CRStatus.
Definition at line 238 of file cr-parser.c. Referenced by cr_parser_parse_charset(), cr_parser_parse_declaration(), cr_parser_parse_expr(), cr_parser_parse_font_face(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_page(), cr_parser_parse_ruleset(), cr_parser_parse_statement_core(), and cr_tknzr_get_next_token(). |
|
Value: status = cr_tknzr_seek_index (PRIVATE (a_this)->tknzr, \ CR_SEEK_CUR, a_nb_bytes) ; \ CHECK_PARSING_STATUS (status, TRUE) ; Don't update line and column number. In case of error, jumps to the "error:" label of the surrounding function.
Definition at line 297 of file cr-parser.c. |
|
Value: { \ glong nb_chars = a_nb_chars ; \ status = cr_tknzr_consume_chars \ (PRIVATE (a_parser)->tknzr,0, &nb_chars) ; \ CHECK_PARSING_STATUS (status, TRUE) ; \ } Updates line and column numbers.
Definition at line 310 of file cr-parser.c. Referenced by cr_parser_parse_import(), and cr_tknzr_get_next_token(). |
|
Definition at line 77 of file cr-parser.c. |
|
Definition at line 93 of file cr-parser.c. |
|
Destroys the current instance of CRParser.
Definition at line 5159 of file cr-parser.c. References cr_doc_handler_unref(), cr_tknzr_unref(), and PRIVATE. Referenced by cr_declaration_parse_from_buf(), cr_om_parser_destroy(), cr_statement_at_charset_rule_parse_from_buf(), cr_statement_at_import_rule_parse_from_buf(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_does_buf_parses_against_core(), cr_statement_font_face_rule_parse_from_buf(), cr_statement_ruleset_parse_from_buf(), and cr_term_parse_expression_from_buf(). |
|
Gets the SAC document handler.
Definition at line 3556 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE. Referenced by cr_om_parser_parse_buf(), and cr_om_parser_parse_file(). |
|
Definition at line 3610 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE. |
|
Creates a new parser to parse data coming the input stream given in parameter.
Definition at line 3430 of file cr-parser.c. References CR_OK, cr_parser_set_tknzr(), CRStatus, and PRIVATE. Referenced by cr_om_parser_parse_buf(), cr_parser_new_from_file(), and cr_parser_new_from_input(). |
|
Instanciates a new parser from a memory buffer.
Definition at line 3462 of file cr-parser.c. References cr_input_destroy(), cr_input_new_from_buf(), and cr_parser_new_from_input(). Referenced by cr_declaration_parse_from_buf(), cr_selector_parse_from_buf(), cr_statement_at_charset_rule_parse_from_buf(), cr_statement_at_import_rule_parse_from_buf(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_does_buf_parses_against_core(), cr_statement_font_face_rule_parse_from_buf(), cr_statement_ruleset_parse_from_buf(), and cr_term_parse_expression_from_buf(). |
|
Definition at line 3505 of file cr-parser.c. References cr_parser_new(), cr_tknzr_new_from_uri(), cr_utils_trace_info, and CRTknzr. Referenced by cr_om_parser_parse_file(). |
|
Definition at line 3486 of file cr-parser.c. References cr_parser_new(), cr_tknzr_new(), and CRTknzr. Referenced by cr_om_parser_new(), and cr_parser_new_from_buf(). |
|
Parses the data that comes from the input previously associated to the current instance of CRParser.
Definition at line 5086 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_ERROR, CRStatus, and PRIVATE. Referenced by cr_parser_parse_buf(), and cr_parser_parse_file(). |
|
Definition at line 5128 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_parser_parse(), cr_parser_set_tknzr(), cr_tknzr_new_from_buf(), CRStatus, CRTknzr, and PRIVATE. Referenced by cr_om_parser_parse_buf(). |
|
Parses a charset declaration as defined implictly by the css2 spec in appendix D.1: charset ::= CHARSET_SYM S* STRING S* ';'.
Definition at line 4788 of file cr-parser.c. References CHARSET_PARSED_STATE, CHARSET_SYM_TK, CR_BAD_PARAM_ERROR, CR_OK, cr_parser_try_to_skip_spaces_and_comments(), cr_tknzr_get_next_token(), cr_tknzr_set_cur_pos(), cr_token_destroy(), CRStatus, ENSURE_PARSING_COND, PRIVATE, RECORD_INITIAL_POS, SEMICOLON_TK, STRING_TK, TRY_PARSE_CHARSET_STATE, _CRToken::type, and _CRToken::u. Referenced by cr_statement_at_charset_rule_parse_from_buf(). |
|
Parses a "declaration" as defined by the css2 spec in appendix D.1: declaration ::= [property ':' S* expr prio?]?
Definition at line 3773 of file cr-parser.c. References CHECK_PARSING_STATUS_ERR, CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_parser_parse_expr(), cr_parser_try_to_skip_spaces_and_comments(), CR_PARSING_ERROR, CR_SYNTAX_ERROR, cr_term_append_term(), cr_term_destroy(), cr_tknzr_set_cur_pos(), CRStatus, PRIVATE, READ_NEXT_CHAR, and RECORD_INITIAL_POS. Referenced by cr_declaration_parse_from_buf(), cr_parser_parse_font_face(), cr_parser_parse_page(), and cr_parser_parse_ruleset(). |
|
Parses an expression as defined by the css2 spec in appendix D.1: expr: term [ operator term ]*.
Definition at line 3658 of file cr-parser.c. References CHECK_PARSING_STATUS, COMMA, CR_BAD_PARAM_ERROR, CR_END_OF_INPUT_ERROR, CR_ERROR, CR_OK, cr_parser_try_to_skip_spaces_and_comments(), cr_term_append_term(), cr_term_destroy(), cr_tknzr_peek_byte(), cr_tknzr_set_cur_pos(), CRStatus, DIVIDE, _CRTerm::operator, PRIVATE, READ_NEXT_BYTE, and RECORD_INITIAL_POS. Referenced by cr_parser_parse_declaration(), and cr_term_parse_expression_from_buf(). |
|
Parses a the given in parameter.
Definition at line 3629 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_parser_parse(), cr_parser_set_tknzr(), cr_tknzr_new_from_uri(), CRStatus, CRTknzr, and PRIVATE. Referenced by cr_om_parser_parse_file(). |
|
Parses the "@font-face" rule specified in the css1 spec in appendix D.1:. font_face ::= FONT_FACE_SYM S* '{' S* declaration [ ';' S* declaration ]* '}' S* This function will call SAC handlers whenever it is necessary.
Definition at line 4882 of file cr-parser.c. References CBO_TK, CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_parser_parse_declaration(), cr_parser_try_to_skip_spaces_and_comments(), cr_term_destroy(), cr_term_ref(), cr_term_unref(), cr_tknzr_get_next_token(), cr_tknzr_set_cur_pos(), cr_token_destroy(), CRStatus, ENSURE_PARSING_COND, FONT_FACE_PARSED_STATE, FONT_FACE_SYM_TK, PEEK_NEXT_CHAR, PRIVATE, READ_NEXT_CHAR, RECORD_INITIAL_POS, TRY_PARSE_FONT_FACE_STATE, and _CRToken::type. Referenced by cr_statement_font_face_rule_parse_from_buf(). |
|
Parses an 'import' declaration as defined in the css2 spec in appendix D.1:. import ::= [STRING|URI] S* [ medium [ ',' S* medium]* ]? ';' S*
Definition at line 4153 of file cr-parser.c. References BYTE, CHECK_PARSING_STATUS, CR_BAD_PARAM_ERROR, CR_END_OF_INPUT_ERROR, CR_OK, cr_parser_try_to_skip_spaces_and_comments(), CR_PARSING_ERROR, cr_tknzr_peek_char(), cr_tknzr_set_cur_pos(), CRStatus, ENSURE_PARSING_COND, IMPORT_PARSED_STATE, PEEK_NEXT_CHAR, PRIVATE, READ_NEXT_CHAR, RECORD_INITIAL_POS, SKIP_CHARS, and TRY_PARSE_IMPORT_STATE. Referenced by cr_statement_at_import_rule_parse_from_buf(). |
|
Parses a 'media' declaration as specified in the css2 spec at appendix D.1:. media ::= S* medium [ ',' S* medium ]* '{' S* ruleset* '}' S* Note that this function calls the required sac handlers during the parsing to notify media productions. See CRDocHandler to know the callback called during parsing.
Definition at line 4329 of file cr-parser.c. References CHECK_PARSING_STATUS, CR_BAD_PARAM_ERROR, CR_OK, cr_parser_parse_ruleset(), cr_parser_try_to_skip_spaces_and_comments(), cr_tknzr_get_next_token(), cr_tknzr_set_cur_pos(), cr_token_destroy(), CRStatus, ENSURE_PARSING_COND, IDENT_TK, MEDIA_PARSED_STATE, MEDIA_SYM_TK, PEEK_NEXT_CHAR, PRIVATE, READ_NEXT_CHAR, RECORD_INITIAL_POS, TRY_PARSE_MEDIA_STATE, _CRToken::type, and _CRToken::u. Referenced by cr_statement_at_media_rule_parse_from_buf(). |
|
Parses '' rule as specified in the css2 spec in appendix D.1: page ::= PAGE_SYM S* IDENT? pseudo_page? S* '{' S* declaration [ ';' S* declaration ]* '}' S*. This function also calls the relevant SAC handlers whenever it encounters a construction that must be reported to the calling application.
Definition at line 4512 of file cr-parser.c. References CBC_TK, CBO_TK, CHECK_PARSING_STATUS, CR_BAD_PARAM_ERROR, CR_OK, cr_parser_parse_declaration(), cr_parser_try_to_skip_spaces_and_comments(), cr_term_destroy(), cr_term_ref(), cr_term_unref(), cr_tknzr_get_next_token(), cr_tknzr_set_cur_pos(), cr_tknzr_unget_token(), cr_token_destroy(), CRStatus, DELIM_TK, ENSURE_PARSING_COND, IDENT_TK, PAGE_PARSED_STATE, PAGE_SYM_TK, PRIVATE, RECORD_INITIAL_POS, SEMICOLON_TK, TRY_PARSE_PAGE_STATE, _CRToken::type, and _CRToken::u. Referenced by cr_statement_at_page_rule_parse_from_buf(). |
|
Parses a "ruleset" as defined in the css2 spec at appendix D.1. ruleset ::= selector [ ',' S* selector ]* '{' S* declaration? [ ';' S* declaration? ]* '}' S*; This methods calls the the SAC handler on the relevant SAC handler callbacks whenever it encounters some specific constructions. See the documentation of CRDocHandler (the SAC handler) to know when which SAC handler is called.
Definition at line 3922 of file cr-parser.c. References CHECK_PARSING_STATUS, CHECK_PARSING_STATUS_ERR, CR_BAD_PARAM_ERROR, CR_OK, cr_parser_parse_declaration(), cr_parser_try_to_skip_spaces_and_comments(), cr_selector_ref(), cr_selector_unref(), cr_simple_sel_destroy(), CR_SYNTAX_ERROR, cr_term_ref(), cr_term_unref(), cr_tknzr_set_cur_pos(), CRStatus, ENSURE_PARSING_COND_ERR, PEEK_NEXT_CHAR, PRIVATE, READ_NEXT_CHAR, RECORD_INITIAL_POS, RULESET_PARSED_STATE, and TRY_PARSE_RULESET_STATE. Referenced by cr_parser_parse_media(), and cr_statement_ruleset_parse_from_buf(). |
|
Parses a statement as defined by the css core grammar in chapter 4.1 of the css2 spec. statement : ruleset | at-rule;
Definition at line 3857 of file cr-parser.c. References ATKEYWORD_TK, CHARSET_SYM_TK, CHECK_PARSING_STATUS, CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_tknzr_get_next_token(), cr_tknzr_set_cur_pos(), cr_tknzr_unget_token(), cr_token_destroy(), CRStatus, ENSURE_PARSING_COND, FONT_FACE_SYM_TK, IMPORT_SYM_TK, MEDIA_SYM_TK, PAGE_SYM_TK, PRIVATE, RECORD_INITIAL_POS, and _CRToken::type. Referenced by cr_statement_does_buf_parses_against_core(). |
|
Sets the SAC handler associated to the current instance of CRParser to the default SAC handler.
Definition at line 3573 of file cr-parser.c. References CR_BAD_PARAM_ERROR, cr_doc_handler_destroy(), cr_doc_handler_new(), cr_doc_handler_set_default_sac_handler(), CR_ERROR, CR_OK, cr_parser_set_sac_handler(), CRDocHandler, CRStatus, and PRIVATE. |
|
Sets a SAC document handler to the parser.
Definition at line 3531 of file cr-parser.c. References CR_BAD_PARAM_ERROR, cr_doc_handler_ref(), cr_doc_handler_unref(), CR_OK, and PRIVATE. Referenced by cr_parser_set_default_sac_handler(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_font_face_rule_parse_from_buf(), and cr_statement_ruleset_parse_from_buf(). |
|
Definition at line 5108 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_OK, cr_tknzr_ref(), cr_tknzr_unref(), and PRIVATE. Referenced by cr_parser_new(), cr_parser_parse_buf(), and cr_parser_parse_file(). |
|
Definition at line 3598 of file cr-parser.c. References CR_BAD_PARAM_ERROR, CR_OK, and PRIVATE. Referenced by cr_statement_does_buf_parses_against_core(). |
|
Same as cr_parser_try_to_skip_spaces() but this one skips spaces and comments.
Definition at line 689 of file cr-parser.c. References COMMENT_TK, CR_BAD_PARAM_ERROR, CR_ERROR, CR_OK, cr_tknzr_get_next_token(), cr_tknzr_unget_token(), cr_token_destroy(), CRStatus, PRIVATE, S_TK, and _CRToken::type. Referenced by cr_declaration_parse_from_buf(), cr_parser_parse_charset(), cr_parser_parse_declaration(), cr_parser_parse_expr(), cr_parser_parse_font_face(), cr_parser_parse_import(), cr_parser_parse_media(), cr_parser_parse_page(), cr_parser_parse_ruleset(), cr_statement_at_charset_rule_parse_from_buf(), cr_statement_at_import_rule_parse_from_buf(), cr_statement_at_media_rule_parse_from_buf(), cr_statement_at_page_rule_parse_from_buf(), cr_statement_font_face_rule_parse_from_buf(), cr_statement_ruleset_parse_from_buf(), and cr_term_parse_expression_from_buf(). |