Quash Shell  0.1
A simple yet powerfull shell program
 All Classes Files Functions Variables Typedefs Enumerations Macros
parsing_interface.h
Go to the documentation of this file.
1 
8 #ifndef SRC_PARSING_PARSING_INTERFACE_H
9 #define SRC_PARSING_PARSING_INTERFACE_H
10 
11 #include <stdbool.h>
12 
13 #include "command.h"
14 #include "deque.h"
15 #include "quash.h"
16 
21 typedef struct Redirect {
22  char* in;
23  char* out;
24  bool append;
26 } Redirect;
27 
36 IMPLEMENT_DEQUE_STRUCT(CmdStrs, char*);
37 
46 
47 PROTOTYPE_DEQUE(CmdStrs, char*);
52 /*************************************************************
53  * Functions used by the parser
54  *************************************************************/
71 Redirect mk_redirect(char* in, char* out, bool append);
72 
83 char* interpret_complex_string_token(const char* str);
84 
85 
86 /*************************************************************
87  * Functions used by the parser
88  *************************************************************/
101 
105 void destroy_parser();
106 
107 #endif
bool append
Definition: parsing_interface.h:24
Command structures and functions for defining and managing commands.
void destroy_parser()
Cleanup memory dynamically allocated by the parser.
Definition: parsing_interface.c:312
Contains information about the properties of the command.
Definition: command.h:207
char * interpret_complex_string_token(const char *str)
Clean up a string by removing escape symbols and unescaped single quotes. Also expands any environmen...
Definition: parsing_interface.c:219
char * in
Definition: parsing_interface.h:22
#define IMPLEMENT_DEQUE_STRUCT(struct_name, type)
Generates a structure for use with Double Ended Queues.
Definition: deque.h:33
CommandHolder * parse(QuashState *state)
Handles the call to the parser and provides a string equivalent of the Command structure to QuashStat...
Definition: parsing_interface.c:295
Double ended queue generators specialized to any given type.
Intermediate parsing structure used to determine the final configuration of the redirects in a comman...
Definition: parsing_interface.h:21
char * out
Definition: parsing_interface.h:23
Redirect mk_redirect(char *in, char *out, bool append)
Creates an intermediate Redirect structure and returns a copy.
Definition: parsing_interface.c:286
Holds information about the state and environment Quash is running in.
Definition: quash.h:19
#define PROTOTYPE_DEQUE(struct_name, type)
Generates prototypes for functions that manipulate Double Ended Queue structures. ...
Definition: deque.h:60
struct Redirect Redirect
Intermediate parsing structure used to determine the final configuration of the redirects in a comman...