Thu Apr 28 2011 17:15:26

Asterisk developer's documentation


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)
#define YY_TYPEDEF_YY_SCANNER_T

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.

#define YY_TYPEDEF_YY_SCANNER_T

Definition at line 70 of file ael_structs.h.


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 381 of file pval.c.

References ast_log(), LOG_ERROR, and print_pval_list().

{
   FILE *fin = fopen(fname,"w");
   if ( !fin ) {
      ast_log(LOG_ERROR, "Couldn't open %s for writing.\n", fname);
      return;
   }
   print_pval_list(fin, tree, 0);
   fclose(fin);
}
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(), errs, notes, and warns.

Referenced by pbx_load_module().

{
   
#ifdef AAL_ARGCHECK
   int argapp_errs =0;
   char *rfilename;
#endif
   struct argapp *apps=0;

   if (!item)
      return; /* don't check an empty tree */
#ifdef AAL_ARGCHECK
   rfilename = alloca(10 + strlen(ast_config_AST_VAR_DIR));
   sprintf(rfilename, "%s/applist", ast_config_AST_VAR_DIR);
   
   apps = argdesc_parse(rfilename, &argapp_errs); /* giveth */
#endif
   current_db = item;
   errs = warns = notes = 0;

   check_context_names();
   check_pval(item, apps, 0);

#ifdef AAL_ARGCHECK
   argdesc_destroy(apps);  /* taketh away */
#endif
   current_db = 0;

   *arg_errs = errs;
   *arg_warns = warns;
   *arg_notes = notes;
}
void destroy_pval ( pval item)

Definition at line 4890 of file pval.c.

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

{
   pval *i,*nxt;
   
   for (i=item; i; i=nxt) {
      nxt = i->next;
      
      destroy_pval_item(i);
   }
}
pval* linku1 ( pval head,
pval tail 
)

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().

{
   if (!head)
      return tail;
   if (tail) {
      if (!head->next) {
         head->next = tail;
      } else {
         head->u1_last->next = tail;
      }
      head->u1_last = tail;
      tail->prev = head; /* the dad link only points to containers */
   }
   return head;
}
struct pval * npval ( pvaltype  type,
int  first_line,
int  last_line,
int  first_column,
int  last_column 
) [read]

Definition at line 3908 of file ael.tab.c.

References calloc, pval::endcol, pval::endline, pval::filename, S_OR, pval::startcol, pval::startline, strdup, type, and pval::type.

Referenced by npval2(), and yyparse().

{
   pval *z = calloc(1, sizeof(struct pval));
   z->type = type;
   z->startline = first_line;
   z->endline = last_line;
   z->startcol = first_column;
   z->endcol = last_column;
   z->filename = strdup(S_OR(my_file, "<none>"));
   return z;
}

Variable Documentation

char* prev_word

Definition at line 883 of file ael_lex.c.

Referenced by yydestruct(), and yyparse().