From: Jesse Thilo Date: Thu, 26 Nov 1998 00:44:18 +0000 (+0000) Subject: Add non-RCS files from /gd/gnu/bison. X-Git-Tag: GNU_1_26~25 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/c55c697eb180d2822cedf8e9069ab580095fe640 Add non-RCS files from /gd/gnu/bison. --- diff --git a/src/bison.cld b/src/bison.cld new file mode 100644 index 00000000..ae424aaa --- /dev/null +++ b/src/bison.cld @@ -0,0 +1,21 @@ +! +! VMS BISON command definition file +! +DEFINE VERB BISON + IMAGE GNU_BISON:[000000]BISON + + PARAMETER P1,Label=BISON$INFILE,Prompt="File" + value(required,type=$infile) + QUALIFIER VERBOSE,Label=BISON$VERBOSE + QUALIFIER DEFINES,Label=BISON$DEFINES + QUALIFIER FIXED_OUTFILES,Label=BISON$FIXED_OUTFILES + QUALIFIER NOPARSER,Label=BISON$NOPARSER + QUALIFIER RAW,LABEL=BISON$RAW + QUALIFIER TOKEN_TABLE,LABEL=BISON$TOKEN_TABLE + qualifier nolines,Label=BISON$NOLINES + qualifier debug,Label=BISON$DEBUG + qualifier output,value(type=$outfile),Label=BISON$OUTPUT + qualifier version,label=BISON$VERSION + qualifier yacc,label=BISON$YACC + qualifier file_prefix,value(type=$outfile),label=BISON$FILE_PREFIX + qualifier name_prefix,value(type=$outfile),LABEL=BISON$NAME_PREFIX diff --git a/src/build.com b/src/build.com new file mode 100644 index 00000000..869ceb13 --- /dev/null +++ b/src/build.com @@ -0,0 +1,83 @@ +$! Set the def dir to proper place for use in batch. Works for interactive too. +$flnm = f$enviroment("PROCEDURE") ! get current procedure name +$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")' +$! +$! This command procedure compiles and links BISON for VMS. +$! BISON has been tested with VAXC version 2.3 and VMS version 4.5 +$! and on VMS 4.5 with GCC 1.12. +$! +$! Bj|rn Larsen blarsen@ifi.uio.no +$! With some contributions by Gabor Karsai, +$! KARSAIG1%VUENGVAX.BITNET@jade.berkeley.edu +$! All merged and cleaned by RMS. +$! +$! Adapted for both VAX-11 "C" and VMS/GCC compilation by +$! David L. Kashtan kashtan.iu.ai.sri.com +$! +$! First we try to sense which C compiler we have available. Sensing logic +$! borrowed from Emacs. +$! +$set noon !do not bomb if an error occurs. +$assign nla0: sys$output +$assign nla0: sys$error !so we do not get an error message about this. +$cc nla0:compiler_check.c +$if $status.eq.%x38090 then goto try_gcc +$ CC :== CC +$ cc_options:="/NOLIST/define=(""index=strchr"",""rindex=strrchr"")" +$ extra_linker_files:="VMSHLP," +$goto have_compiler +$! +$try_gcc: +$gcc nla0:compiler_check.c +$if $status.eq.%x38090 then goto whoops +$ CC :== GCC +$ cc_options:="/DEBUG" +$ extra_linker_files:="GNU_CC:[000000]GCCLIB/LIB," +$goto have_compiler +$! +$whoops: +$write sys$output "You must have a C compiler to build BISON. Sorry." +$deassign sys$output +$deassign sys$error +$exit %x38090 +$! +$! +$have_compiler: +$deassign sys$output +$deassign sys$error +$set on +$if f$search("compiler_check.obj").nes."" then dele/nolog compiler_check.obj; +$write sys$output "Building BISON with the ''cc' compiler." +$! +$! Do the compilation (compiler type is all set up) +$! +$ Compile: +$ if "''p1'" .eqs. "LINK" then goto Link +$ 'CC' 'cc_options' files.c +$ 'CC' 'cc_options' LR0.C +$ 'CC' 'cc_options' ALLOCATE.C +$ 'CC' 'cc_options' CLOSURE.C +$ 'CC' 'cc_options' CONFLICTS.C +$ 'CC' 'cc_options' DERIVES.C +$ 'CC' 'cc_options' VMSGETARGS.C +$ 'CC' 'cc_options' GRAM.C +$ 'CC' 'cc_options' LALR.C +$ 'CC' 'cc_options' LEX.C +$ 'CC' 'cc_options' MAIN.C +$ 'CC' 'cc_options' NULLABLE.C +$ 'CC' 'cc_options' OUTPUT.C +$ 'CC' 'cc_options' PRINT.C +$ 'CC' 'cc_options' READER.C +$ 'CC' 'cc_options' REDUCE.C +$ 'CC' 'cc_options' SYMTAB.C +$ 'CC' 'cc_options' WARSHALL.C +$ 'CC' 'cc_options' VERSION.C +$ if "''CC'" .eqs. "CC" then macro vmshlp.mar +$ Link: +$ link/exec=bison main,LR0,allocate,closure,conflicts,derives,files,- +vmsgetargs,gram,lalr,lex,nullable,output,print,reader,reduce,symtab,warshall,- +version,'extra_linker_files'sys$library:vaxcrtl/lib +$! +$! Generate bison.hlp (for online help). +$! +$runoff bison.rnh diff --git a/src/vmshlp.mar b/src/vmshlp.mar new file mode 100644 index 00000000..637d170d --- /dev/null +++ b/src/vmshlp.mar @@ -0,0 +1,42 @@ +;/* Macro help routines for the BISON/VMS program +; Gabor Karsai, Vanderbilt University +; +;BISON is distributed in the hope that it will be useful, but WITHOUT ANY +;WARRANTY. No author or distributor accepts responsibility to anyone +;for the consequences of using it or for whether it serves any +;particular purpose or works at all, unless he says so in writing. +;Refer to the BISON General Public License for full details. +; +;Everyone is granted permission to copy, modify and redistribute BISON, +;but only under the conditions described in the BISON General Public +;License. A copy of this license is supposed to have been given to you +;along with BISON so you can know your rights and responsibilities. It +;should be in a file named COPYING. Among other things, the copyright +;notice and this notice must be preserved on all copies. +; +; In other words, you are welcome to use, share and improve this program. +; You are forbidden to forbid anyone else to use, share and improve +; what you give them. Help stamp out software-hoarding! */ +; + .psect vmshlp pic,usr,rel,ovr,shr,long,exe,nowrt + +alloca:: + .word 0 + subl2 ^X4(ap),sp + movl ^X10(fp),r1 + movq ^X8(fp),ap + bicl2 #03,sp + addl2 #^X1c,sp + movl sp,r0 + jmp (r1) + +bcopy:: + .word ^X0e00 + movl ^X04(ap),r11 + movl ^X08(ap),r10 + movl ^X0c(ap),r9 + brb 1$ +2$: movb (r10)+,(r11)+ +1$: sobgeq r9,2$ + ret + .end