i3
|
#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"
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 CommandResult * | parse_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 struct token cmdp_token |
typedef struct tokenptr cmdp_token_ptr |
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] |
Definition at line 184 of file commands_parser.c.
References __CALL, token::call_identifier, clear_stack(), command_output, DLOG, token::extra, GENERATED_call(), INITIAL, CommandResult::json_output, CommandResult::needs_tree_render, token::next_state, sasprintf(), state, and subcommand_output.
Referenced by parse_command().
struct CommandResult* parse_command | ( | const char * | input | ) | [read] |
Definition at line 217 of file commands_parser.c.
References tokenptr::array, clear_stack(), cmd_criteria_init(), command_output, current_match, DLOG, token::identifier, INITIAL, CommandResult::json_output, tokenptr::n, token::name, CommandResult::needs_tree_render, next_state(), push_string(), sasprintf(), scalloc(), smalloc(), sstrdup(), state, subcommand_output, and tokens.
Referenced by handle_key_press(), IPC_HANDLER(), and run_assignments().
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().
struct CommandResult command_output [static] |
Definition at line 179 of file commands_parser.c.
Referenced by handle_key_press(), IPC_HANDLER(), next_state(), parse_command(), and run_assignments().
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] |
Definition at line 174 of file commands_parser.c.
Referenced by CIRCLEQ_HEAD(), GENERATED_call(), next_state(), parse_command(), sig_handle_key_press(), x_con_init(), x_con_kill(), x_deco_recurse(), x_mask_event_mask(), x_push_changes(), x_push_node(), x_push_node_unmaps(), x_raise_con(), x_reinit(), x_reparent_child(), and x_set_name().
struct CommandResult subcommand_output [static] |
Definition at line 178 of file commands_parser.c.
Referenced by next_state(), and parse_command().