Parser


Defines

#define parser_add_file(p, filename)   do { p = _parser_add_file( p, filename );} while(0)
#define parser_add_params(p, argc, argv)   do { p = _parser_add_params( p, argc, argv );} while(0)
#define parser_add_string(p, s)   do { p = _parser_add_string( p, s );} while(0)

Functions

parser_tparser_init (int argc, char **argv, const char *filename, char *cmdline)
parser_t_parser_add_file (parser_t *p, const char *filename)
parser_t_parser_add_params (parser_t *p, int argc, char **argv)
parser_t_parser_add_string (parser_t *p, char *s)
void parser_delete (parser_t *p)
void parser_print (parser_t *p)
int parser_get_int (const parser_t *p, const char *varname)
double parser_get_double (const parser_t *p, const char *varname)
byte parser_get_byte (const parser_t *p, const char *varname)
char * parser_get_string (const parser_t *p, const char *varname)
cplx parser_get_cplx (const parser_t *p, const char *varname)
vec parser_get_vec (const parser_t *p, const char *varname)
ivec parser_get_ivec (const parser_t *p, const char *varname)
bvec parser_get_bvec (const parser_t *p, const char *varname)
cvec parser_get_cvec (const parser_t *p, const char *varname)
mat parser_get_mat (const parser_t *p, const char *varname)
imat parser_get_imat (const parser_t *p, const char *varname)
bmat parser_get_bmat (const parser_t *p, const char *varname)
cmat parser_get_cmat (const parser_t *p, const char *varname)
int parser_exists (const parser_t *p, const char *varname)
int parser_get_int_verbose (const parser_t *p, const char *varname, int verbose)
double parser_get_double_verbose (const parser_t *p, const char *varname, int verbose)
byte parser_get_byte_verbose (const parser_t *p, const char *varname, int verbose)
char * parser_get_string_verbose (const parser_t *p, const char *varname, int verbose)
cplx parser_get_cplx_verbose (const parser_t *p, const char *varname, int verbose)
vec parser_get_vec_verbose (const parser_t *p, const char *varname, int verbose)
ivec parser_get_ivec_verbose (const parser_t *p, const char *varname, int verbose)
bvec parser_get_bvec_verbose (const parser_t *p, const char *varname, int verbose)
cvec parser_get_cvec_verbose (const parser_t *p, const char *varname, int verbose)
mat parser_get_mat_verbose (const parser_t *p, const char *varname, int verbose)
imat parser_get_imat_verbose (const parser_t *p, const char *varname, int verbose)
bmat parser_get_bmat_verbose (const parser_t *p, const char *varname, int verbose)
cmat parser_get_cmat_verbose (const parser_t *p, const char *varname, int verbose)

Detailed Description


Define Documentation

#define parser_add_file ( p,
filename   )     do { p = _parser_add_file( p, filename );} while(0)

Definition at line 62 of file parser.h.

#define parser_add_params ( p,
argc,
argv   )     do { p = _parser_add_params( p, argc, argv );} while(0)

Definition at line 63 of file parser.h.

#define parser_add_string ( p,
 )     do { p = _parser_add_string( p, s );} while(0)

Definition at line 64 of file parser.h.


Function Documentation

parser_t* _parser_add_file ( parser_t p,
const char *  filename 
)

Definition at line 124 of file parser.c.

References _parser_add_string(), and it_warning().

Referenced by parser_init().

parser_t* _parser_add_params ( parser_t p,
int  argc,
char **  argv 
)

Definition at line 110 of file parser.c.

References Vec_push.

Referenced by parser_init().

parser_t* _parser_add_string ( parser_t p,
char *  s 
)

Definition at line 33 of file parser.c.

References Vec_head, Vec_length, and Vec_push.

Referenced by _parser_add_file(), and parser_init().

void parser_delete ( parser_t p  ) 

Definition at line 171 of file parser.c.

References Vec_delete, and Vec_length.

Referenced by main().

int parser_exists ( const parser_t p,
const char *  varname 
)

Definition at line 218 of file parser.c.

References parser_var_line().

bmat parser_get_bmat ( const parser_t p,
const char *  varname 
)

bmat parser_get_bmat_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

bvec parser_get_bvec ( const parser_t p,
const char *  varname 
)

bvec parser_get_bvec_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

byte parser_get_byte ( const parser_t p,
const char *  varname 
)

Definition at line 361 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

byte parser_get_byte_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

Definition at line 397 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

cmat parser_get_cmat ( const parser_t p,
const char *  varname 
)

Definition at line 924 of file parser.c.

References cmat_new_alloc(), it_error(), it_fprintf(), it_read_cmat(), it_warning(), parser_output, and parser_var_line().

Referenced by main().

cmat parser_get_cmat_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

cplx parser_get_cplx ( const parser_t p,
const char *  varname 
)

Definition at line 551 of file parser.c.

References cplx_0, it_fprintf(), it_read_cplx(), it_warning(), parser_output, and parser_var_line().

cplx parser_get_cplx_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

Definition at line 580 of file parser.c.

References cplx_0, it_fprintf(), it_read_cplx(), it_warning(), parser_output, and parser_var_line().

cvec parser_get_cvec ( const parser_t p,
const char *  varname 
)

Definition at line 672 of file parser.c.

References cvec_new_alloc(), it_error(), it_fprintf(), it_read_cvec(), it_warning(), parser_output, and parser_var_line().

Referenced by main().

cvec parser_get_cvec_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

double parser_get_double ( const parser_t p,
const char *  varname 
)

Definition at line 294 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

Referenced by main().

double parser_get_double_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

Definition at line 327 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

imat parser_get_imat ( const parser_t p,
const char *  varname 
)

imat parser_get_imat_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

int parser_get_int ( const parser_t p,
const char *  varname 
)

Definition at line 227 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

Referenced by main().

int parser_get_int_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

Definition at line 260 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

ivec parser_get_ivec ( const parser_t p,
const char *  varname 
)

Definition at line 735 of file parser.c.

References it_error(), it_fprintf(), it_read_ivec(), it_warning(), ivec_new_alloc(), parser_output, and parser_var_line().

Referenced by main().

ivec parser_get_ivec_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

mat parser_get_mat ( const parser_t p,
const char *  varname 
)

Definition at line 861 of file parser.c.

References it_error(), it_fprintf(), it_read_mat(), it_warning(), mat_new_alloc(), parser_output, and parser_var_line().

Referenced by main().

mat parser_get_mat_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

char* parser_get_string ( const parser_t p,
const char *  varname 
)

Definition at line 434 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

Referenced by main().

char* parser_get_string_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

Definition at line 492 of file parser.c.

References it_warning(), parser_output, and parser_var_line().

vec parser_get_vec ( const parser_t p,
const char *  varname 
)

Definition at line 609 of file parser.c.

References it_error(), it_fprintf(), it_read_vec(), it_warning(), parser_output, parser_var_line(), and vec_new_alloc().

Referenced by main().

vec parser_get_vec_verbose ( const parser_t p,
const char *  varname,
int  verbose 
)

parser_t* parser_init ( int  argc,
char **  argv,
const char *  filename,
char *  cmdline 
)

Definition at line 152 of file parser.c.

References _parser_add_file(), _parser_add_params(), _parser_add_string(), and Vec_new.

Referenced by main().

void parser_print ( parser_t p  ) 

Definition at line 181 of file parser.c.

References Vec_length.

Referenced by main().


Hosted by
Copyright (C) 2005-2006 Hervé Jégou
Vivien Chappelier
Francois Cayre
libit logo courtesy of Jonathan Delhumeau