generate-command-parser: make input/output configurable

This commit is contained in:
Michael Stapelberg
2012-10-07 16:30:34 +02:00
parent 69a77d182e
commit d36264e403
3 changed files with 19 additions and 11 deletions

View File

@ -46,7 +46,7 @@
* input parser-specs/commands.spec.
******************************************************************************/
#include "GENERATED_enums.h"
#include "GENERATED_commands_enums.h"
typedef struct token {
char *name;
@ -63,7 +63,7 @@ typedef struct tokenptr {
int n;
} cmdp_token_ptr;
#include "GENERATED_tokens.h"
#include "GENERATED_commands_tokens.h"
/*******************************************************************************
* The (small) stack where identified literals are stored during the parsing
@ -182,7 +182,7 @@ static Match current_match;
static struct CommandResult subcommand_output;
static struct CommandResult command_output;
#include "GENERATED_call.h"
#include "GENERATED_commands_call.h"
static void next_state(const cmdp_token *token) {

View File

@ -55,7 +55,7 @@ src/commands_parser.o: src/commands_parser.c $(i3_HEADERS_DEP) i3-command-parser
i3-command-parser.stamp: generate-command-parser.pl parser-specs/commands.spec
echo "[i3] Generating command parser"
(cd include; ../generate-command-parser.pl)
(cd include; ../generate-command-parser.pl --input=../parser-specs/commands.spec --prefix=commands)
touch $@
i3: libi3.a $(i3_OBJECTS)