4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
26 /* Copyright (c) 1988 AT&T */
27 /* All Rights Reserved */
32 #pragma ident "%Z%%M% %I% %E% SMI"
44 #define LONG_WCHAR_T 1
73 #define TOKENSIZE 10000
77 #define STARTCHAR 2560
87 #define MAXPOSSTATE 500
95 #define MAXPOSSTATE 4*1000
97 #define NOUTPUT 4*3000
99 #define NACTIONS 4*1000
100 #define ALITTLEEXTRA 300
106 /* XCU4: add RXSCON */
107 #define RXSCON 0x4011
110 #define RNULLS 0x4006
118 #define S1FINAL 0x400e
119 #define S2FINAL 0x400f
121 #define ISOPERATOR(n) ((n & 0xc080) == 0x4000)
124 * New to JLE; this is not really a node tag.
125 * This is used in a string pointed to by
126 * the leaf of an RCCL or RNCCL node as a
127 * special prefix code that substitutes
128 * the infix '-' range operator. For
129 * example, a lex character class "[_0-9a-zA-Z]"
130 * would be translated to the intermidiate
136 * "_<RANGE>09<RANGE>a-z<RANGE>A-Z"
142 extern int ncg
; /* ncg == ncgidtbl * 2 */
143 typedef unsigned long lchar
;
144 extern lchar yycgidtbl
[];
145 extern int yycgid(wchar_t);
146 extern Boolean handleeuc
; /* TRUE iff -w or -e option is specified. */
147 extern Boolean widecio
; /* TRUE iff -w option is specified. */
150 #define RULESECTION 2
159 extern int debug
; /* 1 = on */
173 extern char *release_string
;
175 extern int ratfor
; /* 1 = ratfor, 0 = C */
178 extern int copy_line
;
179 extern int yyline
; /* line number of file */
186 extern int casecount
;
187 extern int chset
; /* 1 = CHR set modified */
188 extern FILE *fin
, *fout
, *fother
, *errorf
;
190 extern int prev
; /* previous input character */
191 extern int pres
; /* present input character */
192 extern int peek
; /* next input character */
197 extern Boolean
*nullstr
;
199 extern CHR pushc
[TOKENSIZE
];
201 extern CHR slist
[STARTSIZE
];
203 extern CHR
**def
, **subs
, *dchar
;
204 extern CHR
**sname
, *schar
;
205 /* XCU4: %x exclusive start */
206 extern int *exclusive
;
210 extern int dptr
, sptr
;
211 extern CHR
*bptr
; /* store input position */
216 extern int *positions
;
221 extern int *sfall
; /* fallback state num */
222 extern Boolean
*cpackflg
; /* true if state has been character packed */
223 extern int *atable
, aptr
;
225 extern Boolean symbol
[MAXNCG
];
226 extern CHR cindex
[MAXNCG
];
232 extern CHR match
[MAXNCG
];
234 extern CHR
*pcptr
, *pchar
;
236 extern int nstates
, maxpos
;
239 extern int ntrans
, treesize
, outsize
;
242 extern int *verify
, *advance
, *stoff
;
246 extern BYTE
*myalloc();
251 void statistics(void);
252 void error_tail(void) __NORETURN
;
256 void scopy(CHR
*s
, CHR
*t
);
257 void cclinter(int sw
);
259 void munput(int t
, CHR
*p
);
264 void remch(wchar_t c
);
265 void sortcgidtbl(void);
266 void repbycgid(void);
270 int scomp(CHR
*x
, CHR
*y
);
274 int ctrans(CHR
**ss
);
276 int lookup(CHR
*s
, CHR
**t
);
279 int mn2(int a
, int d
, int c
);
280 int mn1(int a
, int d
);
284 extern int isArray
; /* XCU4: for %array %pointer */
286 #endif /* _LDEFS_H */