1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate * CDDL HEADER START
3*0Sstevel@tonic-gate *
4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance
7*0Sstevel@tonic-gate * with the License.
8*0Sstevel@tonic-gate *
9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate * and limitations under the License.
13*0Sstevel@tonic-gate *
14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate *
20*0Sstevel@tonic-gate * CDDL HEADER END
21*0Sstevel@tonic-gate */
22*0Sstevel@tonic-gate /* Copyright (c) 1989 AT&T */
23*0Sstevel@tonic-gate /* All Rights Reserved */
24*0Sstevel@tonic-gate
25*0Sstevel@tonic-gate
26*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI"
27*0Sstevel@tonic-gate
28*0Sstevel@tonic-gate #include <stdio.h>
29*0Sstevel@tonic-gate
30*0Sstevel@tonic-gate #ifdef EUC
31*0Sstevel@tonic-gate #include <euc.h>
32*0Sstevel@tonic-gate #include <widec.h>
33*0Sstevel@tonic-gate #include <limits.h>
34*0Sstevel@tonic-gate #endif
35*0Sstevel@tonic-gate
36*0Sstevel@tonic-gate
37*0Sstevel@tonic-gate #ifndef JLSLEX
38*0Sstevel@tonic-gate #pragma weak yyinput
39*0Sstevel@tonic-gate #pragma weak yyleng
40*0Sstevel@tonic-gate #pragma weak yytext
41*0Sstevel@tonic-gate #pragma weak yyunput
42*0Sstevel@tonic-gate
43*0Sstevel@tonic-gate #define CHR char
44*0Sstevel@tonic-gate #define YYTEXT yytext
45*0Sstevel@tonic-gate #define YYLENG yyleng
46*0Sstevel@tonic-gate #define YYINPUT yyinput
47*0Sstevel@tonic-gate #define YYUNPUT yyunput
48*0Sstevel@tonic-gate #define YYOUTPUT yyoutput
49*0Sstevel@tonic-gate #define YYREJECT yyreject
50*0Sstevel@tonic-gate #endif
51*0Sstevel@tonic-gate
52*0Sstevel@tonic-gate #ifdef WOPTION
53*0Sstevel@tonic-gate #pragma weak yyinput
54*0Sstevel@tonic-gate #pragma weak yyleng
55*0Sstevel@tonic-gate #pragma weak yytext
56*0Sstevel@tonic-gate #pragma weak yyunput
57*0Sstevel@tonic-gate
58*0Sstevel@tonic-gate #define CHR wchar_t
59*0Sstevel@tonic-gate #define YYTEXT yytext
60*0Sstevel@tonic-gate #define YYLENG yyleng
61*0Sstevel@tonic-gate #define YYINPUT yyinput
62*0Sstevel@tonic-gate #define YYUNPUT yyunput
63*0Sstevel@tonic-gate #define YYOUTPUT yyoutput
64*0Sstevel@tonic-gate #define YYREJECT yyreject_w
65*0Sstevel@tonic-gate #endif
66*0Sstevel@tonic-gate
67*0Sstevel@tonic-gate #ifdef EOPTION
68*0Sstevel@tonic-gate #pragma weak yyleng
69*0Sstevel@tonic-gate #pragma weak yytext
70*0Sstevel@tonic-gate #pragma weak yywinput
71*0Sstevel@tonic-gate #pragma weak yywleng
72*0Sstevel@tonic-gate #pragma weak yywtext
73*0Sstevel@tonic-gate #pragma weak yywunput
74*0Sstevel@tonic-gate
75*0Sstevel@tonic-gate #define CHR wchar_t
76*0Sstevel@tonic-gate #define YYTEXT yywtext
77*0Sstevel@tonic-gate #define YYLENG yywleng
78*0Sstevel@tonic-gate #define YYINPUT yywinput
79*0Sstevel@tonic-gate #define YYUNPUT yywunput
80*0Sstevel@tonic-gate #define YYOUTPUT yywoutput
81*0Sstevel@tonic-gate #define YYREJECT yyreject_e
82*0Sstevel@tonic-gate extern unsigned char yytext[];
83*0Sstevel@tonic-gate extern int yyleng;
84*0Sstevel@tonic-gate #endif
85*0Sstevel@tonic-gate
86*0Sstevel@tonic-gate #pragma weak yyback
87*0Sstevel@tonic-gate #if defined(__cplusplus) || defined(__STDC__)
88*0Sstevel@tonic-gate extern int yyback(int *, int);
89*0Sstevel@tonic-gate extern int YYINPUT(void);
90*0Sstevel@tonic-gate extern void YYUNPUT(int);
91*0Sstevel@tonic-gate #ifdef EUC
92*0Sstevel@tonic-gate static int yyracc(int);
93*0Sstevel@tonic-gate #else
94*0Sstevel@tonic-gate extern int yyracc(int);
95*0Sstevel@tonic-gate #endif
96*0Sstevel@tonic-gate #ifdef EOPTION
97*0Sstevel@tonic-gate extern size_t wcstombs(char *, const wchar_t *, size_t);
98*0Sstevel@tonic-gate #endif
99*0Sstevel@tonic-gate #endif
100*0Sstevel@tonic-gate
101*0Sstevel@tonic-gate #pragma weak yyout
102*0Sstevel@tonic-gate extern FILE *yyout, *yyin;
103*0Sstevel@tonic-gate
104*0Sstevel@tonic-gate #pragma weak yyfnd
105*0Sstevel@tonic-gate #pragma weak yyprevious
106*0Sstevel@tonic-gate extern int yyprevious, *yyfnd;
107*0Sstevel@tonic-gate
108*0Sstevel@tonic-gate #pragma weak yyextra
109*0Sstevel@tonic-gate extern char yyextra[];
110*0Sstevel@tonic-gate
111*0Sstevel@tonic-gate extern int YYLENG;
112*0Sstevel@tonic-gate extern CHR YYTEXT[];
113*0Sstevel@tonic-gate
114*0Sstevel@tonic-gate #pragma weak yylsp
115*0Sstevel@tonic-gate #pragma weak yylstate
116*0Sstevel@tonic-gate #pragma weak yyolsp
117*0Sstevel@tonic-gate extern struct {int *yyaa, *yybb; int *yystops; } *yylstate[], **yylsp, **yyolsp;
118*0Sstevel@tonic-gate #if defined(__cplusplus) || defined(__STDC__)
119*0Sstevel@tonic-gate int
YYREJECT(void)120*0Sstevel@tonic-gate YYREJECT(void)
121*0Sstevel@tonic-gate #else
122*0Sstevel@tonic-gate YYREJECT()
123*0Sstevel@tonic-gate #endif
124*0Sstevel@tonic-gate {
125*0Sstevel@tonic-gate for (; yylsp < yyolsp; yylsp++)
126*0Sstevel@tonic-gate YYTEXT[YYLENG++] = YYINPUT();
127*0Sstevel@tonic-gate if (*yyfnd > 0)
128*0Sstevel@tonic-gate return (yyracc(*yyfnd++));
129*0Sstevel@tonic-gate while (yylsp-- > yylstate) {
130*0Sstevel@tonic-gate YYUNPUT(YYTEXT[YYLENG-1]);
131*0Sstevel@tonic-gate YYTEXT[--YYLENG] = 0;
132*0Sstevel@tonic-gate if (*yylsp != 0 && (yyfnd = (*yylsp)->yystops) && *yyfnd > 0)
133*0Sstevel@tonic-gate return (yyracc(*yyfnd++));
134*0Sstevel@tonic-gate }
135*0Sstevel@tonic-gate #ifdef EOPTION
136*0Sstevel@tonic-gate yyleng = wcstombs((char *)yytext, YYTEXT, YYLENG*MB_LEN_MAX);
137*0Sstevel@tonic-gate #endif
138*0Sstevel@tonic-gate if (YYTEXT[0] == 0)
139*0Sstevel@tonic-gate return (0);
140*0Sstevel@tonic-gate YYLENG = 0;
141*0Sstevel@tonic-gate #ifdef EOPTION
142*0Sstevel@tonic-gate yyleng = 0;
143*0Sstevel@tonic-gate #endif
144*0Sstevel@tonic-gate return (-1);
145*0Sstevel@tonic-gate }
146*0Sstevel@tonic-gate
147*0Sstevel@tonic-gate #if defined(__cplusplus) || defined(__STDC__)
148*0Sstevel@tonic-gate int
yyracc(int m)149*0Sstevel@tonic-gate yyracc(int m)
150*0Sstevel@tonic-gate #else
151*0Sstevel@tonic-gate yyracc(m)
152*0Sstevel@tonic-gate #endif
153*0Sstevel@tonic-gate {
154*0Sstevel@tonic-gate yyolsp = yylsp;
155*0Sstevel@tonic-gate if (yyextra[m]) {
156*0Sstevel@tonic-gate while (yyback((*yylsp)->yystops, -m) != 1 && yylsp > yylstate) {
157*0Sstevel@tonic-gate yylsp--;
158*0Sstevel@tonic-gate YYUNPUT(YYTEXT[--YYLENG]);
159*0Sstevel@tonic-gate }
160*0Sstevel@tonic-gate }
161*0Sstevel@tonic-gate yyprevious = YYTEXT[YYLENG-1];
162*0Sstevel@tonic-gate YYTEXT[YYLENG] = 0;
163*0Sstevel@tonic-gate #ifdef EOPTION
164*0Sstevel@tonic-gate yyleng = wcstombs((char *)yytext, YYTEXT, YYLENG*MB_LEN_MAX);
165*0Sstevel@tonic-gate #endif
166*0Sstevel@tonic-gate return (m);
167*0Sstevel@tonic-gate }
168