coan 4.2.4
|
![]() |
Modules | |
Macro-generated code | |
Files | |
file | if_control.c |
file | if_control.h |
Enumerations | |
enum | if_state_t { IF_STATE_OUTSIDE, IF_STATE_FALSE_PREFIX, IF_STATE_TRUE_PREFIX, IF_STATE_PASS_MIDDLE, IF_STATE_FALSE_MIDDLE, IF_STATE_TRUE_MIDDLE, IF_STATE_PASS_ELSE, IF_STATE_FALSE_ELSE, IF_STATE_TRUE_ELSE, IF_STATE_FALSE_TRAILER, IF_STATE_COUNT } |
Functions | |
void | transition (line_type_t linetype) |
bool | dead_line (void) |
bool | was_unconditional_line (void) |
bool | is_unconditional_line (void) |
size_t | if_start_line (void) |
size_t | if_depth (void) |
if_state_t | if_state (void) |
void | if_control_toplevel (void) |
enum if_state_t |
Enumeration of the if-control states
Definition at line 57 of file if_control.h.
bool dead_line | ( | void | ) |
Is the current line rejected?
Definition at line 408 of file if_control.c.
References GET_STATE, if_depth(), IF_STATE_FALSE_ELSE, IF_STATE_FALSE_MIDDLE, IF_STATE_FALSE_PREFIX, and IF_STATE_FALSE_TRAILER.
Referenced by dropping_line().
void if_control_toplevel | ( | void | ) |
Reset the depth of if-nesting to 0
Definition at line 456 of file if_control.c.
References SET_STATE.
Referenced by exit_diagnostics(), and node_proc().
size_t if_depth | ( | void | ) |
Return the current depth of if-nesting
Definition at line 444 of file if_control.c.
References GET_STATE.
Referenced by dead_line(), debug(), if_start_line(), if_state(), is_unconditional_line(), set_state(), transition(), vreport(), and was_unconditional_line().
size_t if_start_line | ( | void | ) |
For debug(), return the starting line number of the current hash-if-sequence.
Definition at line 450 of file if_control.c.
References GET_STATE, and if_depth().
Referenced by vreport().
if_state_t if_state | ( | void | ) |
Return the current if-state
Definition at line 438 of file if_control.c.
References GET_STATE, and if_depth().
Referenced by if_state_name().
bool is_unconditional_line | ( | void | ) |
Is the current line outside any hash-if-scope or in the scope of a satisfied hash-if-condition.
Definition at line 427 of file if_control.c.
References GET_STATE, if_depth(), IF_STATE_OUTSIDE, IF_STATE_TRUE_ELSE, IF_STATE_TRUE_MIDDLE, and IF_STATE_TRUE_PREFIX.
Referenced by eligible_line(), eval_line(), insert_pending_contradiction(), symbol_define(), and symbol_undefine().
void transition | ( | line_type_t | linetype | ) |
Transition the if-control state given an evaluated line type.
linetype | The linetype of the last evaluated input line. |
The function advances a state-machine whose parameters are the current input linetype and the current if-control state. The transition performs the appropriate action to despatch the line just evaluated and sets a new if-state.
Definition at line 401 of file if_control.c.
References GET_STATE, if_depth(), and transition_table.
Referenced by eval_line(), and node_proc().
bool was_unconditional_line | ( | void | ) |
Is the current line outside any hash-if-scope?
Definition at line 419 of file if_control.c.
References GET_STATE, if_depth(), and IF_STATE_OUTSIDE.
Referenced by eval_line().