Mescal
|
Keywords and commands used in the shell. More...
Go to the source code of this file.
Classes | |
struct | string_chain |
Chain of strings in a command. More... | |
struct | com_parameters |
Parameters of a command. More... | |
struct | com_command |
A command. More... | |
Enumerations | |
enum | com_keyword { KY_INTERFACE , KY_SAVESESSION , KY_LOADSESSION , KY_OPEN , KY_SAVE , KY_DELETE , KY_CLEAR , KY_SORT , KY_INFO , KY_EXSEARCH , KY_EXINIT , KY_EXINITFP , KY_EXINITNEG , KY_EXCONTINUE , KY_EXRETRIEVE , KY_EXALL , KY_NEXALL , KY_FPEXALL , KY_BUGSEARCH , KY_INSIDE , KY_OUTSIDE , KY_LIST , KY_AUTOMATA , KY_MORPHISMS , KY_GROUPS , KY_REGEXPS , KY_RECDEFS , KY_TOGGLE , KY_TOGGLEMEMB , KY_TIMESTATS , KY_LATEX , KY_MINI , KY_THOMPSON , KY_GLUSHKOV , KY_HOPCROFT , KY_BMCK , KY_INTERSEC , KY_ELIMEPS , KY_BRZOZO , KY_KLEENE , KY_MIRROR , KY_CONCAT , KY_RESET , KY_TRIMNFA , KY_UNION , KY_RUN , KY_RNFA , KY_RDFA , KY_INVTRANS , KY_DYCKTRANS , KY_RECDEF , KY_PERMUT , KY_COUNTER , KY_AUTODA , KY_CYCLETRIV , KY_DETERMINIZE , KY_COMPLEMENT , KY_NOSIMC , KY_FOLDING , KY_DIRECTPRODUCT , KY_SYNT , KY_RCAY , KY_LCAY , KY_MULT , KY_IDEMS , KY_ORDER , KY_IMAGE , KY_GKER , KY_MKER , KY_AKER , KY_ORB , KY_COMMUT , KY_LETTERIND , KY_RECINIT , KY_SEPAR , KY_MEMB , KY_CHIERA , KY_NAVHIERA , KY_NHIERA , KY_FPHIERA , KY_RSIZE , KY_LSIZE , KY_JSIZE , KY_HSIZE , KY_RNUM , KY_LNUM , KY_JNUM , KY_HNUM , KY_RMAXSIZE , KY_LMAXSIZE , KY_JMAXSIZE , KY_HMAXSIZE , KY_NOT , KY_FILTER , KY_NOSMALLCOUNTER , KY_COMEND , KY_HTGEN , KY_AT , KY_ATT , KY_SF , KY_UL , KY_TLX , KY_PPT , KY_PT , KY_LT , KY_LTT , KY_ST , KY_DD , KY_MOD , KY_MODP , KY_AMT , KY_AMTP , KY_GR , KY_GRP , KY_REG , KY_EMPTY , KY_POL , KY_POL2 , KY_BPOL , KY_BPOL2 , KY_UBPOL , KY_UBPOL2 , KY_UPOL , KY_LPOL , KY_RPOL , KY_MPOL , KY_TLC , KY_TLC2 , KY_FLC , KY_FLC2 , KY_PLC , KY_PLC2 , KY_JORB , KY_KNAST , KY_NULL } |
The keywords. | |
enum | com_type { CMT_RAW , CMT_IND , CMT_KEY } |
The two kinds of commands. More... | |
Functions | |
void | keywords_add_key (com_keyword key, const char *str) |
Initialization of a single keyword. | |
void | keywords_add_all_keys (void) |
Initialization of all the keywords. | |
void | print_string_chain (const string_chain *stchain, FILE *out) |
Display a string chain. | |
void | print_command (com_command *com, FILE *out) |
Display a command. | |
const char * | keywordtostring (com_keyword key) |
Convert a keyword to the associated string. | |
com_keyword | string_to_keyword (const char *str) |
Convert a string to a keyword. | |
bool | check_varname (const char *str) |
Check if a variable name is valid: it is not a keyword. | |
bool | com_isclass (com_command *com) |
Check if a command is a class. | |
bool | com_israw (const com_command *com) |
Check if a command is raw text. | |
bool | com_single (const com_command *com) |
Check if a command is a single link without parameters. | |
bool | com_single_par (const com_command *com) |
Check if a command is a single link with or without parameters. | |
int | com_nbparams (const com_parameters *pars) |
Computes the number of parameters of a command. | |
com_command * | com_getparam (const com_parameters *com, int i) |
Gets the n-th parameter of a command. | |
com_keyword | key_from_string_chain (const string_chain *strchain) |
Get the keyword associated with the first link in a string chain. | |
com_keyword | key_from_string_chain_single (const string_chain *strchain) |
Get the keyword associated with a single link string chain. | |
string_chain * | com_make_string_chain (char *, string_chain *) |
Adds another link to a string chain. | |
com_parameters * | com_make_parameters (com_command *, com_parameters *) |
Adds a new parameter to a parameters chain. | |
com_command * | com_make_command (char *, com_command *) |
Adds a new link to a command. | |
com_command * | com_init_command (char *, com_parameters *) |
Initializes a single link command. | |
com_command * | com_init_rawcommand (char *) |
Initializes a raw text command. | |
com_command * | com_init_indexing (char *, char *) |
Initializes an indexed command. | |
void | com_free_string_chain (string_chain *) |
Frees a string chain. | |
void | com_free_command (com_command *) |
Frees a command. | |
void | com_free_parameters (com_parameters *) |
Frees the parameters of a command. | |
Keywords and commands used in the shell.
enum com_type |
bool check_varname | ( | const char * | str | ) |
Check if a variable name is valid: it is not a keyword.
str | The variable name. |
void com_free_command | ( | com_command * | thecom | ) |
Frees a command.
thecom | The command. |
void com_free_parameters | ( | com_parameters * | params | ) |
Frees the parameters of a command.
params | The parameters. |
void com_free_string_chain | ( | string_chain * | thechain | ) |
Frees a string chain.
thechain | The string chain. |
com_command * com_getparam | ( | const com_parameters * | com, |
int | i ) |
Gets the n-th parameter of a command.
com | The parameters of the command. |
i | The index of the parameter. |
com_command * com_init_command | ( | char * | s, |
com_parameters * | params ) |
Initializes a single link command.
s | The string of the link. |
params | The parameters of the command. |
com_command * com_init_indexing | ( | char * | s, |
char * | num ) |
Initializes an indexed command.
s | The string of the link. |
num | The index of the command (must be a number). |
com_command * com_init_rawcommand | ( | char * | s | ) |
Initializes a raw text command.
s | The raw text. |
bool com_isclass | ( | com_command * | com | ) |
Check if a command is a class.
com | The command. |
bool com_israw | ( | const com_command * | com | ) |
Check if a command is raw text.
com | The command. |
com_command * com_make_command | ( | char * | s, |
com_command * | thecom ) |
Adds a new link to a command.
s | The string of the link. |
thecom | The original command. |
com_parameters * com_make_parameters | ( | com_command * | theparam, |
com_parameters * | params ) |
Adds a new parameter to a parameters chain.
theparam | The parameter. |
params | The original parameters. |
string_chain * com_make_string_chain | ( | char * | s, |
string_chain * | thechain ) |
Adds another link to a string chain.
s | The string. |
thechain | The original string chain. |
int com_nbparams | ( | const com_parameters * | pars | ) |
Computes the number of parameters of a command.
pars | The parameters of the command. |
bool com_single | ( | const com_command * | com | ) |
Check if a command is a single link without parameters.
com | The command. |
bool com_single_par | ( | const com_command * | com | ) |
Check if a command is a single link with or without parameters.
com | The command. |
com_keyword key_from_string_chain | ( | const string_chain * | strchain | ) |
Get the keyword associated with the first link in a string chain.
strchain | The string chain. |
com_keyword key_from_string_chain_single | ( | const string_chain * | strchain | ) |
Get the keyword associated with a single link string chain.
strchain | The string chain. |
void keywords_add_key | ( | com_keyword | key, |
const char * | str ) |
Initialization of a single keyword.
key | The keyword. |
str | The string corresponding to the keyword. |
const char * keywordtostring | ( | com_keyword | key | ) |
Convert a keyword to the associated string.
key | The keyword. |
void print_command | ( | com_command * | com, |
FILE * | out ) |
Display a command.
com | The command. |
out | The output stream. |
void print_string_chain | ( | const string_chain * | stchain, |
FILE * | out ) |
Display a string chain.
stchain | The string chain. |
out | The output stream. |
com_keyword string_to_keyword | ( | const char * | str | ) |
Convert a string to a keyword.
str | The string. |