#include "asterisk/paths.h"
#include "pval.h"
Go to the source code of this file.
Data Structures | |
struct | ael_extension |
struct | ael_priority |
struct | parse_io |
Defines | |
#define | QUAD_MAX (0x7fffffffffffffffLL) |
#define | QUAD_MIN (-0x7fffffffffffffffLL-1) |
Typedefs | |
typedef void * | yyscan_t |
Enumerations | |
enum | ael_priority_type { AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_RAND_CONTROL, AEL_LABEL, AEL_RETURN } |
Functions | |
pval * | ael2_parse (char *fname, int *errs) |
void | ael2_print (char *fname, pval *tree) |
void | ael2_semantic_check (pval *item, int *errs, int *warns, int *notes) |
void | destroy_pval (pval *item) |
pval * | linku1 (pval *head, pval *tail) |
pval * | npval (pvaltype type, int first_line, int last_line, int first_column, int last_column) |
Variables | |
char * | prev_word |
Definition in file ael_structs.h.
#define QUAD_MAX (0x7fffffffffffffffLL) |
Definition at line 54 of file ael_structs.h.
#define QUAD_MIN (-0x7fffffffffffffffLL-1) |
typedef void* yyscan_t |
Definition at line 71 of file ael_structs.h.
enum ael_priority_type |
AEL_APPCALL | |
AEL_CONTROL1 | |
AEL_FOR_CONTROL | |
AEL_IF_CONTROL | |
AEL_IFTIME_CONTROL | |
AEL_RAND_CONTROL | |
AEL_LABEL | |
AEL_RETURN |
Definition at line 84 of file ael_structs.h.
00084 { AEL_APPCALL, AEL_CONTROL1, AEL_FOR_CONTROL, AEL_IF_CONTROL, AEL_IFTIME_CONTROL, AEL_RAND_CONTROL, AEL_LABEL, AEL_RETURN } ael_priority_type;
struct pval* ael2_parse | ( | char * | fname, | |
int * | errs | |||
) |
Referenced by pbx_load_module().
void ael2_print | ( | char * | fname, | |
pval * | tree | |||
) |
Definition at line 381 of file pval.c.
References ast_log(), LOG_ERROR, and print_pval_list().
00382 { 00383 FILE *fin = fopen(fname,"w"); 00384 if ( !fin ) { 00385 ast_log(LOG_ERROR, "Couldn't open %s for writing.\n", fname); 00386 return; 00387 } 00388 print_pval_list(fin, tree, 0); 00389 fclose(fin); 00390 }
void ael2_semantic_check | ( | pval * | item, | |
int * | errs, | |||
int * | warns, | |||
int * | notes | |||
) |
Definition at line 2882 of file pval.c.
References ast_config_AST_VAR_DIR, check_context_names(), check_pval(), and current_db.
Referenced by pbx_load_module().
02883 { 02884 02885 #ifdef AAL_ARGCHECK 02886 int argapp_errs =0; 02887 char *rfilename; 02888 #endif 02889 struct argapp *apps=0; 02890 02891 if (!item) 02892 return; /* don't check an empty tree */ 02893 #ifdef AAL_ARGCHECK 02894 rfilename = alloca(10 + strlen(ast_config_AST_VAR_DIR)); 02895 sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR); 02896 02897 apps = argdesc_parse(rfilename, &argapp_errs); /* giveth */ 02898 #endif 02899 current_db = item; 02900 errs = warns = notes = 0; 02901 02902 check_context_names(); 02903 check_pval(item, apps, 0); 02904 02905 #ifdef AAL_ARGCHECK 02906 argdesc_destroy(apps); /* taketh away */ 02907 #endif 02908 current_db = 0; 02909 02910 *arg_errs = errs; 02911 *arg_warns = warns; 02912 *arg_notes = notes; 02913 }
void destroy_pval | ( | pval * | item | ) |
Definition at line 4890 of file pval.c.
Referenced by destroy_pval_item(), pbx_load_module(), yydestruct(), and yyparse().
04891 { 04892 pval *i,*nxt; 04893 04894 for (i=item; i; i=nxt) { 04895 nxt = i->next; 04896 04897 destroy_pval_item(i); 04898 } 04899 }
Definition at line 5837 of file pval.c.
Referenced by pvalAppCallAddArg(), pvalCasePatDefAddStatement(), pvalContextAddStatement(), pvalESwitchesAddSwitch(), pvalGlobalsAddStatement(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), pvalMacroAddArg(), pvalMacroAddStatement(), pvalMacroCallAddArg(), pvalStatementBlockAddStatement(), pvalSwitchAddCase(), pvalSwitchesAddSwitch(), pvalTopLevAddObject(), and yyparse().
05838 { 05839 if (!head) 05840 return tail; 05841 if (tail) { 05842 if (!head->next) { 05843 head->next = tail; 05844 } else { 05845 head->u1_last->next = tail; 05846 } 05847 head->u1_last = tail; 05848 tail->prev = head; /* the dad link only points to containers */ 05849 } 05850 return head; 05851 }
struct pval * npval | ( | pvaltype | type, | |
int | first_line, | |||
int | last_line, | |||
int | first_column, | |||
int | last_column | |||
) |
Definition at line 3908 of file ael.tab.c.
References calloc, pval::endcol, pval::endline, pval::filename, S_OR, pval::startcol, pval::startline, strdup, and pval::type.
Referenced by npval2(), and yyparse().
03910 { 03911 pval *z = calloc(1, sizeof(struct pval)); 03912 z->type = type; 03913 z->startline = first_line; 03914 z->endline = last_line; 03915 z->startcol = first_column; 03916 z->endcol = last_column; 03917 z->filename = strdup(S_OR(my_file, "<none>")); 03918 return z; 03919 }
char* prev_word |