mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-25 17:04:01 +00:00
lemon refactor iterate
This commit is contained in:
parent
bc73e25a54
commit
680dfadeb5
3 changed files with 5 additions and 21 deletions
|
|
@ -7,6 +7,8 @@ lemon_SOURCES= lemon.c \
|
|||
lemon_assert.h \
|
||||
lemon_error.c \
|
||||
lemon_error.h \
|
||||
lemon_memory.c \
|
||||
lemon_memory.h \
|
||||
lemon_option.c \
|
||||
lemon_option.h
|
||||
|
||||
|
|
|
|||
|
|
@ -105,8 +105,8 @@ ex2_lexer.c ex2_lexer.h: ex2_lexer.l ./ex_ast.h
|
|||
flex --prefix=ex2_lexer_ --outfile=ex2_lexer.c --header-file=ex2_lexer.h ex2_lexer.l
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
lemon: lemon.c lemon_assert.c lemon_error.c lemon_option.c
|
||||
$(DSLCC) -o lemon lemon.c lemon_assert.c lemon_error.c lemon_option.c
|
||||
lemon: lemon.c lemon_assert.c lemon_error.c lemon_memory.c lemon_option.c
|
||||
$(DSLCC) -o lemon lemon.c lemon_assert.c lemon_error.c lemon_memory.c lemon_option.c
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -15,14 +15,9 @@
|
|||
|
||||
#include "lemon_assert.h"
|
||||
#include "lemon_error.h"
|
||||
#include "lemon_memory.h"
|
||||
#include "lemon_option.h"
|
||||
|
||||
#ifndef __WIN32__
|
||||
# if defined(_WIN32) || defined(WIN32)
|
||||
# define __WIN32__
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* #define PRIVATE static */
|
||||
#define PRIVATE
|
||||
|
||||
|
|
@ -248,11 +243,6 @@ struct lemon {
|
|||
char *argv0; /* Name of the program */
|
||||
};
|
||||
|
||||
#define MemoryCheck(X) if((X)==0){ \
|
||||
extern void memory_error(); \
|
||||
memory_error(); \
|
||||
}
|
||||
|
||||
/**************** From the file "table.h" *********************************/
|
||||
/*
|
||||
** All code in this file has been automatically generated
|
||||
|
|
@ -1189,14 +1179,6 @@ void Configlist_eat(struct config *cfp)
|
|||
** Main program file for the LEMON parser generator.
|
||||
*/
|
||||
|
||||
/* Report an out-of-memory condition and abort. This function
|
||||
** is used mostly by the "MemoryCheck" macro in struct.h
|
||||
*/
|
||||
void memory_error(){
|
||||
fprintf(stderr, "Out of memory. Aborting...\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
static int nDefine = 0; /* Number of -D options on the command line */
|
||||
static char **azDefine = 0; /* Name of the -D macros */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue