The BASH Parser

Name

The BASH Parser -- A flex/bison parser for BASH commands.

Synopsis


#include <history.h>


gboolean    parse_tree_check_option         (GNode *node,
                                             const gchar *program,
                                             const gchar *option);
gchar*      parse_tree_get_producer_program (GNode *tree);

Description

The BASH Parser creates a parse tree of the BASH expressions. This parse tree will be used to decide which command parser to use and how to interpret the lines the program prints.

Details

parse_tree_check_option ()

gboolean    parse_tree_check_option         (GNode *node,
                                             const gchar *program,
                                             const gchar *option);

Check if the given program has the option by the parse tree. This function checks only the leftmost instance of the command.

node :

the root node of the parse tree

program :

the name of the program

option :

the short or long option

Returns :

TRUE if the option was used


parse_tree_get_producer_program ()

gchar*      parse_tree_get_producer_program (GNode *tree);

tree :

Returns :