i3
Data Structures | Typedefs | Functions | Variables
commands_parser.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdint.h>
#include "all.h"
#include "GENERATED_enums.h"
#include "GENERATED_tokens.h"
#include "GENERATED_call.h"
Include dependency graph for commands_parser.c:

Go to the source code of this file.

Data Structures

struct  token
struct  tokenptr
struct  stack_entry

Typedefs

typedef struct token cmdp_token
typedef struct tokenptr cmdp_token_ptr

Functions

static void push_string (const char *identifier, char *str)
static char * get_string (const char *identifier)
static void clear_stack (void)
static void next_state (const cmdp_token *token)
struct CommandResultparse_command (const char *input)

Variables

static struct stack_entry stack [10]
static cmdp_state state
static Match current_match
static struct CommandResult subcommand_output
static struct CommandResult command_output

Typedef Documentation

typedef struct token cmdp_token
typedef struct tokenptr cmdp_token_ptr

Function Documentation

static void clear_stack ( void  )
static

Definition at line 113 of file commands_parser.c.

References DLOG, stack_entry::identifier, stack, and stack_entry::str.

Referenced by next_state(), and parse_command().

static char* get_string ( const char *  identifier)
static

Definition at line 102 of file commands_parser.c.

References DLOG, stack, and stack_entry::str.

Referenced by GENERATED_call().

static void next_state ( const cmdp_token token)
static
struct CommandResult* parse_command ( const char *  input)
read
static void push_string ( const char *  identifier,
char *  str 
)
static

Definition at line 81 of file commands_parser.c.

References stack_entry::identifier, stack, and stack_entry::str.

Referenced by parse_command().


Variable Documentation

struct CommandResult command_output
static
Match current_match
static

Definition at line 176 of file commands_parser.c.

Referenced by parse_command().

struct stack_entry stack[10]
static

Definition at line 74 of file commands_parser.c.

Referenced by clear_stack(), get_string(), and push_string().

cmdp_state state
static
struct CommandResult subcommand_output
static

Definition at line 178 of file commands_parser.c.

Referenced by next_state(), and parse_command().