From: nuffer Date: Fri, 2 Jan 2004 15:33:07 +0000 (+0000) Subject: Integrated debian patches. X-Git-Tag: 0.13.6~751 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16f9afc1b02ae85b04bb98de82a570615207740e;p=re2c Integrated debian patches. --- diff --git a/main.cc b/main.cc index 9e22c23e..b831a8a9 100644 --- a/main.cc +++ b/main.cc @@ -1,4 +1,4 @@ -#include +#include #include #include #include @@ -11,6 +11,8 @@ char *fileName; bool sFlag = false; bool bFlag = false; +using namespace std; + int main(unsigned argc, char *argv[]){ fileName = NULL; if(argc == 1) diff --git a/scanner.cc b/scanner.cc index 53fcb08d..576680f7 100644 --- a/scanner.cc +++ b/scanner.cc @@ -1,4 +1,4 @@ -/* Generated by re2c 0.5 on Sat May 15 11:35:52 1999 */ +/* Generated by re2c 0.5 on Sat Apr 6 20:23:48 2002 */ #line 1 "scanner.re" #include #include @@ -85,7 +85,7 @@ yy4: yych = *++YYCURSOR; yy5: #line 78 { if(cursor == eof) RETURN(0); - out.write(tok, cursor - tok); + out.write((char *)tok, cursor - tok); tok = pos = cursor; cline++; goto echo; } yy6: yych = *++YYCURSOR; @@ -107,7 +107,7 @@ yy12: yych = *++YYCURSOR; yy13: yych = *++YYCURSOR; yy14: #line 75 - { out.write(tok, &cursor[-7] - tok); + { out.write((char *)tok, &cursor[-7] - tok); tok = cursor; RETURN(1); } } diff --git a/scanner.re b/scanner.re index bad4659c..6e155ab8 100644 --- a/scanner.re +++ b/scanner.re @@ -72,11 +72,11 @@ int Scanner::echo(ostream &out){ tok = cursor; echo: /*!re2c - "/*!re2c" { out.write(tok, &cursor[-7] - tok); + "/*!re2c" { out.write((char *)tok, &cursor[-7] - tok); tok = cursor; RETURN(1); } "\n" { if(cursor == eof) RETURN(0); - out.write(tok, cursor - tok); + out.write((char *)tok, cursor - tok); tok = pos = cursor; cline++; goto echo; } any { goto echo; } diff --git a/y.tab.h b/y.tab.h index d7b3702d..5642287b 100644 --- a/y.tab.h +++ b/y.tab.h @@ -1,12 +1,22 @@ -#define CLOSE 257 -#define ID 258 -#define CODE 259 -#define RANGE 260 -#define STRING 261 +#ifndef BISON_Y_TAB_H +# define BISON_Y_TAB_H + +#ifndef YYSTYPE typedef union { Symbol *symbol; RegExp *regexp; Token *token; char op; -} YYSTYPE; +} yystype; +# define YYSTYPE yystype +#endif +# define CLOSE 257 +# define ID 258 +# define CODE 259 +# define RANGE 260 +# define STRING 261 + + extern YYSTYPE yylval; + +#endif /* not BISON_Y_TAB_H */