#include "ellipsis-directive.h"
#include "ellipsis-include.h"
#include "ellipsis-filter.h"
#include "token/ellipsis-tlist.h"
#include "ellipsis-macros.h"
#include "ellipsis-infra.h"
#include "ellipsis-expression.h"
#include "ellipsis-tokenize.h"
#include "ellipsis-pragma.h"
#include "ellipsis-special-directive_define.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
Macros | |
#define | ELLIPSIS_CONTRACT(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...) |
#define | ELLIPSIS_CONTRACT_CHECK_STATIC(CTYPE, COND, CSTR, ...) |
#define | ELLIPSIS_CONTRACT_ICE_OR_TRUE(...) |
#define | ELLIPSIS_CONTRACT_IMPL(COUNT, COND, ACTION, VERB, CSTR, CTYPE, ...) |
#define | ELLIPSIS_CONTRACT_VIOLATION(COUNT, VERB, CTYPE, CSTR, ...) |
#define | ELLIPSIS_STR32_LITERAL ELLIPSIS_STR32_LITERAL_LOCAL |
#define | ELLIPSIS_STR8_LITERAL ELLIPSIS_STR8_LITERAL_LOCAL |
#define | ELLIPSIS_TEST_ICE(...) (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr) |
#define | ELLIPSIS_TO_VOIDS(...) ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__)))) |
#define | STRINGIFY(...) STRINGIFY_(__VA_ARGS__) |
#define | STRINGIFY_(...) #__VA_ARGS__ |
Typedefs | |
typedef struct ellipsis‿contracts‿is_ice | ellipsis‿contracts‿is_ice |
Variables | |
thread_local bool volatile | ellipsis‿contracts‿ignore‿dynamic |
thread_local bool volatile | ellipsis‿contracts‿proceed‿dynamic |
thread_local bool volatile | ellipsis‿contracts‿verbose‿dynamic |
ellipsis‿str32 const *const | ellipsis‿directive‿marker = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE") |
ellipsis‿str32 const *const | ellipsis‿directive‿marker_return = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE_RETURN") |
ellipsis‿str32 const *const | ellipsis‿directive‿marker_start = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE_START") |
#define ELLIPSIS_CONTRACT | ( | COUNT, | |
COND, | |||
ACTION, | |||
VERB, | |||
CSTR, | |||
CTYPE, | |||
... | |||
) |
#define ELLIPSIS_CONTRACT_CHECK_STATIC | ( | CTYPE, | |
COND, | |||
CSTR, | |||
... | |||
) |
#define ELLIPSIS_CONTRACT_ICE_OR_TRUE | ( | ... | ) |
#define ELLIPSIS_CONTRACT_IMPL | ( | COUNT, | |
COND, | |||
ACTION, | |||
VERB, | |||
CSTR, | |||
CTYPE, | |||
... | |||
) |
#define ELLIPSIS_CONTRACT_VIOLATION | ( | COUNT, | |
VERB, | |||
CTYPE, | |||
CSTR, | |||
... | |||
) |
#define ELLIPSIS_STR32_LITERAL ELLIPSIS_STR32_LITERAL_LOCAL |
#define ELLIPSIS_STR8_LITERAL ELLIPSIS_STR8_LITERAL_LOCAL |
#define ELLIPSIS_TEST_ICE | ( | ... | ) | (false ? ELLIPSIS_TO_VOIDS(__VA_ARGS__) : (ellipsis‿contracts‿is_ice*)nullptr) |
#define ELLIPSIS_TO_VOIDS | ( | ... | ) | ((void*)((uintptr_t)((__VA_ARGS__)-(__VA_ARGS__)))) |
#define STRINGIFY | ( | ... | ) | STRINGIFY_(__VA_ARGS__) |
#define STRINGIFY_ | ( | ... | ) | #__VA_ARGS__ |
typedef struct ellipsis‿contracts‿is_ice ellipsis‿contracts‿is_ice |
|
static |
References ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿top(), ELLIPSIS_CONTRACT, names, nominal, and punct.
Referenced by ellipsis‿directive‿define_process().
void ellipsis‿directive‿define | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list * | unbind | ||
) |
References ellipsis‿directive‿define_process(), ellipsis‿macros‿insert(), and ellipsis‿token::payload.
Referenced by ellipsis‿directive‿environment(), ellipsis‿filter(), and ellipsis‿macros‿cb‿bind().
ellipsis‿token * ellipsis‿directive‿define_process | ( | ellipsis‿token‿list | hpl[static 1], |
ellipsis‿token‿list * | unbind | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿token::cat, collect_names(), ellipsis‿token::contents, directive, ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿first(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿push(), ellipsis‿token‿list‿top(), ELLIPSIS_DIAGNOSTIC, first, frozen, ellipsis‿token::is_functional, is_variable(), macro, mark_parameters(), names, nominal, ellipsis‿token::payload, and ellipsis‿token::space.
Referenced by ellipsis‿c_punctuators‿_Once‿init‿user(), ellipsis‿directive‿define(), ellipsis‿filter(), ellipsis‿macros‿_Once‿init‿user(), and main().
void ellipsis‿directive‿embed | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list | in[static 1], | ||
ellipsis‿token‿list | out[static 1] | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿embed_common(), ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿token‿list‿destroy(), ELLIPSIS_BUG, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
|
static |
start inner defer anchor at level 1
defer needs braces and a semicolon
defer needs braces and a semicolon
defer needs braces and a semicolon
start inner defer anchor at level 2
defer needs braces and a semicolon
start inner defer anchor at level 3
defer needs braces and a semicolon
start inner defer anchor at level 4
defer needs braces and a semicolon
end inner defer anchor, level 4
end inner defer anchor, level 3
start inner defer anchor at level 3
defer needs braces and a semicolon
end inner defer anchor, level 3
end inner defer anchor, level 2
end inner defer anchor, level 1
References ellipsis‿str32::array, ellipsis‿str8::array, base64, ellipsis‿special::cat, ellipsis‿token::cat, ellipsis‿special::closer8, code, codeblock, comment, ellipsis‿token::contents, ellipsis‿token::data, ellipsis‿directive‿mark_line(), ellipsis‿include‿dat_dir(), ellipsis‿include‿emb_dir(), ellipsis‿include‿embed(), ellipsis‿include‿fopen(), ellipsis‿include‿process(), ellipsis‿include‿repair(), ellipsis‿infra‿down(), ellipsis‿macros‿repair(), ellipsis‿str32‿construct(), ellipsis‿str32‿delete(), ellipsis‿str32‿dup, ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿push(), ellipsis‿token‿list‿top(), ellipsis‿token‿what‿binary, ellipsis‿token‿what‿else, ELLIPSIS_CONTRACT, ellipsis‿token::is_what, last, ellipsis‿str32::length, ellipsis‿str8::length, ellipsis‿token::next, ellipsis‿token::payload, punctuator, special, ellipsis‿special::starter8, string, tokenizer_find, and verbatim.
Referenced by ellipsis‿directive‿embed(), and ellipsis‿directive‿embed_resource().
void ellipsis‿directive‿embed_resource | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list | in[static 1], | ||
ellipsis‿token‿list | out[static 1] | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿embed_common(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿environment | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿token::cat, ellipsis‿token::contents, ellipsis‿directive‿define(), ellipsis‿special‿directive_define‿find, ellipsis‿str32‿dup, ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿first(), ellipsis‿token‿list‿pop(), ellipsis‿tokenize‿string(), ELLIPSIS_CONTRACT, ellipsis‿token::is_undefinable, nominal, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿error | ( | ellipsis‿token | h[static 1] | ) |
References ellipsis‿str32‿fputs(), ellipsis‿token‿list‿pop(), ELLIPSIS_ERROR, and ellipsis‿token::payload.
Referenced by ellipsis‿filter(), and ellipsis‿macros‿cb‿error().
void ellipsis‿directive‿expand | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿str32::array, comment, ellipsis‿token::contents, ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿str32‿delete(), ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿pop(), ELLIPSIS_BUG, ELLIPSIS_CONTRACT, ellipsis‿str32::length, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿gather | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿token::cat, ellipsis‿token::contents, ellipsis‿directive‿macro_get(), ellipsis‿macros‿find(), ellipsis‿macros‿insert(), ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿open(), ellipsis‿token‿list‿top(), ELLIPSIS_CONTRACT, ELLIPSIS_WARNING, ellipsis‿token::is_functional, macro, nominal, ellipsis‿token::payload, and ellipsis‿token::value.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿include | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list | in[static 1], | ||
ellipsis‿token‿list *restrict | out | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿include_common(), ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿token‿list‿close(), ELLIPSIS_BUG, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
|
static |
start inner defer anchor at level 1
defer needs braces and a semicolon
defer needs braces and a semicolon
defer needs braces and a semicolon
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿str32::array, ellipsis‿token::cat, comment, ellipsis‿token::contents, directive, ellipsis‿directive‿marker_return, ellipsis‿directive‿marker_start, ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿include‿app_dir(), ellipsis‿include‿fopen(), ellipsis‿include‿imp_dir(), ellipsis‿include‿process(), ellipsis‿include‿repair(), ellipsis‿infra‿down(), ellipsis‿infra‿fileno(), ellipsis‿infra‿filter_file, ellipsis‿infra‿filter_line, ellipsis‿infra‿filter_lineno, ellipsis‿macros‿paren‿get(), ellipsis‿macros‿paren‿set(), ellipsis‿macros‿repair(), ellipsis‿str32‿delete(), ellipsis‿str32‿dup, ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿open(), ellipsis‿token‿list‿pop(), ellipsis‿tokenize(), ELLIPSIS_CONTRACT, ELLIPSIS_ERROR, ELLIPSIS_WARNING, last, ellipsis‿str32::length, nominal, and ellipsis‿token::payload.
Referenced by ellipsis‿directive‿include(), ellipsis‿directive‿include_next(), and ellipsis‿directive‿include_source().
void ellipsis‿directive‿include_directives | ( | ellipsis‿token | h[restrict static 1], |
ellipsis‿token‿list | in[restrict static 1] | ||
) |
References ellipsis‿directive‿include_source().
Referenced by ellipsis‿filter().
void ellipsis‿directive‿include_next | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list | in[static 1], | ||
ellipsis‿token‿list *restrict | out | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿include_common(), ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿token‿list‿close(), ELLIPSIS_BUG, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿include_source | ( | ellipsis‿token | h[restrict static 1], |
ellipsis‿token‿list | in[restrict static 1], | ||
ellipsis‿token‿list *restrict | out | ||
) |
References ellipsis‿directive‿include_common(), ellipsis‿token‿list‿close(), and ellipsis‿token‿list‿flush().
Referenced by ellipsis‿directive‿include_directives(), and ellipsis‿filter().
void ellipsis‿directive‿line | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿line_common(), ellipsis‿filter(), ellipsis‿if_case‿open, ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ELLIPSIS_BUG, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
|
static |
References ellipsis‿str32::array, ellipsis‿token::cat, comment, ellipsis‿token::contents, ellipsis‿expression‿make_integer(), ellipsis‿infra‿filter_file, ellipsis‿infra‿filter_line, ellipsis‿infra‿filter_lineno, ellipsis‿infra‿find(), ellipsis‿str32‿delete(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿pop(), ELLIPSIS_CONTRACT, ELLIPSIS_ERROR, exp_unsigned, ellipsis‿str32::length, ellipsis‿token::next, numeral, string, and ellipsis‿token::value.
Referenced by ellipsis‿directive‿line(), and ellipsis‿directive‿linenumber().
void ellipsis‿directive‿linenumber | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿directive‿line_common(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
|
static |
References ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿top(), ELLIPSIS_WARNING, ellipsis‿token::is_functional, ellipsis‿token::payload, and ellipsis‿token::value.
Referenced by ellipsis‿directive‿gather(), ellipsis‿directive‿move(), and ellipsis‿directive‿scatter().
|
static |
References directive, ellipsis‿infra‿filter_file, ellipsis‿infra‿filter_line, ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), exp_unsigned, and nominal.
Referenced by ellipsis‿directive‿embed_common().
void ellipsis‿directive‿move | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
defer needs braces and a semicolon
start inner defer anchor at level 2
defer needs braces and a semicolon
end inner defer anchor, level 2
end inner defer anchor, level 1
References ellipsis‿token::cat, ellipsis‿token::contents, ellipsis‿directive‿macro_get(), ellipsis‿macros‿find(), ellipsis‿macros‿insert(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿last(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿top(), ELLIPSIS_CONTRACT, last, macro, nominal, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿pragma | ( | ellipsis‿token | h[static 1], |
ellipsis‿token‿list *restrict | in, | ||
ellipsis‿token‿list *restrict | out | ||
) |
start inner defer anchor at level 1
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿token::back_in, ellipsis‿token::callback, ellipsis‿token::contents, ellipsis‿pragma‿find(), ellipsis‿pragma‿forward(), ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿push(), ellipsis‿token‿what‿callback, ELLIPSIS_CONTRACT, ELLIPSIS_WARNING, ellipsis‿token::is_what, ellipsis‿token::next, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿scatter | ( | ellipsis‿token | h[static 1] | ) |
start inner defer anchor at level 1
defer needs braces and a semicolon
start inner defer anchor at level 2
defer needs braces and a semicolon
end inner defer anchor, level 2
end inner defer anchor, level 1
References ellipsis‿directive‿macro_get(), ellipsis‿macros‿find(), ellipsis‿macros‿insert(), ellipsis‿str32‿dup, ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿last(), ellipsis‿token‿list‿scatter(), ELLIPSIS_BUG, ELLIPSIS_CONTRACT, ELLIPSIS_WARNING, last, macro, nominal, and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿undef | ( | ellipsis‿token | h[static 1] | ) |
References ellipsis‿token::contents, ellipsis‿macros‿remove(), ellipsis‿token‿list‿pop(), and ellipsis‿token::payload.
Referenced by ellipsis‿filter().
void ellipsis‿directive‿warning | ( | ellipsis‿token | h[static 1] | ) |
References ellipsis‿str32‿fputs(), ellipsis‿token‿list‿pop(), ELLIPSIS_WARNING, and ellipsis‿token::payload.
Referenced by ellipsis‿filter(), and ellipsis‿macros‿cb‿warning().
|
static |
start inner defer anchor at level 1
defer needs braces and a semicolon
defer needs braces and a semicolon
end inner defer anchor, level 1
References ellipsis‿str32‿compare(), ellipsis‿str32‿delete(), ellipsis‿token‿list‿all(), ellipsis‿token‿list‿append(), ellipsis‿token‿list‿close(), ellipsis‿token‿list‿collect_call(), ellipsis‿token‿list‿destroy(), ellipsis‿token‿list‿first(), ellipsis‿token‿list‿flush(), ellipsis‿token‿list‿open(), ellipsis‿token‿list‿pop(), ellipsis‿token‿list‿top(), ELLIPSIS_CONTRACT, ELLIPSIS_WARNING, names, ellipsis‿token::next, nominal, parameter, ellipsis‿token::payload, and stringifier.
Referenced by ellipsis‿directive‿define_process().
|
extern |
|
extern |
|
extern |
ellipsis‿str32 const* const ellipsis‿directive‿marker = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE") |
Referenced by ellipsis‿filter().
ellipsis‿str32 const* const ellipsis‿directive‿marker_return = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE_RETURN") |
Referenced by ellipsis‿directive‿include_common().
ellipsis‿str32 const* const ellipsis‿directive‿marker_start = &ELLIPSIS_STR32_STRING_LITERAL("ELLIPSIS_MARK_LINE_START") |
Referenced by ellipsis‿directive‿include_common(), and ellipsis‿tokenize‿thrd().