# common definitions for all routines comprising the ratfor preprocessor #--------------------------------------------------------------- # The definition STDEFNS defines the file which contains the # standard definitions to be used when preprocessing a file. # It is opened and read automatically by the ratfor preprocessor. # Set STDEFNS to the name of the file in which the standard # definitions reside. If you don't want the preprocessor to # automatically open this file, set STDENFS to "". # #--------------------------------------------------------------- # If you want the preprocessor to output upper case only, # set the following definition: # # define (UPPERC,) # #--------------------------------------------------------------- # Some of the buffer sizes and other symbols might have to be # changed. Especially check the following: # # MAXDEF (number of characters in a definition) # SBUFSIZE (nbr string declarations allowed per module) # MAXSTRTBL (size of table to buffer string declarations) # MAXSWITCH (max stack for switch statement) # #----------------------------------------------------------------- define (STDEFNS, string defns "") # standard defns file #define (UPPERC,) # define if Fortran compiler wants upper case #define (IMPNONE,) # output IMPLICIT NONE in procedures define (NULL,0) define (INDENT,3) # number of spaces of indentation define (MAX_INDENT,30) # maximum column for indentation define (FIRST_LABEL,100) # first statement label define (SZ_SPOOLBUF,8) # for breaking continuation cards define (RADIX,PERCENT) # % indicates alternate radix define (TOGGLE,PERCENT) # toggle for literal lines define (ARGFLAG,DOLLAR) define (CUTOFF,3) # min nbr of cases to generate branch table # (for switch statement) define (DENSITY,2) # reciprocal of density necessary for # branch table define (FILLCHAR,DIG0) # used in long-name uniquing define (MAXIDLENGTH,6) # for Fortran 66 and 77 define (SZ_SMEM,240) # memory common declarations string # Lexical items (codes are negative to avoid conflict with character values) define (LEXBEGIN,-83) define (LEXBREAK,-79) define (LEXCASE,-91) define (LEXDEFAULT,-90) define (LEXDIGITS,-89) define (LEXDO,-96) define (LEXELSE,-87) define (LEXEND,-82) define (LEXERRCHK,-84) define (LEXERROR,-73) define (LEXFOR,-94) define (LEXIF,-99) define (LEXIFELSE,-72) define (LEXIFERR,-98) define (LEXIFNOERR,-97) define (LEXLITERAL,-85) define (LEXNEXT,-78) define (LEXOTHER,-80) define (LEXPOINTER,-88) define (LEXRBRACE,-74) define (LEXREPEAT,-93) define (LEXRETURN,-77) define (LEXGOTO,-76) define (LEXSTOP,-71) define (LEXSTRING,-75) define (LEXSWITCH,-92) define (LEXTHEN,-86) define (LEXUNTIL,-70) define (LEXWHILE,-95) define (LSTRIPC,-69) define (RSTRIPC,-68) define (LEXDECL,-67) define (XPP_DIRECTIVE, -166) # Built-in macro functions: define (DEFTYPE,-4) define (MACTYPE,-10) define (IFTYPE,-11) define (INCTYPE,-12) define (SUBTYPE,-13) define (ARITHTYPE,-14) define (IFDEFTYPE,-15) define (IFNOTDEFTYPE,-16) define (PRAGMATYPE,-17) # Size-limiting definitions: define (MEMSIZE,60000) # space allotted to symbol tables and macro text define (BUFSIZE,4096) # pushback buffer for ngetch and putbak define (PBPOINT,3192) # point in buffer where pushback begins define (SBUFSIZE,2048) # buffer for string statements define (MAXDEF,2048) # max chars in a defn define (MAXFORSTK,200) # max space for for reinit clauses define (MAXERRSTK,30) # max nesting of iferr statements define (MAXFNAMES, arith(NFILES,*,FILENAMESIZE)) define (MAXSTACK,100) # max stack depth for parser define (MAXSWITCH,1000) # max stack for switch statement define (MAXSWNEST,10) # max nesting of switches in a procedure define (MAXTOK,100) # max chars in a token define (NFILES,5) # max number of include file nesting define (MAXNBRSTR,20) #max nbr string declarations per module define (CALLSIZE,50) define (ARGSIZE,100) define (EVALSIZE,500) # Where to find the common blocks: define(COMMON_BLOCKS,"common") # Data types, Dynamic Memory common: define (XPOINTER,"integer ") # The following external names are redefined to avoid name collisions with # standard library procedures on some systems. define open rfopen define close rfclos define flush rfflus define note rfnote define seek rfseek define remove rfrmov define exit rexit