NAF Core Library
libnaf 0.6.0 API documentation

lexcore.h File Reference

NAF Core Library Common Lexer API. More...

#include <naf/autoinc.h>

Go to the source code of this file.


Functions

GScanner * naf_lex_init (char *str)
 Initialize a GScanner as a NAF expression lexical scanner over the given string.
GScanner * naf_lex_init_argv (int argc, char *argv[])
 Initialize a GScanner as a NAF expression lexical scanner over the given argument list.

Variables

char * NAF_SYM_BIN
 NAF lexer token.
char * NAF_SYM_UNIFORM
 NAF lexer token.
char * NAF_SYM_START
 NAF lexer token.
char * NAF_SYM_END
 NAF lexer token.
char * NAF_SYM_SEC
 NAF lexer token.
char * NAF_SYM_MIN
 NAF lexer token.
char * NAF_SYM_HR
 NAF lexer token.
char * NAF_SYM_UNIFLOW
 NAF lexer token.
char * NAF_SYM_REVEPH
 NAF lexer token.
char * NAF_SYM_PERIMETER
 NAF lexer token.
char * NAF_SYM_FILTER
 NAF lexer token.
char * NAF_SYM_NOT
 NAF lexer token.
char * NAF_SYM_IN
 NAF lexer token.
char * NAF_SYM_AGGREGATE
 NAF lexer token.
char * NAF_SYM_SRCID
 NAF lexer token.
char * NAF_SYM_SIP
 NAF lexer token.
char * NAF_SYM_DIP
 NAF lexer token.
char * NAF_SYM_SP
 NAF lexer token.
char * NAF_SYM_DP
 NAF lexer token.
char * NAF_SYM_PROTO
 NAF lexer token.
char * NAF_SYM_COUNT
 NAF lexer token.
char * NAF_SYM_TOTAL
 NAF lexer token.
char * NAF_SYM_HOSTS
 NAF lexer token.
char * NAF_SYM_PORTS
 NAF lexer token.
char * NAF_SYM_FLOWS
 NAF lexer token.
char * NAF_SYM_PACKETS
 NAF lexer token.
char * NAF_SYM_OCTETS
 NAF lexer token.
char * NAF_SYM_LABEL
 NAF lexer token.
char * NAF_SYM_REV
 NAF lexer token.
char * NAF_SYM_SRC
 NAF lexer token.
char * NAF_SYM_DEST
 NAF lexer token.
char * NAF_SYM_SORT
 NAF lexer token.
char * NAF_SYM_ASC
 NAF lexer token.
char * NAF_SYM_DESC
 NAF lexer token.
char * NAF_SYM_LIMIT
 NAF lexer token.

Detailed Description

NAF Core Library Common Lexer API.

Used by the aggregation expression parser in nafalize's exparse.c and the common filter implementation defined in filter.h.


Function Documentation

GScanner* naf_lex_init ( char *  str  ) 

Initialize a GScanner as a NAF expression lexical scanner over the given string.

Parameters:
str string to scan
Returns:
a GScanner initialized to read NAF filter and aggregation expressions.

GScanner* naf_lex_init_argv ( int  argc,
char *  argv[] 
)

Initialize a GScanner as a NAF expression lexical scanner over the given argument list.

It is assumed that the argument list has been preprocessed by the GOption facility to remove any switches; skips over argv[0] which contains the invocation name of the process.

Parameters:
argc argument count
argv argument list
Returns:
a GScanner initialized to read NAF filter and aggregation expressions.