12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #include "sys-defines.h"
- #include "cset.h"
- #include "errarg.h"
- #include "error.h"
- #include "lib.h"
- #include "position.h"
- #include "ptable.h"
- #include "stringclass.h"
- #include "text.h"
- class input
- {
- public:
-
- input ();
- virtual ~input ();
-
- virtual int get (void) = 0;
- virtual int peek (void) = 0;
- virtual int get_location (const char **filenamep, int *linenop);
-
- friend class input_stack;
- friend class copy_rest_thru_input;
- private:
- input *next;
- };
- class file_input : public input
- {
- public:
-
- file_input (FILE *, const char *);
- ~file_input ();
-
- int get (void);
- int peek (void);
- int get_location(const char **filenamep, int *linenop);
- private:
- FILE *fp;
- const char *filename;
- int lineno;
- string line;
- const char *ptr;
- int read_line (void);
- };
- extern int yylex (void);
- extern void copy_file_thru (const char *filename, const char *body, const char *until);
- extern void copy_rest_thru (const char *body, const char *until);
- extern void do_copy (const char *filename);
- extern void do_for (char *var, double from, double to, int by_is_multiplicative, double by, char *body);
- extern void do_lookahead (void);
- extern void lex_cleanup (void);
- extern void lex_error (const char *message, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg);
- extern void lex_init (input *top);
- extern void lex_warning (const char *message, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg);
- extern void push_body (const char *s);
- extern void yyerror (const char *s);
- extern int yyparse();
- extern void parse_init (void);
- extern void parse_cleanup (void);
- extern int delim_flag;
- extern int command_char;
- extern int compatible_flag;
- extern int safer_flag;
- extern int no_centering_flag;
|