Merged revisions 293197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r293197 | tilghman | 2010-10-28 15:00:06 -0500 (Thu, 28 Oct 2010) | 33 lines Merged revisions 293195-293196 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r293195 | tilghman | 2010-10-28 14:52:52 -0500 (Thu, 28 Oct 2010) | 12 lines Merged revisions 293194 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293194 | tilghman | 2010-10-28 14:44:37 -0500 (Thu, 28 Oct 2010) | 5 lines "!00" evaluated as false, which is incorrect. Fixing. Reported (though the reporter did not understand he was reporting a bug) on the asterisk-users list: http://lists.digium.com/pipermail/asterisk-users/2010-October/255505.html ........ ................ r293196 | tilghman | 2010-10-28 14:54:34 -0500 (Thu, 28 Oct 2010) | 12 lines Merged revisions 293194 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r293194 | tilghman | 2010-10-28 14:44:37 -0500 (Thu, 28 Oct 2010) | 5 lines "!00" evaluated as false, which is incorrect. Fixing. Reported (though the reporter did not understand he was reporting a bug) on the asterisk-users list: http://lists.digium.com/pipermail/asterisk-users/2010-October/255505.html ........ ................ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@293198 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
4fa3407e83
commit
ca6027726c
664
main/ast_expr2.c
664
main/ast_expr2.c
File diff suppressed because it is too large
Load Diff
|
@ -1,24 +1,23 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
|
||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
@ -29,10 +28,11 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
|
@ -64,47 +64,27 @@
|
|||
TOKEN = 280
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define TOK_COMMA 258
|
||||
#define TOK_COLONCOLON 259
|
||||
#define TOK_COND 260
|
||||
#define TOK_OR 261
|
||||
#define TOK_AND 262
|
||||
#define TOK_NE 263
|
||||
#define TOK_LE 264
|
||||
#define TOK_GE 265
|
||||
#define TOK_LT 266
|
||||
#define TOK_GT 267
|
||||
#define TOK_EQ 268
|
||||
#define TOK_MINUS 269
|
||||
#define TOK_PLUS 270
|
||||
#define TOK_MOD 271
|
||||
#define TOK_DIV 272
|
||||
#define TOK_MULT 273
|
||||
#define TOK_COMPL 274
|
||||
#define TOK_TILDETILDE 275
|
||||
#define TOK_EQTILDE 276
|
||||
#define TOK_COLON 277
|
||||
#define TOK_LP 278
|
||||
#define TOK_RP 279
|
||||
#define TOKEN 280
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 345 "ast_expr2.y"
|
||||
{
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 345 "ast_expr2.y"
|
||||
|
||||
struct val *val;
|
||||
struct expr_node *arglist;
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 104 "ast_expr2.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 84 "ast_expr2.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -123,3 +103,4 @@ typedef struct YYLTYPE
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1402,6 +1402,8 @@ op_compl (struct val *a)
|
|||
v1 = 0;
|
||||
else if (strlen(a->u.s) == 1 && a->u.s[0] == '0' )
|
||||
v1 = 0;
|
||||
else
|
||||
v1 = atoi(a->u.s);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -1414,6 +1416,8 @@ op_compl (struct val *a)
|
|||
v1 = 0;
|
||||
else if (strlen(a->u.s) == 1 && a->u.s[0] == '0' )
|
||||
v1 = 0;
|
||||
else
|
||||
v1 = atoi(a->u.s);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
1186
res/ael/ael.tab.c
1186
res/ael/ael.tab.c
File diff suppressed because it is too large
Load Diff
|
@ -1,24 +1,23 @@
|
|||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
|
||||
/* A Bison parser, made by GNU Bison 2.4.1. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
|
@ -29,10 +28,11 @@
|
|||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
|
@ -82,66 +82,28 @@
|
|||
word = 298
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define KW_CONTEXT 258
|
||||
#define LC 259
|
||||
#define RC 260
|
||||
#define LP 261
|
||||
#define RP 262
|
||||
#define SEMI 263
|
||||
#define EQ 264
|
||||
#define COMMA 265
|
||||
#define COLON 266
|
||||
#define AMPER 267
|
||||
#define BAR 268
|
||||
#define AT 269
|
||||
#define KW_MACRO 270
|
||||
#define KW_GLOBALS 271
|
||||
#define KW_IGNOREPAT 272
|
||||
#define KW_SWITCH 273
|
||||
#define KW_IF 274
|
||||
#define KW_IFTIME 275
|
||||
#define KW_ELSE 276
|
||||
#define KW_RANDOM 277
|
||||
#define KW_ABSTRACT 278
|
||||
#define KW_EXTEND 279
|
||||
#define EXTENMARK 280
|
||||
#define KW_GOTO 281
|
||||
#define KW_JUMP 282
|
||||
#define KW_RETURN 283
|
||||
#define KW_BREAK 284
|
||||
#define KW_CONTINUE 285
|
||||
#define KW_REGEXTEN 286
|
||||
#define KW_HINT 287
|
||||
#define KW_FOR 288
|
||||
#define KW_WHILE 289
|
||||
#define KW_CASE 290
|
||||
#define KW_PATTERN 291
|
||||
#define KW_DEFAULT 292
|
||||
#define KW_CATCH 293
|
||||
#define KW_SWITCHES 294
|
||||
#define KW_ESWITCHES 295
|
||||
#define KW_INCLUDES 296
|
||||
#define KW_LOCAL 297
|
||||
#define word 298
|
||||
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 59 "ael.y"
|
||||
{
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 59 "ael.y"
|
||||
|
||||
int intval; /* integer value, typically flags */
|
||||
char *str; /* strings */
|
||||
struct pval *pval; /* full objects */
|
||||
}
|
||||
/* Line 1489 of yacc.c. */
|
||||
#line 141 "ael.tab.h"
|
||||
YYSTYPE;
|
||||
|
||||
|
||||
|
||||
/* Line 1676 of yacc.c */
|
||||
#line 103 "ael.tab.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -160,3 +122,4 @@ typedef struct YYLTYPE
|
|||
#endif
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "asterisk.h"
|
||||
|
||||
#line 2 "ael_lex.c"
|
||||
|
||||
#line 4 "ael_lex.c"
|
||||
|
@ -16,7 +18,6 @@
|
|||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
#include "asterisk.h"
|
||||
/* begin standard C headers. */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -160,7 +161,15 @@ typedef void* yyscan_t;
|
|||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
|
@ -952,7 +961,7 @@ static void pbcwhere(const char *text, int *line, int *col )
|
|||
#define STORE_POS
|
||||
#define STORE_LOC
|
||||
#endif
|
||||
#line 955 "ael_lex.c"
|
||||
#line 963 "ael_lex.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define paren 1
|
||||
|
@ -1096,7 +1105,12 @@ static int input (yyscan_t yyscanner );
|
|||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
|
@ -1203,7 +1217,7 @@ YY_DECL
|
|||
#line 217 "ael.flex"
|
||||
|
||||
|
||||
#line 1206 "ael_lex.c"
|
||||
#line 1219 "ael_lex.c"
|
||||
|
||||
yylval = yylval_param;
|
||||
|
||||
|
@ -2037,7 +2051,7 @@ YY_RULE_SETUP
|
|||
#line 656 "ael.flex"
|
||||
YY_FATAL_ERROR( "flex scanner jammed" );
|
||||
YY_BREAK
|
||||
#line 2040 "ael_lex.c"
|
||||
#line 2053 "ael_lex.c"
|
||||
|
||||
case YY_END_OF_BUFFER:
|
||||
{
|
||||
|
@ -2808,8 +2822,8 @@ YY_BUFFER_STATE ael_yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
|
|||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to ael_yylex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param yyscanner The scanner object.
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
|
@ -3221,7 +3235,8 @@ static void pbcpush(char x)
|
|||
|
||||
void ael_yyfree(void *ptr, yyscan_t yyscanner)
|
||||
{
|
||||
free( (char*) ptr );
|
||||
if (ptr)
|
||||
free( (char*) ptr );
|
||||
}
|
||||
|
||||
static int pbcpop(char x)
|
||||
|
@ -3360,7 +3375,8 @@ struct pval *ael2_parse(char *filename, int *errors)
|
|||
*errors = 1;
|
||||
return 0;
|
||||
}
|
||||
free(my_file);
|
||||
if (my_file)
|
||||
free(my_file);
|
||||
my_file = strdup(filename);
|
||||
stat(filename, &stats);
|
||||
buffer = (char*)malloc(stats.st_size+2);
|
||||
|
|
Reference in New Issue