]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Other/Maintained/Tools/Pccts/h/dlgdef.h
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Other / Maintained / Tools / Pccts / h / dlgdef.h
CommitLineData
3eb9473e 1/* dlgdef.h\r
2 * Things in scanner produced by dlg that should be visible to the outside\r
3 * world\r
4 *\r
5 * SOFTWARE RIGHTS\r
6 *\r
7 * We reserve no LEGAL rights to the Purdue Compiler Construction Tool\r
8 * Set (PCCTS) -- PCCTS is in the public domain. An individual or\r
9 * company may do whatever they wish with source code distributed with\r
10 * PCCTS or the code generated by PCCTS, including the incorporation of\r
11 * PCCTS, or its output, into commerical software.\r
12 *\r
13 * We encourage users to develop software with PCCTS. However, we do ask\r
14 * that credit is given to us for developing PCCTS. By "credit",\r
15 * we mean that if you incorporate our source code into one of your\r
16 * programs (commercial product, research project, or otherwise) that you\r
17 * acknowledge this fact somewhere in the documentation, research report,\r
18 * etc... If you like PCCTS and have developed a nice tool with the\r
19 * output, please mention that you developed it using PCCTS. In\r
20 * addition, we ask that this header remain intact in our source code.\r
21 * As long as these guidelines are kept, we expect to continue enhancing\r
22 * this system and expect to make other tools available as they are\r
23 * completed.\r
24 *\r
25 * ANTLR 1.33\r
26 * Terence Parr\r
27 * Parr Research Corporation\r
28 * with Purdue University and AHPCRC, University of Minnesota\r
29 * 1989-1998\r
30 */\r
31\r
32#ifndef ZZDLGDEF_H\r
33#define ZZDLGDEF_H\r
34\r
35#include "pcctscfg.h"\r
36\r
37#ifndef zzchar_t\r
38#ifdef ZZWCHAR_T\r
39#define zzchar_t wchar_t\r
40#else\r
41#define zzchar_t char\r
42#endif\r
43#endif\r
44\r
45struct zzdlg_state {\r
46 FILE *stream;\r
47#ifdef __USE_PROTOS\r
48 int (*func_ptr)(void);\r
49#else\r
50 int (*func_ptr)();\r
51#endif\r
52 zzchar_t *str;\r
53 int auto_num;\r
54 int add_erase;\r
55 int lookc;\r
56 int char_full;\r
57 int begcol, endcol;\r
58 int line;\r
59 zzchar_t *lextext, *begexpr, *endexpr;\r
60 int bufsize;\r
61 int bufovf;\r
62 zzchar_t *nextpos;\r
63 int class_num;\r
64};\r
65\r
66extern zzchar_t *zzlextext; /* text of most recently matched token */\r
67extern zzchar_t *zzbegexpr; /* beginning of last reg expr recogn. */\r
68extern zzchar_t *zzendexpr; /* beginning of last reg expr recogn. */\r
69extern int zzbufsize; /* how long zzlextext is */\r
70extern int zzbegcol; /* column that first character of token is in*/\r
71extern int zzendcol; /* column that last character of token is in */\r
72extern int zzline; /* line current token is on */\r
73extern int zzreal_line; /* line of 1st portion of token that is not skipped */\r
74extern int zzchar; /* character to determine next state */\r
75extern int zzbufovf; /* indicates that buffer too small for text */\r
76#ifdef __USE_PROTOS\r
77extern void (*zzerr)(const char *);/* pointer to error reporting function */\r
78#else\r
79extern void (*zzerr)();\r
80#endif\r
81\r
82#ifdef USER_ZZMODE_STACK\r
83extern int zzauto;\r
84#endif\r
85\r
86#ifdef __USE_PROTOS\r
87extern void zzadvance(void);\r
88extern void zzskip(void); /* erase zzlextext, look for antoher token */\r
89extern void zzmore(void); /* keep zzlextext, look for another token */\r
90extern void zzmode(int k); /* switch to automaton 'k' */\r
91extern void zzrdstream(FILE *);/* what stream to read from */\r
92extern void zzclose_stream(void);/* close the current input stream */\r
93extern void zzrdfunc(int (*)(void));/* what function to get char from */\r
94extern void zzrdstr( zzchar_t * );\r
95extern void zzgettok(void); /* get next token */\r
96extern void zzreplchar(zzchar_t c);/* replace last recognized reg. expr. with\r
97 a character */\r
98extern void zzreplstr(zzchar_t *s);/* replace last recognized reg. expr. with\r
99 a string */\r
100extern void zzsave_dlg_state(struct zzdlg_state *);\r
101extern void zzrestore_dlg_state(struct zzdlg_state *);\r
102extern int zzerr_in(void);\r
103extern void zzerrstd(const char *);\r
104extern void zzerraction(void);\r
105\r
106#else\r
107\r
108extern void zzadvance();\r
109extern void zzskip(); /* erase zzlextext, look for antoher token */\r
110extern void zzmore(); /* keep zzlextext, look for another token */\r
111extern void zzmode(/*k*/); /* switch to automaton 'k' */\r
112extern void zzrdstream(); /* what stream to read from */\r
113extern void zzclose_stream();/* close the current input stream */\r
114extern void zzrdfunc(); /* what function to get char from */\r
115extern void zzrdstr();\r
116extern void zzgettok(); /* get next token */\r
117extern void zzreplchar(); /* replace last recognized reg. expr. with\r
118 a character */\r
119extern void zzreplstr(); /* replace last recognized reg. expr. with\r
120 a string */\r
121extern void zzsave_dlg_state();\r
122extern void zzrestore_dlg_state();\r
123extern int zzerr_in();\r
124extern void zzerrstd();\r
125extern void zzerraction();\r
126#endif\r
127\r
128#endif\r