main.c (flex-2.6.3) | : | main.c (flex-2.6.4) | ||
---|---|---|---|---|
skipping to change at line 274 | skipping to change at line 274 | |||
if (fulltbl && fullspd) | if (fulltbl && fullspd) | |||
flexerror (_ | flexerror (_ | |||
("-Cf and -CF are mutually exclusive")); | ("-Cf and -CF are mutually exclusive")); | |||
} | } | |||
if (C_plus_plus && fullspd) | if (C_plus_plus && fullspd) | |||
flexerror (_("Can't use -+ with -CF option")); | flexerror (_("Can't use -+ with -CF option")); | |||
if (C_plus_plus && yytext_is_array) { | if (C_plus_plus && yytext_is_array) { | |||
warn (_("%array incompatible with -+ option")); | lwarn (_("%array incompatible with -+ option")); | |||
yytext_is_array = false; | yytext_is_array = false; | |||
} | } | |||
if (C_plus_plus && (reentrant)) | if (C_plus_plus && (reentrant)) | |||
flexerror (_("Options -+ and --reentrant are mutually exclusive." )); | flexerror (_("Options -+ and --reentrant are mutually exclusive." )); | |||
if (C_plus_plus && bison_bridge_lval) | if (C_plus_plus && bison_bridge_lval) | |||
flexerror (_("bison bridge not supported for the C++ scanner.")); | flexerror (_("bison bridge not supported for the C++ scanner.")); | |||
if (useecs) { /* Set up doubly-linked equivalence classes. */ | if (useecs) { /* Set up doubly-linked equivalence classes. */ | |||
skipping to change at line 307 | skipping to change at line 307 | |||
} | } | |||
else { | else { | |||
/* Put everything in its own equivalence class. */ | /* Put everything in its own equivalence class. */ | |||
for (i = 1; i <= csize; ++i) { | for (i = 1; i <= csize; ++i) { | |||
ecgroup[i] = i; | ecgroup[i] = i; | |||
nextecm[i] = BAD_SUBSCRIPT; /* to catch errors */ | nextecm[i] = BAD_SUBSCRIPT; /* to catch errors */ | |||
} | } | |||
} | } | |||
if (extra_type) | if (extra_type) | |||
buf_m4_define( &m4defs_buf, "M4_EXTRA_TYPE_DEFS", extra_type); | buf_m4_define( &m4defs_buf, "M4_EXTRA_TYPE_DEFS", extra_type); | |||
if (!use_stdout) { | if (!use_stdout) { | |||
FILE *prev_stdout; | FILE *prev_stdout; | |||
if (!did_outfilename) { | if (!did_outfilename) { | |||
char *suffix; | char *suffix; | |||
if (C_plus_plus) | if (C_plus_plus) | |||
suffix = "cc"; | suffix = "cc"; | |||
else | else | |||
skipping to change at line 357 | skipping to change at line 357 | |||
int m4_length = strlen(m4); | int m4_length = strlen(m4); | |||
do { | do { | |||
size_t length = strlen(path); | size_t length = strlen(path); | |||
struct stat sbuf; | struct stat sbuf; | |||
const char *endOfDir = strchr(path, ':'); | const char *endOfDir = strchr(path, ':'); | |||
if (!endOfDir) | if (!endOfDir) | |||
endOfDir = path+length; | endOfDir = path+length; | |||
{ | { | |||
char m4_path[endOfDir-path + 1 + m4_length + 1]; | char *m4_path = calloc(endOfDir-p ath + 1 + m4_length + 1, 1); | |||
memcpy(m4_path, path, endOfDir-pa th); | memcpy(m4_path, path, endOfDir-pa th); | |||
m4_path[endOfDir-path] = '/'; | m4_path[endOfDir-path] = '/'; | |||
memcpy(m4_path + (endOfDir-path) + 1, m4, m4_length + 1); | memcpy(m4_path + (endOfDir-path) + 1, m4, m4_length + 1); | |||
if (stat(m4_path, &sbuf) == 0 && | if (stat(m4_path, &sbuf) == 0 && | |||
(S_ISREG(sbuf.st_mode)) & & sbuf.st_mode & S_IXUSR) { | (S_ISREG(sbuf.st_mode)) & & sbuf.st_mode & S_IXUSR) { | |||
m4 = strdup(m4_path); | m4 = m4_path; | |||
break; | break; | |||
} | } | |||
free(m4_path); | ||||
} | } | |||
path = endOfDir+1; | path = endOfDir+1; | |||
} while (path[0]); | } while (path[0]); | |||
if (!path[0]) | if (!path[0]) | |||
m4 = M4; | m4 = M4; | |||
} | } | |||
} | } | |||
} | } | |||
filter_create_ext(output_chain, m4, "-P", 0); | filter_create_ext(output_chain, m4, "-P", 0); | |||
filter_create_int(output_chain, filter_fix_linedirs, NULL); | filter_create_int(output_chain, filter_fix_linedirs, NULL); | |||
skipping to change at line 1576 | skipping to change at line 1577 | |||
} | } | |||
if (reject){ | if (reject){ | |||
out_m4_define( "M4_YY_USES_REJECT", NULL); | out_m4_define( "M4_YY_USES_REJECT", NULL); | |||
//outn ("\n#define YY_USES_REJECT"); | //outn ("\n#define YY_USES_REJECT"); | |||
} | } | |||
if (!do_yywrap) { | if (!do_yywrap) { | |||
if (!C_plus_plus) { | if (!C_plus_plus) { | |||
if (reentrant) | if (reentrant) | |||
outn ("\n#define yywrap(yyscanner) (/*CONSTCOND*/ 1)"); | out_str ("\n#define %swrap(yyscanner) (/*CONSTCON D*/1)\n", prefix); | |||
else | else | |||
outn ("\n#define yywrap() (/*CONSTCOND*/1)"); | out_str ("\n#define %swrap() (/*CONSTCOND*/1)\n", prefix); | |||
} | } | |||
outn ("#define YY_SKIP_YYWRAP"); | outn ("#define YY_SKIP_YYWRAP"); | |||
} | } | |||
if (ddebug) | if (ddebug) | |||
outn ("\n#define FLEX_DEBUG"); | outn ("\n#define FLEX_DEBUG"); | |||
OUT_BEGIN_CODE (); | OUT_BEGIN_CODE (); | |||
outn ("typedef flex_uint8_t YY_CHAR;"); | outn ("typedef flex_uint8_t YY_CHAR;"); | |||
OUT_END_CODE (); | OUT_END_CODE (); | |||
End of changes. 7 change blocks. | ||||
7 lines changed or deleted | 8 lines changed or added |