| 1 | /*********************************************************************** |
|---|
| 2 | |
|---|
| 3 | COPYRIGHT |
|---|
| 4 | |
|---|
| 5 | The following is a notice of limited availability of the code and |
|---|
| 6 | Government license and disclaimer which must be included in the |
|---|
| 7 | prologue of the code and in all source listings of the code. |
|---|
| 8 | |
|---|
| 9 | Copyright notice |
|---|
| 10 | (c) 1977 University of Chicago |
|---|
| 11 | |
|---|
| 12 | Permission is hereby granted to use, reproduce, prepare |
|---|
| 13 | derivative works, and to redistribute to others at no charge. If |
|---|
| 14 | you distribute a copy or copies of the Software, or you modify a |
|---|
| 15 | copy or copies of the Software or any portion of it, thus forming |
|---|
| 16 | a work based on the Software and make and/or distribute copies of |
|---|
| 17 | such work, you must meet the following conditions: |
|---|
| 18 | |
|---|
| 19 | a) If you make a copy of the Software (modified or verbatim) |
|---|
| 20 | it must include the copyright notice and Government |
|---|
| 21 | license and disclaimer. |
|---|
| 22 | |
|---|
| 23 | b) You must cause the modified Software to carry prominent |
|---|
| 24 | notices stating that you changed specified portions of |
|---|
| 25 | the Software. |
|---|
| 26 | |
|---|
| 27 | This software was authored by: |
|---|
| 28 | |
|---|
| 29 | Argonne National Laboratory |
|---|
| 30 | J. Michalakes: (630) 252-6646; email: michalak@mcs.anl.gov |
|---|
| 31 | Mathematics and Computer Science Division |
|---|
| 32 | Argonne National Laboratory, Argonne, IL 60439 |
|---|
| 33 | |
|---|
| 34 | ARGONNE NATIONAL LABORATORY (ANL), WITH FACILITIES IN THE STATES |
|---|
| 35 | OF ILLINOIS AND IDAHO, IS OWNED BY THE UNITED STATES GOVERNMENT, |
|---|
| 36 | AND OPERATED BY THE UNIVERSITY OF CHICAGO UNDER PROVISION OF A |
|---|
| 37 | CONTRACT WITH THE DEPARTMENT OF ENERGY. |
|---|
| 38 | |
|---|
| 39 | GOVERNMENT LICENSE AND DISCLAIMER |
|---|
| 40 | |
|---|
| 41 | This computer code material was prepared, in part, as an account |
|---|
| 42 | of work sponsored by an agency of the United States Government. |
|---|
| 43 | The Government is granted for itself and others acting on its |
|---|
| 44 | behalf a paid-up, nonexclusive, irrevocable worldwide license in |
|---|
| 45 | this data to reproduce, prepare derivative works, distribute |
|---|
| 46 | copies to the public, perform publicly and display publicly, and |
|---|
| 47 | to permit others to do so. NEITHER THE UNITED STATES GOVERNMENT |
|---|
| 48 | NOR ANY AGENCY THEREOF, NOR THE UNIVERSITY OF CHICAGO, NOR ANY OF |
|---|
| 49 | THEIR EMPLOYEES, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR |
|---|
| 50 | ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, |
|---|
| 51 | COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, |
|---|
| 52 | PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD |
|---|
| 53 | NOT INFRINGE PRIVATELY OWNED RIGHTS. |
|---|
| 54 | |
|---|
| 55 | ***************************************************************************/ |
|---|
| 56 | #ifndef SYM_H |
|---|
| 57 | #define SYM_H |
|---|
| 58 | |
|---|
| 59 | /* file: sym.h |
|---|
| 60 | |
|---|
| 61 | Header info for symbol table module. |
|---|
| 62 | |
|---|
| 63 | */ |
|---|
| 64 | |
|---|
| 65 | typedef struct sym_node * sym_nodeptr ; |
|---|
| 66 | |
|---|
| 67 | struct sym_node |
|---|
| 68 | { |
|---|
| 69 | char * name ; /* lexeme */ |
|---|
| 70 | sym_nodeptr next ; /* pointer to next node in symbol table */ |
|---|
| 71 | /* fields that are associated with dimension declaration constants */ |
|---|
| 72 | unsigned char dim ; |
|---|
| 73 | /* fields that are associated with arrays */ |
|---|
| 74 | int ndims ; |
|---|
| 75 | int MDEX ; /* which index is the M dimension */ |
|---|
| 76 | int NDEX ; /* which index is the N dimension */ |
|---|
| 77 | unsigned char dims[7] ; |
|---|
| 78 | char dimname[7][64] ; |
|---|
| 79 | /* name of temporary variable associated with string. variable */ |
|---|
| 80 | char varx[32] ; |
|---|
| 81 | /* name of core association, July 2004 */ |
|---|
| 82 | char core_name[64] ; |
|---|
| 83 | /* internal name of variable associated with dataname entry, July 2004 */ |
|---|
| 84 | char internal_name[64] ; |
|---|
| 85 | /* fields associated with integer scalar variables */ |
|---|
| 86 | unsigned long assigned ; /* pointer to assignment statement */ |
|---|
| 87 | unsigned long thisif ; |
|---|
| 88 | int iflev ; |
|---|
| 89 | int marked ; /* general purpose marker */ |
|---|
| 90 | } ; |
|---|
| 91 | |
|---|
| 92 | sym_nodeptr sym_add() ; |
|---|
| 93 | sym_nodeptr sym_get() ; |
|---|
| 94 | |
|---|
| 95 | #endif |
|---|