Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

wire.c File Reference

#include <ctype.h>
#include <stdarg.h>
#include <setjmp.h>
#include "wire.h"
#include "trie.h"

Defines

#define COMMA   257
#define CONTEXT_STACK_DEPTH   16
#define CREATE   270
#define EQUALS   264
#define EVENT   271
#define FALSE   0
#define FNUMBER   275
#define HANDLER   272
#define HLOGGER   279
#define INCLUDE   265
#define INCLUDEIFX   266
#define INUMBER   274
#define INVALID_TOKEN   273
#define KEYWORD   277
#define LB   262
#define LCP   258
#define LIST   269
#define LP   261
#define MAX_TOKEN_SIZE   1024
#define NAME   276
#define PRINT   267
#define RB   263
#define RCP   259
#define RP   260
#define SET   268
#define TRUE   1
#define VAR   278
#define YY_DECL_NON_LSP_VARIABLES
#define YY_DECL_VARIABLES   YY_DECL_NON_LSP_VARIABLES
#define YYABORT   goto yyabortlab
#define YYACCEPT   goto yyacceptlab
#define YYBACKUP(Token, Value)
#define YYBISON   1 /* Identify Bison output. */
#define yyclearin   (yychar = YYEMPTY)
#define YYCOPY(To, From, Count)
#define YYDEBUG   0
#define YYDPRINTF(Args)
#define YYEMPTY   -2
#define YYEOF   0
#define YYERRCODE   256
#define yyerrok   (yyerrstatus = 0)
#define YYERROR   goto yyerrlab1
#define YYFAIL   goto yyerrlab
#define YYFINAL   83
#define YYFLAG   -32768
#define YYINITDEPTH   200
#define YYLAST   75
#define YYLEX   yylex ()
#define YYLLOC_DEFAULT(Current, Rhs, N)
#define YYMAXDEPTH   10000
#define YYNTBASE   26
#define YYPARSE_PARAM_ARG
#define YYPARSE_PARAM_DECL
#define YYPOPSTACK   (yyvsp--, yyssp--)
#define YYRECOVERING()   (!!yyerrstatus)
#define YYSIZE_T   unsigned int
#define YYSTACK_ALLOC   malloc
#define YYSTACK_BYTES(N)
#define YYSTACK_FREE   free
#define YYSTACK_GAP_MAX   (sizeof (union yyalloc) - 1)
#define YYSTACK_RELOCATE(Stack)
#define YYSTYPE   yystype
#define YYSTYPE_IS_TRIVIAL   1
#define YYTERROR   1
#define YYTRANSLATE(x)   ((unsigned)(x) <= 279 ? yytranslate[x] : 64)

Typedefs

typedef include_stack_s include_stack_t

Enumerations

enum  { NO_CONTEXT, GLOBAL_CONTEXT, SET_CONTEXT, CREATE_CONTEXT }

Functions

void aw_wire_destroy (aw_wire_monitor_t *wm)
 Stop the monitor, free all resources.

void aw_wire_destroy_event_sig (void *ptr)
void aw_wire_destroy_logger (void *ptr)
void aw_wire_free_obj (void *obj)
 Free resources associated with wire obj.

aw_wire_keyword_t * aw_wire_keyfind (const byte_t *kw, aw_wire_keyword_t *kwlist)
 Find a keyword in kw list.

aw_wire_monitor_t * aw_wire_make (aw_wire_mkmonitor_args_t *args)
 Read text from stream/file, load monitor, start monitor.

aw_event_sig_t * aw_wire_make_event_sig (aw_address_t event_id, aw_wire_keyword_t *kwlist, FILE *message_stream)
aw_logger_t * aw_wire_make_logger (aw_wire_keyword_t *kwlist, FILE *message_stream)
aw_wire_obj_t * make_wire_obj (aw_wire_obj_cd_t type, void *ptr, void(*destroy)(void *obj))
int yyerror (byte_t *format,...)
int yylex (void)
YY_DECL_VARIABLES int yyparse (YYPARSE_PARAM_ARG)


Define Documentation

#define COMMA   257
 

#define CONTEXT_STACK_DEPTH   16
 

#define CREATE   270
 

#define EQUALS   264
 

#define EVENT   271
 

#define FALSE   0
 

#define FNUMBER   275
 

#define HANDLER   272
 

#define HLOGGER   279
 

#define INCLUDE   265
 

#define INCLUDEIFX   266
 

#define INUMBER   274
 

#define INVALID_TOKEN   273
 

#define KEYWORD   277
 

#define LB   262
 

#define LCP   258
 

#define LIST   269
 

#define LP   261
 

#define MAX_TOKEN_SIZE   1024
 

#define NAME   276
 

#define PRINT   267
 

#define RB   263
 

#define RCP   259
 

#define RP   260
 

#define SET   268
 

#define TRUE   1
 

#define VAR   278
 

#define YY_DECL_NON_LSP_VARIABLES
 

Value:

/* The lookahead symbol.  */                            \
int yychar;                                             \
                                                        \
/* The semantic value of the lookahead symbol. */       \
YYSTYPE yylval;                                         \
                                                        \
/* Number of parse errors so far.  */                   \
int yynerrs;

#define YY_DECL_VARIABLES   YY_DECL_NON_LSP_VARIABLES
 

#define YYABORT   goto yyabortlab
 

#define YYACCEPT   goto yyacceptlab
 

#define YYBACKUP (  Token,
Value   ) 
 

Value:

do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
    {                                                           \
      yychar = (Token);                                         \
      yylval = (Value);                                         \
      yychar1 = YYTRANSLATE (yychar);                           \
      YYPOPSTACK;                                               \
      goto yybackup;                                            \
    }                                                           \
  else                                                          \
    {                                                           \
      yyerror ("syntax error: cannot back up");                 \
      YYERROR;                                                  \
    }                                                           \
while (0)

#define YYBISON   1 /* Identify Bison output. */
 

#define yyclearin   (yychar = YYEMPTY)
 

#define YYCOPY (  To,
From,
Count   ) 
 

Value:

do                                      \
        {                                       \
          register YYSIZE_T yyi;                \
          for (yyi = 0; yyi < (Count); yyi++)   \
            (To)[yyi] = (From)[yyi];            \
        }                                       \
      while (0)

#define YYDEBUG   0
 

#define YYDPRINTF (  Args   ) 
 

#define YYEMPTY   -2
 

#define YYEOF   0
 

#define YYERRCODE   256
 

#define yyerrok   (yyerrstatus = 0)
 

#define YYERROR   goto yyerrlab1
 

#define YYFAIL   goto yyerrlab
 

#define YYFINAL   83
 

#define YYFLAG   -32768
 

#define YYINITDEPTH   200
 

#define YYLAST   75
 

#define YYLEX   yylex ()
 

#define YYLLOC_DEFAULT (  Current,
Rhs,
N   ) 
 

Value:

Current.last_line   = Rhs[N].last_line; \
   Current.last_column = Rhs[N].last_column;

#define YYMAXDEPTH   10000
 

#define YYNTBASE   26
 

#define YYPARSE_PARAM_ARG
 

#define YYPARSE_PARAM_DECL
 

#define YYPOPSTACK   (yyvsp--, yyssp--)
 

 
#define YYRECOVERING (   )     (!!yyerrstatus)
 

#define YYSIZE_T   unsigned int
 

#define YYSTACK_ALLOC   malloc
 

#define YYSTACK_BYTES (  N   ) 
 

Value:

((N) * (sizeof (short) + sizeof (YYSTYPE))                              \
      + YYSTACK_GAP_MAX)

#define YYSTACK_FREE   free
 

#define YYSTACK_GAP_MAX   (sizeof (union yyalloc) - 1)
 

#define YYSTACK_RELOCATE (  Stack   ) 
 

Value:

do                                                                      \
      {                                                                 \
        YYSIZE_T yynewbytes;                                            \
        YYCOPY (&yyptr->Stack, Stack, yysize);                          \
        Stack = &yyptr->Stack;                                          \
        yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX;   \
        yyptr += yynewbytes / sizeof (*yyptr);                          \
      }                                                                 \
    while (0)

#define YYSTYPE   yystype
 

#define YYSTYPE_IS_TRIVIAL   1
 

#define YYTERROR   1
 

#define YYTRANSLATE (  x   )     ((unsigned)(x) <= 279 ? yytranslate[x] : 64)
 


Typedef Documentation

typedef struct include_stack_s include_stack_t
 


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
NO_CONTEXT 
GLOBAL_CONTEXT 
SET_CONTEXT 
CREATE_CONTEXT 


Function Documentation

void aw_wire_destroy (  aw_wire_monitor_t *  wm  ) 
 

Stop the monitor, free all resources.

Parameters:
wm wire_monitor_t to be free'd

void aw_wire_destroy_event_sig (  void *  ptr  ) 
 

void aw_wire_destroy_logger (  void *  ptr  ) 
 

void aw_wire_free_obj (  void *  obj  ) 
 

Free resources associated with wire obj.

Parameters:
obj Wire object

aw_wire_keyword_t* aw_wire_keyfind (  const byte_t *  kw,
aw_wire_keyword_t *  kwlist
) 
 

Find a keyword in kw list.

Parameters:
kw String to find
kwlist List to search
Returns:
Keyword struct or NULL

aw_wire_monitor_t* aw_wire_make (  aw_wire_mkmonitor_args_t *  args  ) 
 

Read text from stream/file, load monitor, start monitor.

Parameters:
args Args struct
Returns:
A wire_monitor_t object with monitor running

aw_event_sig_t* aw_wire_make_event_sig (  aw_address_t  event_id,
aw_wire_keyword_t *  kwlist,
FILE *  message_stream
) 
 

aw_logger_t* aw_wire_make_logger (  aw_wire_keyword_t *  kwlist,
FILE *  message_stream
) 
 

aw_wire_obj_t* make_wire_obj (  aw_wire_obj_cd_t  type,
void *  ptr,
void(*  destroy)(void *obj)
) 
 

int yyerror (  byte_t *  format,
... 
) 
 

int yylex (  void   ) 
 

YY_DECL_VARIABLES int yyparse (  YYPARSE_PARAM_ARG   ) 
 

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)