303 size_t deep = ++
depth;
static void orphan_else()
Diagnose an input orphan #else on cerr
static parsed_line & cur_line()
Get a reference to the current output line.
We have an else after a true state.
static void print()
Print the current output line.
static transition_t *const transition_table[IF_STATE_COUNT][LT_SENTINEL]
The #if-state transition table.
static void Pendif()
State transition.
static void Selse()
State transition.
error_msg< 2 > error_orphan_else
Report an orphan #else was found in input.
We have a false elif after a pass state.
static void Melse()
State transition.
static void early_eof()
Diagnose unexpected end of input on cerr
static bool is_unconditional_line()
Is the current line outside any #if scope or in the scope of a satisfied #if?
static void Dfalse()
State transition.
static void flush_all()
Emit any queued diagnostics.
static bool dead_line()
Is the current line rejected?
error_msg< 1 > error_orphan_elif
Report an orphan #elif was found in input.
static void Delse()
State transition.
static void set_state(if_state is)
Set the #if-state at the current nesting depth.
static size_t if_start_lines[MAXDEPTH]
Array of start lines of nested #if-directives.
static size_t if_depth()
Get the current depth of #if-nesting.
All elifs after a true are false.
error_msg< 4 > error_eof_too_soon
Report unexpected end of input.
static void Melif()
State transition.
unsigned num() const
Get the greatest source line number spanned by this line.
error_msg< 3 > error_orphan_endif
Report an orphan #endif was found in input.
The first non-false (el)if is true.
static if_state state()
Get the current #if-state.
We have a true elif after a pass state.
We have an else after only false states.
error_msg< 10 > error_too_deep
Report that #if nesting exceeds maxdepth in input.
static void Delif()
State transition.
static void Pelif()
State transition.
void( transition_t)
Type of #if-state transition functions.
The tag class is inserted in a diagnostic_base to tell it to emit itself.
static void orphan_endif()
Diagnose an input orphan #endif on cerr
static void Strue()
State transition.
static void drop()
Drop the current output line.
static void Mtrue()
State transition.
The first non-false (el)if is insoluble.
if_state
symbolic constants denoting the if-control states.
static if_state ifstate[MAXDEPTH]
Array of states of nested #if-directives.
static void Mpass()
State transition.
static void Dendif()
State transition.
static size_t depth
Current depth of #if-nesting.
void keyword_edit()
Replace the directive in the line.
static void Sfalse()
State transition.
line_type
Enumeration of types of input lines.
static void Pelse()
State transition.
static void orphan_elif()
Diagnose an input orphan #elif on cerr
We have a false if followed by false elif
static const unsigned MAXDEPTH
Maximum depth of hash-if nesting.
We have an else after a pass state.
static void transition(line_type linetype)
Transition the if-control state given an evaluated line type.
static void nest()
Increment the #if-nesting depth.