1 |
/* Concentrate all options use in bison, |
/* Concentrate all options use in bison, |
2 |
Copyright 2001 Free Software Foundation, Inc. |
Copyright 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of Bison, the GNU Compiler Compiler. |
This file is part of Bison, the GNU Compiler Compiler. |
5 |
|
|
34 |
|
|
35 |
/* This is the general struct, which contains user's options from |
/* This is the general struct, which contains user's options from |
36 |
command line or in grammar with percent flag. */ |
command line or in grammar with percent flag. */ |
37 |
struct option_table_struct |
struct option_table_s |
38 |
{ |
{ |
39 |
/* Set the accessibility. */ |
/* Set the accessibility. */ |
40 |
opt_access_t access; |
opt_access_t access; |
42 |
const char *name; |
const char *name; |
43 |
/* Use for command line. */ |
/* Use for command line. */ |
44 |
int has_arg; |
int has_arg; |
45 |
/* A set_flag value causes the named flag to be set. */ |
/* An optional lvalue to be set. */ |
46 |
void *set_flag; |
void *flag; |
47 |
/* A retval action returns the code. */ |
/* A retval action returns the code. */ |
48 |
int ret_val; |
int ret_val; |
49 |
/* The short option value, frequently a letter. */ |
/* The short option value, frequently a letter. */ |
53 |
extern const char *shortopts; |
extern const char *shortopts; |
54 |
|
|
55 |
/* Table which contain all options. */ |
/* Table which contain all options. */ |
56 |
extern const struct option_table_struct option_table[]; |
extern const struct option_table_s option_table[]; |
57 |
|
|
58 |
/* Set the longopts variable from option_table. */ |
/* Return a malloc'd list of the options for getopt_long. */ |
59 |
struct option *long_option_table_new PARAMS ((void)); |
struct option *long_option_table_new PARAMS ((void)); |
60 |
|
|
61 |
#endif /* !OPTIONS_H_ */ |
#endif /* !OPTIONS_H_ */ |