Logo Search packages:      
Sourcecode: inkscape version File versions

cr-parser.c File Reference


Detailed Description

The definition of the CRParser class.

Definition in file cr-parser.c.

#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.

Classes

struct  _CRParserError
struct  _CRParserPriv

Defines

#define BYTE(a_parser, a_offset, a_eof)   cr_tknzr_peek_byte2 (PRIVATE (a_this)->tknzr, a_offset, a_eof)
#define CHARS_TAB_SIZE   12
#define CHECK_PARSING_STATUS(status, is_exception)
#define CHECK_PARSING_STATUS_ERR(a_this, a_status, a_is_exception, a_err_msg, a_err_status)
#define ENSURE_PARSING_COND(condition)   if (! (condition)) {status = CR_PARSING_ERROR; goto error ;}
#define ENSURE_PARSING_COND_ERR(a_this, a_condition, a_err_msg, a_err_status)
#define GET_NEXT_TOKEN(a_this, a_token_ptr)
#define IS_NUM(a_char)   (((a_char) >= '0' && (a_char) <= '9')?TRUE:FALSE)
#define PEEK_BYTE(a_parser, a_offset, a_byte_ptr)
#define PEEK_NEXT_CHAR(a_this, a_to_char)
#define PRIVATE(obj)   ((obj)->priv)
#define READ_NEXT_BYTE(a_this, a_byte_ptr)
#define READ_NEXT_CHAR(a_this, a_to_char)
#define RECORD_CUR_BYTE_ADDR(a_this, a_addr)
#define RECORD_INITIAL_POS(a_this, a_pos)
#define SKIP_BYTES(a_this, a_nb_bytes)
#define SKIP_CHARS(a_parser, a_nb_chars)

Typedefs

typedef struct _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

static enum CRStatus cr_parser_clear_errors (CRParser *a_this)
void cr_parser_destroy (CRParser *a_this)
static enum CRStatus cr_parser_dump_err_stack (CRParser *a_this, gboolean a_clear_errs)
static void cr_parser_error_destroy (CRParserError *a_this)
static void cr_parser_error_dump (CRParserError *a_this)
static CRParserErrorcr_parser_error_new (const guchar *a_msg, enum CRStatus)
static void cr_parser_error_set_msg (CRParserError *a_this, const guchar *a_msg)
static void cr_parser_error_set_pos (CRParserError *a_this, glong a_line, glong a_column, glong a_byte_num)
static void cr_parser_error_set_status (CRParserError *a_this, enum CRStatus a_status)
enum CRStatus cr_parser_get_parsing_location (CRParser *a_this, CRParsingLocation *a_loc)
enum CRStatus cr_parser_get_sac_handler (CRParser *a_this, CRDocHandler **a_handler)
enum CRStatus cr_parser_get_tknzr (CRParser *a_this, CRTknzr **a_tknzr)
enum CRStatus cr_parser_get_use_core_grammar (CRParser *a_this, gboolean *a_use_core_grammar)
CRParsercr_parser_new (CRTknzr *a_tknzr)
CRParsercr_parser_new_from_buf (guchar *a_buf, gulong a_len, enum CREncoding a_enc, gboolean a_free_buf)
CRParsercr_parser_new_from_file (const guchar *a_file_uri, enum CREncoding a_enc)
CRParsercr_parser_new_from_input (CRInput *a_input)
enum CRStatus cr_parser_parse (CRParser *a_this)
static enum CRStatus cr_parser_parse_any_core (CRParser *a_this)
static enum CRStatus cr_parser_parse_atrule_core (CRParser *a_this)
static enum CRStatus cr_parser_parse_attribute_selector (CRParser *a_this, CRAttrSel **a_sel)
static enum CRStatus cr_parser_parse_block_core (CRParser *a_this)
enum CRStatus cr_parser_parse_buf (CRParser *a_this, const guchar *a_buf, gulong a_len, enum CREncoding a_enc)
enum CRStatus cr_parser_parse_charset (CRParser *a_this, CRString **a_value, CRParsingLocation *a_charset_sym_location)
enum CRStatus cr_parser_parse_declaration (CRParser *a_this, CRString **a_property, CRTerm **a_expr, gboolean *a_important)
static enum CRStatus cr_parser_parse_declaration_core (CRParser *a_this)
enum CRStatus cr_parser_parse_expr (CRParser *a_this, CRTerm **a_expr)
enum CRStatus cr_parser_parse_file (CRParser *a_this, const guchar *a_file_uri, enum CREncoding a_enc)
enum CRStatus cr_parser_parse_font_face (CRParser *a_this)
static enum CRStatus cr_parser_parse_function (CRParser *a_this, CRString **a_func_name, CRTerm **a_expr)
static enum CRStatus cr_parser_parse_ident (CRParser *a_this, CRString **a_str)
enum CRStatus cr_parser_parse_import (CRParser *a_this, GList **a_media_list, CRString **a_import_string, CRParsingLocation *a_location)
enum CRStatus cr_parser_parse_media (CRParser *a_this)
enum CRStatus cr_parser_parse_page (CRParser *a_this)
enum CRStatus cr_parser_parse_prio (CRParser *a_this, CRString **a_prio)
static enum CRStatus cr_parser_parse_property (CRParser *a_this, CRString **a_property)
enum CRStatus cr_parser_parse_ruleset (CRParser *a_this)
static enum CRStatus cr_parser_parse_ruleset_core (CRParser *a_this)
static enum CRStatus cr_parser_parse_selector (CRParser *a_this, CRSelector **a_selector)
static enum CRStatus cr_parser_parse_selector_core (CRParser *a_this)
static enum CRStatus cr_parser_parse_simple_selector (CRParser *a_this, CRSimpleSel **a_sel)
static enum CRStatus cr_parser_parse_simple_sels (CRParser *a_this, CRSimpleSel **a_sel)
enum CRStatus cr_parser_parse_statement_core (CRParser *a_this)
static enum CRStatus cr_parser_parse_string (CRParser *a_this, CRString **a_str)
static enum CRStatus cr_parser_parse_stylesheet (CRParser *a_this)
static enum CRStatus cr_parser_parse_stylesheet_core (CRParser *a_this)
enum CRStatus cr_parser_parse_term (CRParser *a_this, CRTerm **a_term)
static enum CRStatus cr_parser_parse_uri (CRParser *a_this, CRString **a_str)
static enum CRStatus cr_parser_parse_value_core (CRParser *a_this)
static enum CRStatus cr_parser_push_error (CRParser *a_this, const guchar *a_msg, enum CRStatus a_status)
enum CRStatus cr_parser_set_default_sac_handler (CRParser *a_this)
enum CRStatus cr_parser_set_sac_handler (CRParser *a_this, CRDocHandler *a_handler)
enum CRStatus cr_parser_set_tknzr (CRParser *a_this, CRTknzr *a_tknzr)
enum CRStatus cr_parser_set_use_core_grammar (CRParser *a_this, gboolean a_use_core_grammar)
enum CRStatus cr_parser_try_to_skip_spaces_and_comments (CRParser *a_this)


Generated by  Doxygen 1.6.0   Back to index