245 static void parse(
int argc,
char *argv[]);
407 static void parse_file(std::string
const & argsfile);
static bool plaintext()
Are we to omit parsing for C/C++ comments?
static bool implicit()
Do we implicitly --undef all unconfigured symbols?
static bool _list_only_once_
Do we report only the first occurrence of listed items?
static bool list_only_once()
Do we report only the first occurrence of listed items?
static discard_policy & get_discard_policy()
Get the policy for discarding lines.
static int const includes_cmd_exclusions[]
Excluded options for the includes command.
static int const errors_cmd_exclusions[]
Excluded options for the errors command.
The --no-transients option.
static bool list_only_active()
Do we list items only from operative directives?
static bool eval_wip()
Do we evaluate constants in truth-functional contexts or treat them as unknowns.
static bool selected_symbols()
Is symbol reporting restricted to a selected set?
static bool line_directives()
Do we output #line directives?
static bool list_symbols_in_includes()
Do we list symbols in #include directives?
static std::string _backup_suffix_
Suffix for backup files.
static bool _list_only_inactive_
Do list items only from dropped lines?
static bool _list_local_includes_
Do we list local #include directives?
discard_policy
Symbolic constants denoting policies for discarding lines.
Manages coan's commandline arguments.
static bool list_only_inactive()
Do we list items only from inoperative directives?
static bool _list_only_active_
Do we list items only from kept lines?
static void parse(int argc, char *argv[])
Parse the commandline.
static bool list_local_includes()
Do we list local #include directives?
static bool _selected_symbols_
Is symbol reporting restricted to a selected set?
static void error_invalid_opt(struct cmd_option const *cmd, int bad_opt)
Raise a usage error when an option is invalid for the active command.
static int const lines_cmd_exclusions[]
Excluded options for the lines command.
static int const source_cmd_exclusions[]
Excluded options for the source command.
static int _cmd_line_files_
The number of input files/dirs specified on the commandline.
static unsigned _max_expansion_
Limit size for reported macro expansions.
static command_code get_command()
Get the operative coan command code.
static bool _recurse_
Recurse into directories?
static std::string _memfile_
Read whole ARGFILE into this storage.
static int const spin_cmd_exclusions[]
Excluded options for the spin command.
Comment out a contradicted directive.
static int const pragmas_cmd_exclusions[]
Excluded options for the pragmas command.
static int const symbols_cmd_exclusions[]
Excluded options for the symbols command.
static bool _got_opts_
Have we got all commandline options?
static bool complement()
Are we to output lines instead of dropping them and vice versa?
static void parse_file(std::string const &argsfile)
Parse commandline options from a file.
static bool explain_references()
Do we report the progressive expansion of symbol references?
static struct cmd_option commands[]
Array of structures specifying the valid coan commands.
option_codes
Symbolic constants for the options of all coan commands.
static void parse_command_args(int argc, char *argv[])
Parse the options to the active coan command.
static bool list_system_includes()
Do we list system #include directives?
static void finish()
Analyse the class global state after parsing the commandline.
static bool _implicit_
Do we implicitly --undef all unconfigured symbols?
Info structure for an option for getopt_long().
static bool got_opts()
Have we got all the options?
static bool list_at_most_once_per_file()
Say whether items are reportable at most once per file.
static void finalise_diagnostics()
Configure the final state of diagnostic output filtering.
static bool _expand_references_
Do we report the expansions of symbol references?
static bool _no_transients_
static struct option long_options[]
Array of structures specifying the valid options for all coan commands.
static char opts[]
Array in which we will assemble the shortopts arguments for getopts_long()
static bool list_once_per_file()
Do we report the listed items just once per input file?
static bool expand_references()
Do we report the expansions reported symbols?
static bool _eval_wip_
Do we evaluate constants in truth-functional contexts or treat them as unknowns?
Delete a contradicted directive.
The --max-expansion option.
static bool _keepgoing_
Continue to process input files after errors.
contradiction_policy
Symbolic constants denoting policies for handling contradictions.
static void config_diagnostics(std::string const &arg)
Configure diagnostic output.
static bool _list_system_includes_
Do we list system #include directives?
static bool progress_gagged()
Say whether progress messages are suppressed.
static bool list_location()
Do we report file and line numbers for listed items?
static bool _list_locate_
Do we report file and line numbers for listed items?
static bool recurse()
Do we recurse into directories?
static int const defs_cmd_exclusions[]
Excluded options for the defs command.
static bool _explain_references_
Do we report the derivation of symbol resolutions?
static std::vector< std::string > _argfile_argv_
Array of options read from --file ARGFILE
static discard_policy _discard_policy_
Policy for discarding lines.
static bool keep_going()
Shall we continue to process input files after errors?
static bool list_symbols_in_defs()
Do we list symbols in #define directives?
Info structure for a command option for get_command()
static bool diagnostic_gagged(unsigned reason)
Say whether a diagnostic reason code is gagged.
static bool no_transients()
static std::string _exec_path_
argv[0]
static bool replace()
Do we replace input files with output files?
static bool _list_symbols_in_lines_
Do we list symbols in #line directives?
Encapsulates a filesystem path.
static bool _plaintext_
Are we to omit parsing for comments?
static unsigned & max_expansion()
Is symbol reporting restricted to a selected set?
static bool _complement_
Are to output lines instead of dropping tem and vice versa?
static struct exclusion_list const cmd_exclusion_lists[]
Array of exclusion lists for the coan commands, indexed by command code.
static std::string const & exec_path()
Get our executable's full pathname, argv[0]
Replace a contradicted directive with an #error
static bool have_source_output()
Say whether the current comment generates source code.
static bool list_symbols_in_ifs()
Do we list items only from inoperative directives?
command_code
Sequential symbolic constants for coan commands.
static void parse_executable(char **argv)
Parse the full and short names of the executable.
static bool list_symbols_in_lines()
Do we list symbols in #line directives?
static std::string const & backup_suffix()
Get the file backup name suffix.
static bool _list_symbols_in_ifs_
Do we list symbols in `#if/else/endif directives?
static std::string const & prog_name()
Get the program's name.
static bool _list_symbols_in_undefs_
Do we list symbols in #undef directives?
static void add_files(std::string const &path)
Add files to the input dataset.
The --once-per-file option.
static int _diagnostic_filter_
Bitmask of diagnostic filters.
static void make_opts_list()
Assemble the shortopts arguments for getopts_long().
static bool _list_symbols_in_defs_
Do we list symbols in #define directives?
static struct cmd_option * _command_
Pointer to the details of the operative coan command.
Structure representing a set of options that are excluded by another option.
static bool _parsing_file_
Are we parsing an argsfile ?
static bool _list_once_per_file_
Do we report only the first occurrence per file of listed items?
static bool _line_directives_
Do we output #line directives?
static std::string _prog_name_
Filename element of exec_path
static int const directives_cmd_exclusions[]
Excluded options for the directives command.
static bool list_symbols_in_undefs()
Do we list symbols in #undef directives?
static bool _replace_
Do we replace input files with output files?
static bool _list_symbols_in_includes_
Do we list symbols in #include directives?