]>
Commit | Line | Data |
---|---|---|
878ddf1f | 1 | /*\r |
2 | * SOFTWARE RIGHTS\r | |
3 | *\r | |
4 | * We reserve no LEGAL rights to the Purdue Compiler Construction Tool\r | |
5 | * Set (PCCTS) -- PCCTS is in the public domain. An individual or\r | |
6 | * company may do whatever they wish with source code distributed with\r | |
7 | * PCCTS or the code generated by PCCTS, including the incorporation of\r | |
8 | * PCCTS, or its output, into commerical software.\r | |
9 | *\r | |
10 | * We encourage users to develop software with PCCTS. However, we do ask\r | |
11 | * that credit is given to us for developing PCCTS. By "credit",\r | |
12 | * we mean that if you incorporate our source code into one of your\r | |
13 | * programs (commercial product, research project, or otherwise) that you\r | |
14 | * acknowledge this fact somewhere in the documentation, research report,\r | |
15 | * etc... If you like PCCTS and have developed a nice tool with the\r | |
16 | * output, please mention that you developed it using PCCTS. In\r | |
17 | * addition, we ask that this header remain intact in our source code.\r | |
18 | * As long as these guidelines are kept, we expect to continue enhancing\r | |
19 | * this system and expect to make other tools available as they are\r | |
20 | * completed.\r | |
21 | *\r | |
22 | * ANTLR 1.33\r | |
23 | * Terence Parr\r | |
24 | * Parr Research Corporation\r | |
25 | * with Purdue University and AHPCRC, University of Minnesota\r | |
26 | * 1989-2000\r | |
27 | */\r | |
28 | \r | |
29 | #include "pcctscfg.h"\r | |
30 | \r | |
31 | #ifdef __STDC__\r | |
32 | #include "pccts_stdlib.h"\r | |
33 | #else\r | |
34 | #include <malloc.h>\r | |
35 | #endif\r | |
36 | #include "pccts_string.h"\r | |
37 | \r | |
38 | /* 133MR1 include stdio.h for fprintf in charptr.c */\r | |
39 | \r | |
40 | #include "pccts_stdio.h"\r | |
41 | \r | |
42 | /* 133MR1 include charptr.h for Attrib in charptr.c */\r | |
43 | \r | |
44 | #include "charptr.h"\r | |
45 | \r | |
46 | #ifdef __USE_PROTOS\r | |
47 | zzcr_attr(Attrib *a,int token,char *text)\r | |
48 | #else\r | |
49 | zzcr_attr(a,token,text)\r | |
50 | Attrib *a;\r | |
51 | int token;\r | |
52 | char *text;\r | |
53 | #endif\r | |
54 | {\r | |
55 | *a = (char *) malloc(strlen(text)+1); /* MR6 */\r | |
56 | if ( *a == NULL ) {fprintf(stderr, "zzcr_attr: out of memory!\n"); exit(-1);}\r | |
57 | strcpy(*a, text);\r | |
58 | }\r |