Bash++
Bash++ compiler internal documentation
Classes | Functions | Variables
parse_arguments.h File Reference
#include <iostream>
#include <string>
#include <cstring>
#include <vector>
#include <optional>
#include <filesystem>
#include <memory>
#include <unistd.h>
#include <algorithm>
#include <include/FixedString.h>
#include <include/BashVersion.h>
#include <include/xgetopt.h>
#include <version.h>
#include <updated_year.h>
Include dependency graph for parse_arguments.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Arguments
 Represents the parsed command-line arguments given to the compiler. More...
 

Functions

Arguments parse_arguments (int argc, char *argv[])
 

Variables

constexpr const char * program_name = "Bash++"
 
constexpr const char * copyright
 
constexpr const char * help_intro
 
constexpr XGetOpt::OptionParser< XGetOpt::Option< 'o', "output", "Specify output file (default: run on exit)", XGetOpt::RequiredArgument >, XGetOpt::Option< 'b', "target-bash", "Target Bash version (default: 5.2)", XGetOpt::RequiredArgument >, XGetOpt::Option< 's', "no-warnings", "Suppress warnings", XGetOpt::NoArgument >, XGetOpt::Option< 'I', "include", "Add directory to include path", XGetOpt::RequiredArgument >, XGetOpt::Option< 't', "tokens", "Display tokens from lexer (do not compile program)", XGetOpt::NoArgument >, XGetOpt::Option< 'p', "parse-tree", "Display parse tree (do not compile program)", XGetOpt::NoArgument >, XGetOpt::Option< 'v', "version", "Display version information and exit", XGetOpt::NoArgument >, XGetOpt::Option< 'h', "help", "Display this help message and exit", XGetOpt::NoArgument > > OptionParser
 

Function Documentation

◆ parse_arguments()

Arguments parse_arguments ( int  argc,
char *  argv[] 
)
inline

Variable Documentation

◆ copyright

constexpr const char* copyright
constexpr
Initial value:
= "Copyright (C) 2024-"
" Andrew S. Rightenburg\n\n"
"This program is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 3 of the License, or\n"
"(at your option) any later version.\n\n"
"This program is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n\n"
"You should have received a copy of the GNU General Public License\n"
"along with this program. If not, see http://www.gnu.org/licenses/.\n"
#define bpp_compiler_updated_year
Definition updated_year.h:1

◆ help_intro

constexpr const char* help_intro
constexpr
Initial value:
=
"Usage: bpp [options] [file] ...\n"
"If no file is specified, read from stdin\n"
"All arguments after the file are passed to the compiled program\n"
"Options:\n"

◆ OptionParser

constexpr XGetOpt::OptionParser< XGetOpt::Option<'o', "output", "Specify output file (default: run on exit)", XGetOpt::RequiredArgument>, XGetOpt::Option<'b', "target-bash", "Target Bash version (default: 5.2)", XGetOpt::RequiredArgument>, XGetOpt::Option<'s', "no-warnings", "Suppress warnings", XGetOpt::NoArgument>, XGetOpt::Option<'I', "include", "Add directory to include path", XGetOpt::RequiredArgument>, XGetOpt::Option<'t', "tokens", "Display tokens from lexer (do not compile program)", XGetOpt::NoArgument>, XGetOpt::Option<'p', "parse-tree", "Display parse tree (do not compile program)", XGetOpt::NoArgument>, XGetOpt::Option<'v', "version", "Display version information and exit", XGetOpt::NoArgument>, XGetOpt::Option<'h', "help", "Display this help message and exit", XGetOpt::NoArgument>> OptionParser
constexpr

◆ program_name

constexpr const char* program_name = "Bash++"
constexpr

Copyright (C) 2025 Andrew S. Rightenburg Bash++: Bash with classes Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later)