coan 4.2.4
The Directives Tally component internals.
Collaboration diagram for The Directives Tally component internals.:

Data Structures

struct  directive

Modules

 Macro-generated code

Files

file  directives_tally.c

Typedefs

typedef struct directive directive_t

Functions

static canonical_string_const_h directive_text_lookup (canonical_string_const_h cl, directive_type_t directive_type)
static void directive_text_add (canonical_string_const_h cl, directive_type_t directive_type)

Variables

static directive_t const directives_dict []

Typedef Documentation

typedef struct directive directive_t

Structure representing a preprocessor directive


Function Documentation

static void directive_text_add ( canonical_string_const_h  cl,
directive_type_t  directive_type 
) [static]

Add a directive argument in canonical_string_h form to the directives table.

Parameters:
clThe canonical_string_h to add.
directive_typeThe type of directive for which cl is an argument.

Definition at line 143 of file directives_tally.c.

References GET_STATE, ptr_set_insert(), and ptr_vector_at().

Referenced by directive_tally().

Here is the call graph for this function:

static canonical_string_const_h directive_text_lookup ( canonical_string_const_h  cl,
directive_type_t  directive_type 
) [static]

Lookup the directives table for a directive argument.

Parameters:
clA canonical string containing the sirective argument to look up.
directive_typeThe type of directive in which arg was read.
Returns:
If a directive argument with type directive_type that matches cl is found in the table then the matched canonical_string_h is returned, otherwise NULL.

Definition at line 117 of file directives_tally.c.

References canonical_string_compare(), canonical_string_copy(), canonical_string_dispose(), canonical_string_text(), GET_STATE, ptr_set_new(), ptr_set_search(), ptr_vector_append(), ptr_vector_at(), and ptr_vector_count().

Referenced by directive_tally().

Here is the call graph for this function:


Variable Documentation

directive_t const directives_dict[] [static]
Initial value:
 {
    {   HASH_IF,                 "if"   },
    {   HASH_IFDEF,              "ifdef"   },
    {   HASH_IFNDEF,     "ifndef"   },
    {   HASH_ELSE,               "else"   },
    {   HASH_ELIF,               "elif"   },
    {   HASH_ENDIF,              "endif"   },
    {   HASH_DEFINE,     "define"   },
    {   HASH_UNDEF,              "undef"   },
    {   HASH_INCLUDE,    "include"   },
    {   HASH_PRAGMA,     "pragma"   },
    {   HASH_ERROR,              "error"   },
    {   HASH_UNKNOWN, NULL }
}

Lookup table of preprocessor directives

Definition at line 91 of file directives_tally.c.

Referenced by get_directive_keyword(), and get_directive_type().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines