00001
00008
00010
00011 #ifndef _DVE_COMMONPARSE_HH_
00012 #define _DVE_COMMONPARSE_HH_
00013
00014 #define MAXLEN 64
00015
00017
00020 struct dve_position_t
00021 {
00022 int first_line, first_column, last_line, last_column;
00023 dve_position_t() { reset(); }
00024 dve_position_t(const dve_position_t &loc):
00025 first_line(loc.first_line), first_column(loc.first_column),
00026 last_line(loc.last_line), last_column(loc.last_column) {};
00027 ~dve_position_t(){ };
00028 void reset() {
00029 first_column = first_line = 1;
00030 last_column = last_line = 1;
00031 };
00032 void lines(int num) {
00033 last_column = 1;
00034 last_line += num;
00035 };
00036 void step() {
00037 first_column = last_column;
00038 first_line = last_line;
00039 };
00040 };
00041
00042 #define YYLTYPE dve_position_t
00043
00046 void dve_yyerror(const char * msg);
00048 int dve_yyparse();
00051 void dve_eeerror(const char * msg);
00053 int dve_eeparse();
00056 void dve_tterror(const char * msg);
00058 int dve_ttparse();
00061 void dve_pperror(const char * msg);
00063 int dve_ppparse();
00064
00065 #include "system/dve/syntax_analysis/dve_gramsymb.hh"
00066
00067 #endif