Skip to content

AFNI/NIfTI Server

Sections
Personal tools
You are here: Home » AFNI » Documentation

Doxygen Source Code Documentation


Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals   Search  

p1defs.h

Go to the documentation of this file.
00001 #define P1_UNKNOWN 0
00002 #define P1_COMMENT 1            /* Fortan comment string */
00003 #define P1_EOF 2                /* End of file dummy token */
00004 #define P1_SET_LINE 3           /* Reset the line counter */
00005 #define P1_FILENAME 4           /* Name of current input file */
00006 #define P1_NAME_POINTER 5       /* Pointer to hash table entry */
00007 #define P1_CONST 6              /* Some constant value */
00008 #define P1_EXPR 7               /* Followed by opcode */
00009 
00010 /* The next two tokens could be grouped together, since they always come
00011    from an Addr structure */
00012 
00013 #define P1_IDENT 8              /* Char string identifier in addrp->user
00014                                    field */
00015 #define P1_EXTERN 9             /* Pointer to external symbol entry */
00016 
00017 #define P1_HEAD 10              /* Function header info */
00018 #define P1_LIST 11              /* A list of data (e.g. arguments) will
00019                                    follow the tag, type, and count */
00020 #define P1_LITERAL 12           /* Hold the index into the literal pool */
00021 #define P1_LABEL 13             /* label value */
00022 #define P1_ASGOTO 14            /* Store the hash table pointer of
00023                                    variable used in assigned goto */
00024 #define P1_GOTO 15              /* Store the statement number */
00025 #define P1_IF 16                /* store the condition as an expression */
00026 #define P1_ELSE 17              /* No data */
00027 #define P1_ELIF 18              /* store the condition as an expression */
00028 #define P1_ENDIF 19             /* Marks the end of a block IF */
00029 #define P1_ENDELSE 20           /* Marks the end of a block ELSE */
00030 #define P1_ADDR 21              /* Addr data; used for arrays, common and
00031                                    equiv addressing, NOT for names, idents
00032                                    or externs */
00033 #define P1_SUBR_RET 22          /* Subroutine return; the return expression
00034                                    follows */
00035 #define P1_COMP_GOTO 23         /* Computed goto; has expr, label list */
00036 #define P1_FOR 24               /* C FOR loop; three expressions follow */
00037 #define P1_ENDFOR 25            /* End of C FOR loop */
00038 #define P1_FORTRAN 26           /* original Fortran source */
00039 #define P1_CHARP 27             /* user.Charp field -- for long names */
00040 #define P1_WHILE1START 28       /* start of DO WHILE */
00041 #define P1_WHILE2START 29       /* rest of DO WHILE */
00042 #define P1_PROCODE 30           /* invoke procode() -- to adjust params */
00043 #define P1_ELSEIFSTART 31       /* handle extra code for abs, min, max
00044                                    in else if() */
00045 
00046 #define P1_FILENAME_MAX 256     /* max filename length to retain (for -g) */
00047 #define P1_STMTBUFSIZE 1400
00048 
00049 
00050 
00051 #define COMMENT_BUFFER_SIZE 255 /* max number of chars in each comment */
00052 #define CONSTANT_STR_MAX 1000   /* max number of chars in string constant */
00053 
00054 void    p1_asgoto Argdcl((Addrp));
00055 void    p1_comment Argdcl((char*));
00056 void    p1_elif Argdcl((tagptr));
00057 void    p1_else Argdcl((void));
00058 void    p1_endif Argdcl((void));
00059 void    p1_expr Argdcl((tagptr));
00060 void    p1_for Argdcl((tagptr, tagptr, tagptr));
00061 void    p1_goto Argdcl((long int));
00062 void    p1_head Argdcl((int, char*));
00063 void    p1_if Argdcl((tagptr));
00064 void    p1_label Argdcl((long int));
00065 void    p1_line_number Argdcl((long int));
00066 void    p1_subr_ret Argdcl((tagptr));
00067 void    p1comp_goto Argdcl((tagptr, int, struct Labelblock**));
00068 void    p1else_end Argdcl((void));
00069 void    p1for_end Argdcl((void));
00070 void    p1put Argdcl((int));
00071 void    p1puts Argdcl((int, char*));
00072 
00073 /* The pass 1 intermediate file has the following format:
00074 
00075         <ascii-integer-rep> [ : [ <sp> [ <data> ]]] \n
00076 
00077    e.g.   1: This is a comment
00078 
00079    This format is destined to change in the future, but for now a readable
00080    form is more desirable than a compact form.
00081 
00082    NOTES ABOUT THE P1 FORMAT
00083    ----------------------------------------------------------------------
00084 
00085         P1_COMMENT:  The comment string (in   <data>)   may be at most
00086                 COMMENT_BUFFER_SIZE bytes long.  It must contain no newlines
00087                 or null characters.  A side effect of the way comments are
00088                 read in   lex.c   is that no '\377' chars may be in a
00089                 comment either.
00090 
00091         P1_SET_LINE:  <data>  holds the line number in the current source file.
00092 
00093         P1_INC_LINE:  Increment the source line number;   <data>   is empty.
00094 
00095         P1_NAME_POINTER:  <data>   holds the integer representation of a
00096                           pointer into a hash table entry.
00097 
00098         P1_CONST:  the first field in   <data>   is a type tag (one of the
00099                    TYxxxx   macros), the next field holds the constant
00100                    value
00101 
00102         P1_EXPR:  <data>   holds the opcode number of the expression,
00103                   followed by the type of the expression (required for
00104                   OPCONV).  Next is the value of   vleng.
00105                   The type of operation represented by the
00106                   opcode determines how many of the following data items
00107                   are part of this expression.
00108 
00109         P1_IDENT:  <data>   holds the type, then storage, then the
00110                    char string identifier in the   addrp->user   field.
00111 
00112         P1_EXTERN:  <data>   holds an offset into the external symbol
00113                     table entry
00114 
00115         P1_HEAD:  the first field in   <data>  is the procedure class, the
00116                   second is the name of the procedure
00117 
00118         P1_LIST:  the first field in   <data>   is the tag, the second the
00119                   type of the list, the third the number of elements in
00120                   the list
00121 
00122         P1_LITERAL:  <data>   holds the   litnum   of a value in the
00123                      literal pool.
00124 
00125         P1_LABEL:  <data>   holds the statement number of the current
00126                    line
00127 
00128         P1_ASGOTO:  <data>   holds the hash table pointer of the variable
00129 
00130         P1_GOTO:  <data>   holds the statement number to jump to
00131 
00132         P1_IF:  <data>   is empty, the following expression is the IF
00133                 condition.
00134 
00135         P1_ELSE:  <data>   is empty.
00136 
00137         P1_ELIF:  <data>   is empty, the following expression is the IF
00138                   condition.
00139 
00140         P1_ENDIF:  <data>   is empty.
00141 
00142         P1_ENDELSE:  <data>   is empty.
00143 
00144         P1_ADDR:   <data>   holds a direct copy of the structure.  The
00145                   next expression is a copy of    vleng,   and the next a
00146                   copy of    memoffset.
00147 
00148         P1_SUBR_RET:  The next token is an expression for the return value.
00149 
00150         P1_COMP_GOTO:  The next token is an integer expression, the
00151                        following one a list of labels.
00152 
00153         P1_FOR:  The next three expressions are the Init, Test, and
00154                  Increment expressions of a C FOR loop.
00155 
00156         P1_ENDFOR:  Marks the end of the body of a FOR loop
00157 
00158 */
 

Powered by Plone

This site conforms to the following standards: