ael_structs.h File Reference

Structures for AEL - the Asterisk extension language. More...

#include "asterisk/paths.h"
#include "pval.h"

Include dependency graph for ael_structs.h:

This graph shows which files directly or indirectly include this file:

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

struct pvalael2_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)
pvallinku1 (pval *head, pval *tail)
pvalnpval (pvaltype type, int first_line, int last_line, int first_column, int last_column)

Variables

char * prev_word


Detailed Description

Structures for AEL - the Asterisk extension language.

pbx_ael.c

Todo:
document this file (ael.h)

Definition in file ael_structs.h.


Define Documentation

#define QUAD_MAX   (0x7fffffffffffffffLL)

Definition at line 54 of file ael_structs.h.

#define QUAD_MIN   (-0x7fffffffffffffffLL-1)

Definition at line 51 of file ael_structs.h.

Referenced by chk_div(), and chk_minus().


Typedef Documentation

typedef void* yyscan_t

Definition at line 71 of file ael_structs.h.


Enumeration Type Documentation

Enumerator:
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.


Function Documentation

struct pval* ael2_parse ( char *  fname,
int *  errs 
) [read]

Referenced by pbx_load_module().

void ael2_print ( char *  fname,
pval tree 
)

Definition at line 384 of file pval.c.

References ast_log, LOG_ERROR, and print_pval_list().

Referenced by main().

00385 {
00386    FILE *fin = fopen(fname,"w");
00387    if ( !fin ) {
00388       ast_log(LOG_ERROR, "Couldn't open %s for writing.\n", fname);
00389       return;
00390    }
00391    print_pval_list(fin, tree, 0);
00392    fclose(fin);
00393 }

void ael2_semantic_check ( pval item,
int *  errs,
int *  warns,
int *  notes 
)

Definition at line 2892 of file pval.c.

References ast_alloca, ast_config_AST_VAR_DIR, check_context_names(), and check_pval().

Referenced by pbx_load_module().

02893 {
02894    
02895 #ifdef AAL_ARGCHECK
02896    int argapp_errs =0;
02897    char *rfilename;
02898 #endif
02899    struct argapp *apps=0;
02900 
02901    if (!item)
02902       return; /* don't check an empty tree */
02903 #ifdef AAL_ARGCHECK
02904    rfilename = ast_alloca(10 + strlen(ast_config_AST_VAR_DIR));
02905    sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);
02906    
02907    apps = argdesc_parse(rfilename, &argapp_errs); /* giveth */
02908 #endif
02909    current_db = item;
02910    errs = warns = notes = 0;
02911 
02912    check_context_names();
02913    check_pval(item, apps, 0);
02914 
02915 #ifdef AAL_ARGCHECK
02916    argdesc_destroy(apps);  /* taketh away */
02917 #endif
02918    current_db = 0;
02919 
02920    *arg_errs = errs;
02921    *arg_warns = warns;
02922    *arg_notes = notes;
02923 }

void destroy_pval ( pval item  ) 

Definition at line 4951 of file pval.c.

Referenced by destroy_pval_item(), pbx_load_module(), yydestruct(), and yyparse().

04952 {
04953    pval *i,*nxt;
04954    
04955    for (i=item; i; i=nxt) {
04956       nxt = i->next;
04957       
04958       destroy_pval_item(i);
04959    }
04960 }

pval* linku1 ( pval head,
pval tail 
)

Definition at line 5898 of file pval.c.

Referenced by pvalAppCallAddArg(), pvalCasePatDefAddStatement(), pvalContextAddStatement(), pvalESwitchesAddSwitch(), pvalGlobalsAddStatement(), pvalIncludesAddInclude(), pvalIncludesAddIncludeWithTimeConstraints(), pvalMacroAddArg(), pvalMacroAddStatement(), pvalMacroCallAddArg(), pvalStatementBlockAddStatement(), pvalSwitchAddCase(), pvalSwitchesAddSwitch(), pvalTopLevAddObject(), and yyparse().

05899 {
05900    if (!head)
05901       return tail;
05902    if (tail) {
05903       if (!head->next) {
05904          head->next = tail;
05905       } else {
05906          head->u1_last->next = tail;
05907       }
05908       head->u1_last = tail;
05909       tail->prev = head; /* the dad link only points to containers */
05910    }
05911    return head;
05912 }

struct pval * npval ( pvaltype  type,
int  first_line,
int  last_line,
int  first_column,
int  last_column 
) [read]

Definition at line 3967 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().

03969 {
03970    pval *z = calloc(1, sizeof(struct pval));
03971    z->type = type;
03972    z->startline = first_line;
03973    z->endline = last_line;
03974    z->startcol = first_column;
03975    z->endcol = last_column;
03976    z->filename = strdup(S_OR(my_file, "<none>"));
03977    return z;
03978 }


Variable Documentation

char* prev_word

Definition at line 884 of file ael_lex.c.

Referenced by yydestruct(), and yyparse().


Generated on Thu Apr 16 06:28:11 2015 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6