404 |
yyerror("Unbalanced quotes"); |
yyerror("Unbalanced quotes"); |
405 |
} |
} |
406 |
|
|
407 |
\{[^\}]*\} { /* |
[^ \t\n"]+ { |
|
* This helps constructions like: |
|
|
* /bin/bash -c { cmd1; cmd2;..cmdn; } |
|
|
*/ |
|
|
steplinenobycr(yytext); |
|
|
yylval.string= xstrdup(yytext); |
|
|
return STRING; |
|
|
} |
|
|
|
|
|
[^ \t\n\{\}]+ { |
|
408 |
yylval.string= xstrdup(yytext); |
yylval.string= xstrdup(yytext); |
409 |
return STRING; |
return STRING; |
410 |
} |
} |
425 |
|
|
426 |
void steplinenobycr(char *string) { |
void steplinenobycr(char *string) { |
427 |
|
|
428 |
char *pos=string; |
char *pos= string; |
|
|
|
|
while ( 0 != *pos ) { |
|
|
|
|
|
if ( '\n' == *pos ) { |
|
429 |
|
|
430 |
|
while(*pos) |
431 |
|
if('\n'==*pos++) { |
432 |
lineno++; |
lineno++; |
|
|
|
433 |
} |
} |
434 |
|
|
|
pos++; |
|
|
|
|
|
} |
|
|
|
|
435 |
} |
} |
436 |
|
|
437 |
|
|
438 |
static char *handle_quoted_string(char *string) { |
static char *handle_quoted_string(char *string) { |
439 |
|
|
440 |
char *buf= xstrdup(string); |
char *buf= xstrdup(string); |