aboutsummaryrefslogtreecommitdiffstats
path: root/main/ast_expr2.h
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 18:15:22 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2007-07-05 18:15:22 +0000
commitc66181df6174ec0fe12727a20d343eb908cbad0c (patch)
treee547079acc9ff3f5fd41827b21146c28d72030c8 /main/ast_expr2.h
parent3d7a0fea3e3c0b971b63d23184db06196dd1a771 (diff)
In regards to changes for 9508, expr2 system choking on floating point numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73449 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/ast_expr2.h')
-rw-r--r--main/ast_expr2.h91
1 files changed, 47 insertions, 44 deletions
diff --git a/main/ast_expr2.h b/main/ast_expr2.h
index 4bff4d872..517402cfb 100644
--- a/main/ast_expr2.h
+++ b/main/ast_expr2.h
@@ -29,63 +29,66 @@
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
- TOK_COLONCOLON = 258,
- TOK_COND = 259,
- TOK_OR = 260,
- TOK_AND = 261,
- TOK_NE = 262,
- TOK_LE = 263,
- TOK_GE = 264,
- TOK_LT = 265,
- TOK_GT = 266,
- TOK_EQ = 267,
- TOK_MINUS = 268,
- TOK_PLUS = 269,
- TOK_MOD = 270,
- TOK_DIV = 271,
- TOK_MULT = 272,
- TOK_COMPL = 273,
- TOK_EQTILDE = 274,
- TOK_COLON = 275,
- TOK_LP = 276,
- TOK_RP = 277,
- TOKEN = 278
+ TOK_COMMA = 258,
+ TOK_COLONCOLON = 259,
+ TOK_COND = 260,
+ TOK_OR = 261,
+ TOK_AND = 262,
+ TOK_NE = 263,
+ TOK_LE = 264,
+ TOK_GE = 265,
+ TOK_LT = 266,
+ TOK_GT = 267,
+ TOK_EQ = 268,
+ TOK_MINUS = 269,
+ TOK_PLUS = 270,
+ TOK_MOD = 271,
+ TOK_DIV = 272,
+ TOK_MULT = 273,
+ TOK_COMPL = 274,
+ TOK_EQTILDE = 275,
+ TOK_COLON = 276,
+ TOK_LP = 277,
+ TOK_RP = 278,
+ TOKEN = 279
};
#endif
/* Tokens. */
-#define TOK_COLONCOLON 258
-#define TOK_COND 259
-#define TOK_OR 260
-#define TOK_AND 261
-#define TOK_NE 262
-#define TOK_LE 263
-#define TOK_GE 264
-#define TOK_LT 265
-#define TOK_GT 266
-#define TOK_EQ 267
-#define TOK_MINUS 268
-#define TOK_PLUS 269
-#define TOK_MOD 270
-#define TOK_DIV 271
-#define TOK_MULT 272
-#define TOK_COMPL 273
-#define TOK_EQTILDE 274
-#define TOK_COLON 275
-#define TOK_LP 276
-#define TOK_RP 277
-#define TOKEN 278
+#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_EQTILDE 275
+#define TOK_COLON 276
+#define TOK_LP 277
+#define TOK_RP 278
+#define TOKEN 279
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-#line 165 "ast_expr2.y"
+#line 226 "ast_expr2.y"
{
struct val *val;
+ struct expr_node *arglist;
}
/* Line 1536 of yacc.c. */
-#line 89 "ast_expr2.h"
+#line 92 "ast_expr2.h"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1