mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
* src/reader.c (parse_include_decl): New, Not yet implemented.
(read_declarations): Add case tok_include. * src/getargs.h (include): Add its extern definition. * src/getargs.c (include): New const char *. (getargs): Add case '-I'. * src/options.c (option_table): Add include as command line and percent option. * src/lex.h (token_t): Add tok_include.
This commit is contained in:
11
ChangeLog
11
ChangeLog
@@ -1,3 +1,14 @@
|
|||||||
|
2001-11-26 Marc Autret <autret_m@epita.fr>
|
||||||
|
|
||||||
|
* src/reader.c (parse_include_decl): New, Not yet implemented.
|
||||||
|
(read_declarations): Add case tok_include.
|
||||||
|
* src/getargs.h (include): Add its extern definition.
|
||||||
|
* src/getargs.c (include): New const char *.
|
||||||
|
(getargs): Add case '-I'.
|
||||||
|
* src/options.c (option_table): Add include as command line and
|
||||||
|
percent option.
|
||||||
|
* src/lex.h (token_t): Add tok_include.
|
||||||
|
|
||||||
2001-11-26 Akim Demaille <akim@epita.fr>
|
2001-11-26 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* src/reader.c (readgram): Make sure rules for mid-rule actions
|
* src/reader.c (readgram): Make sure rules for mid-rule actions
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ int graph_flag = 0;
|
|||||||
int trace_flag = 0;
|
int trace_flag = 0;
|
||||||
|
|
||||||
const char *skeleton = NULL;
|
const char *skeleton = NULL;
|
||||||
|
const char *include = NULL;
|
||||||
|
|
||||||
extern char *program_name;
|
extern char *program_name;
|
||||||
|
|
||||||
@@ -168,6 +169,10 @@ getargs (int argc, char *argv[])
|
|||||||
skeleton = optarg;
|
skeleton = optarg;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'I':
|
||||||
|
include = optarg;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'd':
|
case 'd':
|
||||||
/* Here, the -d and --defines options are differentiated. */
|
/* Here, the -d and --defines options are differentiated. */
|
||||||
defines_flag = 1;
|
defines_flag = 1;
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
/* flags set by % directives */
|
/* flags set by % directives */
|
||||||
extern char *spec_file_prefix; /* for -b */
|
extern char *spec_file_prefix; /* for -b */
|
||||||
extern char *spec_name_prefix; /* for -p */
|
extern char *spec_name_prefix; /* for -p */
|
||||||
extern const char *skeleton;
|
extern const char *skeleton; /* for -S */
|
||||||
|
extern const char *include; /* for -I */
|
||||||
|
|
||||||
extern int debug_flag; /* for -t */
|
extern int debug_flag; /* for -t */
|
||||||
extern int defines_flag; /* for -d */
|
extern int defines_flag; /* for -d */
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ typedef enum token_e
|
|||||||
tok_thong,
|
tok_thong,
|
||||||
tok_define,
|
tok_define,
|
||||||
tok_skel,
|
tok_skel,
|
||||||
|
tok_include,
|
||||||
tok_noop,
|
tok_noop,
|
||||||
tok_intopt,
|
tok_intopt,
|
||||||
tok_stropt,
|
tok_stropt,
|
||||||
|
|||||||
@@ -116,6 +116,7 @@ const struct option_table_struct option_table[] =
|
|||||||
{opt_both, "no-parser", no_argument, &no_parser_flag, tok_intopt, 'n'},
|
{opt_both, "no-parser", no_argument, &no_parser_flag, tok_intopt, 'n'},
|
||||||
{opt_both, "raw", no_argument, 0, tok_obsolete, 'r'},
|
{opt_both, "raw", no_argument, 0, tok_obsolete, 'r'},
|
||||||
{opt_both, "skeleton", required_argument, 0, tok_skel, 'S'},
|
{opt_both, "skeleton", required_argument, 0, tok_skel, 'S'},
|
||||||
|
{opt_both, "include", required_argument, 0, tok_include, 'I'},
|
||||||
{opt_both, "token-table", no_argument, &token_table_flag, tok_intopt, 'k'},
|
{opt_both, "token-table", no_argument, &token_table_flag, tok_intopt, 'k'},
|
||||||
|
|
||||||
{0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0}
|
||||||
|
|||||||
14
src/reader.c
14
src/reader.c
@@ -974,6 +974,16 @@ parse_skel_decl (void)
|
|||||||
/* Complete with parse_dquoted_param () on the CVS branch 1.29. */
|
/* Complete with parse_dquoted_param () on the CVS branch 1.29. */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*---------------------------------------.
|
||||||
|
| Parse what comes after %skeleton_path. |
|
||||||
|
`---------------------------------------*/
|
||||||
|
|
||||||
|
void
|
||||||
|
parse_include_decl (void)
|
||||||
|
{
|
||||||
|
/* Complete with parse_dquoted_param () on the CVS branch 1.29. */
|
||||||
|
}
|
||||||
|
|
||||||
/*----------------------------------------------------------------.
|
/*----------------------------------------------------------------.
|
||||||
| Read from finput until `%%' is seen. Discard the `%%'. Handle |
|
| Read from finput until `%%' is seen. Discard the `%%'. Handle |
|
||||||
| any `%' declarations, and copy the contents of any `%{ ... %}' |
|
| any `%' declarations, and copy the contents of any `%{ ... %}' |
|
||||||
@@ -1048,6 +1058,10 @@ read_declarations (void)
|
|||||||
parse_skel_decl ();
|
parse_skel_decl ();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case tok_include:
|
||||||
|
parse_include_decl ();
|
||||||
|
break;
|
||||||
|
|
||||||
case tok_noop:
|
case tok_noop:
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user