4
* (c) Copyright 1988-1994 Adobe Systems Incorporated.
7
* Permission to use, copy, modify, distribute, and sublicense this software
8
* and its documentation for any purpose and without fee is hereby granted,
9
* provided that the above copyright notices appear in all copies and that
10
* both those copyright notices and this permission notice appear in
11
* supporting documentation and that the name of Adobe Systems Incorporated
12
* not be used in advertising or publicity pertaining to distribution of the
13
* software without specific, written prior permission. No trademark license
14
* to use the Adobe trademarks is hereby granted. If the Adobe trademark
15
* "Display PostScript"(tm) is used to describe this software, its
16
* functionality or for any other purpose, such use shall be limited to a
17
* statement that this software works in conjunction with the Display
18
* PostScript system. Proper trademark attribution to reflect Adobe's
19
* ownership of the trademark shall be given whenever any such reference to
20
* the Display PostScript system is made.
22
* ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
23
* ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
24
* ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
25
* IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
* NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
27
* TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
28
* DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
29
* NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
30
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
31
* PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
33
* Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
34
* Incorporated which may be registered in certain jurisdictions
36
* Author: Adobe Systems Incorporated
44
/* ErrIntro prints a standard intro for error messages;
45
* change it if your system uses something else. We have many options:
47
* to match Macintosh: #define FMT "File \"%s\"; Line %d # "
48
* to match BSD cc: #define FMT "\"%s\", line %d: "
49
* to match gcc: #define FMT "%s:%d: "
50
* to match Mips cc: #define FMT "pswrap: Error: %s, line %d: "
54
#define INTRO "# In function %s -\n"
57
#define FMT "File \"%s\"; Line %d # "
59
#define FMT "\"%s\", line %d: "
60
#endif /* macintosh */
62
void ErrIntro(int line)
64
if (! reportedPSWName && currentPSWName) {
66
fprintf(stderr,INTRO,currentPSWName);
68
fprintf(stderr,FMT,ifile,line);
73
void yyerror(char *errmsg)
76
fprintf(stderr,"%s near text \"%s\"\n",errmsg,yytext);