*** bison.simple.orig Wed Sep 30 15:33:59 1992 --- bison.simple Wed Sep 30 15:34:29 1992 *************** *** 38,43 **** --- 38,50 ---- #endif /* not GNU C. */ #endif /* alloca not defined. */ + #ifdef atarist + #include + #include + #include + #include + #endif /* atarist */ + /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. It was written by Richard Stallman by simplifying the hairy parser *** files.c.orig Wed Sep 30 15:34:00 1992 --- files.c Wed Sep 30 15:35:20 1992 *************** *** 69,74 **** --- 69,77 ---- extern int verboseflag; extern int definesflag; int fixed_outfiles = 0; + #ifdef atarist + long _stksize = -1L; + #endif char* *************** *** 116,127 **** #endif int tmp_len; ! #ifdef MSDOS ! tmp_base = getenv ("TMP"); if (tmp_base == 0) tmp_base = ""; strlwr (infile); ! #endif /* MSDOS */ tmp_len = strlen (tmp_base); --- 119,131 ---- #endif int tmp_len; ! #if defined(MSDOS) || defined(atarist) ! tmp_base = getenv ("TEMP"); ! if(tmp_base == 0) tmp_base = getenv("TMP"); if (tmp_base == 0) tmp_base = ""; strlwr (infile); ! #endif /* MSDOS || atarist */ tmp_len = strlen (tmp_base); *************** *** 130,138 **** /* -o was specified. The precise -o name will be used for ftable. For other output files, remove the ".c" or ".tab.c" suffix. */ name_base = spec_outfile; ! #ifdef MSDOS strlwr (name_base); ! #endif /* MSDOS */ /* BASE_LENGTH includes ".tab" but not ".c". */ base_length = strlen (name_base); if (!strcmp (name_base + base_length - 2, ".c")) --- 134,142 ---- /* -o was specified. The precise -o name will be used for ftable. For other output files, remove the ".c" or ".tab.c" suffix. */ name_base = spec_outfile; ! #if defined(MSDOS) || defined(atarist) strlwr (name_base); ! #endif /* MSDOS || atarist */ /* BASE_LENGTH includes ".tab" but not ".c". */ base_length = strlen (name_base); if (!strcmp (name_base + base_length - 2, ".c")) *************** *** 159,165 **** #else strcat (name_base, ".tab"); #endif ! #ifdef MSDOS strlwr (name_base); #endif /* MSDOS */ } --- 163,169 ---- #else strcat (name_base, ".tab"); #endif ! #if defined(MSDOS) || defined(atarist) strlwr (name_base); #endif /* MSDOS */ } *************** *** 180,190 **** #ifdef VMS name_base = stringappend(name_base, short_base_length, "_tab"); #else ! #ifdef MSDOS name_base = stringappend(name_base, short_base_length, "_tab"); #else name_base = stringappend(name_base, short_base_length, ".tab"); ! #endif /* not MSDOS */ #endif base_length = short_base_length + 4; } --- 184,194 ---- #ifdef VMS name_base = stringappend(name_base, short_base_length, "_tab"); #else ! #if defined(MSDOS) || defined(atarist) name_base = stringappend(name_base, short_base_length, "_tab"); #else name_base = stringappend(name_base, short_base_length, ".tab"); ! #endif /* not MSDOS || atarist */ #endif base_length = short_base_length + 4; } *************** *** 192,200 **** finput = tryopen(infile, "r"); filename = getenv("BISON_SIMPLE"); ! #ifdef MSDOS /* File doesn't exist in current directory; try in INIT directory. */ cp = getenv("INIT"); if (filename == 0 && cp != 0) { filename = malloc(strlen(cp) + strlen(PFILE) + 2); --- 196,208 ---- finput = tryopen(infile, "r"); filename = getenv("BISON_SIMPLE"); ! #if defined(MSDOS) || defined(atarist) /* File doesn't exist in current directory; try in INIT directory. */ + #ifdef atarist + cp = getenv("GNULIB"); + #else cp = getenv("INIT"); + #endif if (filename == 0 && cp != 0) { filename = malloc(strlen(cp) + strlen(PFILE) + 2); *************** *** 208,214 **** if (verboseflag) { ! #ifdef MSDOS outfile = stringappend(name_base, short_base_length, ".out"); #else if (spec_name_prefix) --- 216,222 ---- if (verboseflag) { ! #if defined(MSDOS) || defined(atarist) outfile = stringappend(name_base, short_base_length, ".out"); #else if (spec_name_prefix) *************** *** 219,225 **** foutput = tryopen(outfile, "w"); } ! #ifdef MSDOS actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX")); tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX")); tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX")); --- 227,233 ---- foutput = tryopen(outfile, "w"); } ! #if defined(MSDOS) || defined(atarist) actfile = mktemp(stringappend(tmp_base, tmp_len, "acXXXXXX")); tmpattrsfile = mktemp(stringappend(tmp_base, tmp_len, "atXXXXXX")); tmptabfile = mktemp(stringappend(tmp_base, tmp_len, "taXXXXXX")); *************** *** 241,247 **** fdefines = tryopen(tmpdefsfile, "w+"); } ! #ifndef MSDOS unlink(actfile); unlink(tmpattrsfile); unlink(tmptabfile); --- 249,255 ---- fdefines = tryopen(tmpdefsfile, "w+"); } ! #if !(defined(MSDOS) || defined(atarist)) unlink(actfile); unlink(tmpattrsfile); unlink(tmptabfile); *************** *** 258,264 **** attrsfile = stringappend(name_base, short_base_length, "_stype.h"); guardfile = stringappend(name_base, short_base_length, "_guard.c"); #else ! #ifdef MSDOS attrsfile = stringappend(name_base, short_base_length, ".sth"); guardfile = stringappend(name_base, short_base_length, ".guc"); #else --- 266,272 ---- attrsfile = stringappend(name_base, short_base_length, "_stype.h"); guardfile = stringappend(name_base, short_base_length, "_guard.c"); #else ! #if defined(MSDOS) || defined(atarist) attrsfile = stringappend(name_base, short_base_length, ".sth"); guardfile = stringappend(name_base, short_base_length, ".guc"); #else *************** *** 283,291 **** fclose(fparser); filename = (char *) getenv ("BISON_HAIRY"); ! #ifdef MSDOS /* File doesn't exist in current directory; try in INIT directory. */ cp = getenv("INIT"); if (filename == 0 && cp != 0) { filename = malloc(strlen(cp) + strlen(PFILE1) + 2); --- 291,303 ---- fclose(fparser); filename = (char *) getenv ("BISON_HAIRY"); ! #if defined(MSDOS) || defined(atarist) /* File doesn't exist in current directory; try in INIT directory. */ + #ifdef atarist + cp = getenv("GNULIB"); + #else cp = getenv("INIT"); + #endif if (filename == 0 && cp != 0) { filename = malloc(strlen(cp) + strlen(PFILE1) + 2); *************** *** 385,391 **** if (k==0) sys$exit(SS$_NORMAL); sys$exit(SS$_ABORT); #else ! #ifdef MSDOS if (actfile) unlink(actfile); if (tmpattrsfile) unlink(tmpattrsfile); if (tmptabfile) unlink(tmptabfile); --- 397,403 ---- if (k==0) sys$exit(SS$_NORMAL); sys$exit(SS$_ABORT); #else ! #if defined(MSDOS) || defined(atarist) if (actfile) unlink(actfile); if (tmpattrsfile) unlink(tmpattrsfile); if (tmptabfile) unlink(tmptabfile); *** reader.c.orig Wed Sep 30 15:34:01 1992 --- reader.c Wed Sep 30 15:34:30 1992 *************** *** 52,58 **** extern int expected_conflicts; extern char *token_buffer; ! #ifndef MSDOS extern char *realloc (); #endif --- 52,58 ---- extern int expected_conflicts; extern char *token_buffer; ! #if !(defined(MSDOS) || defined(atarist)) extern char *realloc (); #endif *** system.h.orig Wed Sep 30 15:34:01 1992 --- system.h Wed Sep 30 15:34:30 1992 *************** *** 1,3 **** --- 1,10 ---- + #ifdef atarist + #include + #include + #include + #include + #endif + #ifdef MSDOS #include #include