version 1.4, 2003/07/07 21:36:09 |
version 1.5, 2005/05/13 05:05:22 |
|
|
static unsigned lineno = 1; |
static unsigned lineno = 1; |
void error_message(char *, ...); |
void error_message(char *, ...); |
int getstring(void); |
int getstring(void); |
int yylex(void); |
|
|
|
%} |
%} |
|
|
|
|
int i = 0; |
int i = 0; |
int c; |
int c; |
int quote = 0; |
int quote = 0; |
while((c = input()) != EOF){ |
while(i < sizeof(x) - 1 && (c = input()) != EOF){ |
if(quote) { |
if(quote) { |
x[i++] = c; |
x[i++] = c; |
quote = 0; |
quote = 0; |
|
|
x[i++] = c; |
x[i++] = c; |
} |
} |
x[i] = '\0'; |
x[i] = '\0'; |
yylval.string = strdup(x); |
if ((yylval.string = strdup(x)) == NULL) |
|
err(1, NULL); |
return STRING; |
return STRING; |
} |
} |
|
|