/* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext[yyleng-1];
STORE_POS;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = 0;
unput(c); /* put this ending char back in the stream */
BEGIN(0);
return word;
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
parencount2--;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
parencount3--;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
prev_word = 0;
return word;
}
yymore();
} else {
STORE_LOC;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = 0;
unput(')');
BEGIN(0);
return word;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
BEGIN(0);
if ( !strcmp(yytext, ")") )
return RP;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
unput(')');
return word;
STORE_LOC;
if( !strcmp(yytext,"," ) )
return COMMA;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
unput(',');
return word;
}
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = '\0';
return word;
}
yymore();
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = '\0';
return word;
}
yymore();
<semic>{NOSEMIC}; {
STORE_LOC;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
unput(';');
BEGIN(0);
return word;
/* a non-word constituent char, like a space, tab, curly, paren, etc */
char c = yytext[yyleng-1];
STORE_POS;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = 0;
unput(c); /* put this ending char back in the stream */
BEGIN(0);
return word;
case 58:
/* rule 58 can match eol */
YY_RULE_SETUP
-#line 319 "ael.flex"
+#line 320 "ael.flex"
{
if ( pbcpop2('}') ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
parencount2--;
case 59:
/* rule 59 can match eol */
YY_RULE_SETUP
-#line 337 "ael.flex"
+#line 339 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '{')
case 60:
/* rule 60 can match eol */
YY_RULE_SETUP
-#line 345 "ael.flex"
+#line 347 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop2(c)) { /* error */
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
case 61:
/* rule 61 can match eol */
YY_RULE_SETUP
-#line 360 "ael.flex"
+#line 363 "ael.flex"
{
if ( pbcpop3(']') ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
parencount3--;
case 62:
/* rule 62 can match eol */
YY_RULE_SETUP
-#line 378 "ael.flex"
+#line 382 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '[')
case 63:
/* rule 63 can match eol */
YY_RULE_SETUP
-#line 386 "ael.flex"
+#line 390 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop3(c)) { /* error */
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
case 64:
/* rule 64 can match eol */
YY_RULE_SETUP
-#line 408 "ael.flex"
+#line 413 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression: %s !\n", my_file, my_lineno, my_col, yytext);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
prev_word = 0;
return word;
}
yymore();
} else {
STORE_LOC;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = 0;
unput(')');
BEGIN(0);
return word;
case 65:
/* rule 65 can match eol */
YY_RULE_SETUP
-#line 431 "ael.flex"
+#line 438 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
case 66:
/* rule 66 can match eol */
YY_RULE_SETUP
-#line 439 "ael.flex"
+#line 446 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c)) { /* error */
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n",
my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
yymore();
case 67:
/* rule 67 can match eol */
YY_RULE_SETUP
-#line 462 "ael.flex"
+#line 470 "ael.flex"
{
char c = yytext[yyleng-1];
if (c == '(')
case 68:
/* rule 68 can match eol */
YY_RULE_SETUP
-#line 470 "ael.flex"
+#line 478 "ael.flex"
{
if ( pbcpop(')') ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched ')' in expression!\n", my_file, my_lineno, my_col);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = 0;
return word;
}
BEGIN(0);
if ( !strcmp(yytext, ")") )
return RP;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
yylval->str[yyleng-1] = '\0'; /* trim trailing ')' */
unput(')');
return word;
case 69:
/* rule 69 can match eol */
YY_RULE_SETUP
-#line 496 "ael.flex"
+#line 505 "ael.flex"
{
if( parencount != 0) { /* ast_log(LOG_NOTICE,"Folding in a comma!\n"); */
yymore();
STORE_LOC;
if( !strcmp(yytext,"," ) )
return COMMA;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = '\0'; /* trim trailing ',' */
unput(',');
return word;
}
case 70:
/* rule 70 can match eol */
YY_RULE_SETUP
-#line 510 "ael.flex"
+#line 520 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = '\0';
return word;
}
yymore();
case 71:
/* rule 71 can match eol */
YY_RULE_SETUP
-#line 528 "ael.flex"
+#line 539 "ael.flex"
{
char c = yytext[yyleng-1];
yymore();
case 72:
/* rule 72 can match eol */
YY_RULE_SETUP
-#line 534 "ael.flex"
+#line 545 "ael.flex"
{
char c = yytext[yyleng-1];
if ( pbcpop(c) ) { /* error */
STORE_LOC;
ast_log(LOG_ERROR,"File=%s, line=%d, column=%d: Mismatched '%c' in expression!\n", my_file, my_lineno, my_col, c);
BEGIN(0);
- yylval->str = ast_malloc(yyleng+1);
- ast_copy_string(yylval->str, yytext, yyleng+1);
+ yylval->str = malloc(yyleng+1);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng] = '\0';
return word;
}
yymore();
case 73:
/* rule 73 can match eol */
YY_RULE_SETUP
-#line 547 "ael.flex"
+#line 559 "ael.flex"
{
STORE_LOC;
- yylval->str = ast_malloc(yyleng);
- ast_copy_string(yylval->str, yytext, yyleng);
+ yylval->str = malloc(yyleng);
+ strncpy(yylval->str, yytext, yyleng);
+ yylval->str[yyleng-1] = '\0'; /* trim trailing ';' */
unput(';');
BEGIN(0);
return word;
case 74:
/* rule 74 can match eol */
YY_RULE_SETUP
-#line 556 "ael.flex"
+#line 569 "ael.flex"
{
char fnamebuf[1024],*p1,*p2;
int glob_ret;
case YY_STATE_EOF(curlystate):
case YY_STATE_EOF(wordstate):
case YY_STATE_EOF(brackstate):
-#line 601 "ael.flex"
+#line 614 "ael.flex"
{
char fnamebuf[2048];
if (include_stack_index > 0 && include_stack[include_stack_index-1].globbuf_pos < include_stack[include_stack_index-1].globbuf.gl_pathc-1) {
YY_BREAK
case 75:
YY_RULE_SETUP
-#line 633 "ael.flex"
+#line 646 "ael.flex"
ECHO;
YY_BREAK
-#line 2015 "ael_lex.c"
+#line 2028 "ael_lex.c"
case YY_END_OF_BUFFER:
{
#define YYTABLES_NAME "yytables"
-#line 633 "ael.flex"
+#line 646 "ael.flex"