(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 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>
* src/reader.c (readgram): Make sure rules for mid-rule actions
int trace_flag = 0;
const char *skeleton = NULL;
+const char *include = NULL;
extern char *program_name;
skeleton = optarg;
break;
+ case 'I':
+ include = optarg;
+ break;
+
case 'd':
/* Here, the -d and --defines options are differentiated. */
defines_flag = 1;
# define GETARGS_H_
/* flags set by % directives */
-extern char *spec_file_prefix; /* for -b */
-extern char *spec_name_prefix; /* for -p */
-extern const char *skeleton;
+extern char *spec_file_prefix; /* for -b */
+extern char *spec_name_prefix; /* for -p */
+extern const char *skeleton; /* for -S */
+extern const char *include; /* for -I */
extern int debug_flag; /* for -t */
extern int defines_flag; /* for -d */
tok_thong,
tok_define,
tok_skel,
+ tok_include,
tok_noop,
tok_intopt,
tok_stropt,
{opt_both, "no-parser", no_argument, &no_parser_flag, tok_intopt, 'n'},
{opt_both, "raw", no_argument, 0, tok_obsolete, 'r'},
{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'},
{0, 0, 0, 0, 0, 0}
/* 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 |
| any `%' declarations, and copy the contents of any `%{ ... %}' |
parse_skel_decl ();
break;
+ case tok_include:
+ parse_include_decl ();
+ break;
+
case tok_noop:
break;