/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
#include "ldefs.h"
static void rhd1(void);
static void chd1(void);
static void chd2(void);
static void ctail(void);
static void rtail(void);
void
phead1(void)
{
}
static void
chd1(void)
{
if (*v_stmp == 'y')
if (handleeuc) {
if (widecio) { /* -w option */
} else { /* -e option */
}
} else { /* ASCII compatibility mode. */
}
else
if (optim)
#ifdef DEBUG
#endif
if (widecio)
"# define output(c) (void)putwc(c,yyout)\n");
else
"# define output(c) (void)putc(c,yyout)\n");
if (widecio)
"# define lex_output(c) (void)putwc(c,yyout)\n");
else
"# define lex_output(c) (void)putc(c,yyout)\n");
"\n#if defined(__cplusplus) || defined(__STDC__)\n");
"\n#if defined(__cplusplus) && defined(__EXTERN_C__)\n");
/* XCU4: type of yyless is int */
"#if defined(__cplusplus) && defined(__EXTERN_C__)\n");
"# define unput(c)"
" {yytchar= (c);if(yytchar=='\\n')yylineno--;*yysptr++=yytchar;}\n");
if (widecio) {
"# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getwc(yyin))==",
ctable['\n'],
"?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)");
"# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getwc(yyin))==",
ctable['\n'],
"?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)");
"# define ECHO (void)fprintf(yyout, \"%%ws\",yytext)\n");
"# define REJECT { nstr = yyreject_w(); goto yyfussy;}\n");
/*
* XCU4:
* If %array, yytext[] contains the token.
* If %pointer, yytext is a pointer to yy_tbuf[].
*/
if (isArray) {
} else {
}
} else {
"# define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==",
ctable['\n'],
"?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)");
"# define lex_input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==",
ctable['\n'],
"?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)");
"#define ECHO fprintf(yyout, \"%%s\",yytext)\n");
if (handleeuc) {
"# define REJECT { nstr = yyreject_e(); goto yyfussy;}\n");
/*
* XCU4:
* If %array, yytext[] contains the token.
* If %pointer, yytext is a pointer to yy_tbuf[].
*/
if (isArray) {
"unsigned char yytext[YYLMAX*MB_LEN_MAX];\n");
"wchar_t yywtext[YYLMAX];\n");
} else {
"wchar_t yy_twbuf[YYLMAX];\n");
"wchar_t yy_tbuf[YYLMAX*MB_LEN_MAX];\n");
"unsigned char * yytext ="
"(unsigned char *)yy_tbuf;\n");
"wchar_t * yywtext = yy_twbuf;\n");
"int yytextsz = YYLMAX;\n");
"#define YYTEXTSZINC 100\n");
}
} else {
"# define REJECT { nstr = yyreject(); goto yyfussy;}\n");
/*
* XCU4:
* If %array, yytext[] contains the token.
* If %pointer, yytext is a pointer to yy_tbuf[].
*/
if (isArray) {
} else {
"char * yytext = yy_tbuf;\n");
"int yytextsz = YYLMAX;\n");
"#define YYTEXTSZINC 100\n");
}
}
}
if (handleeuc)
else
}
static void
rhd1(void)
{
"define REJECT nstr = yyrjct(yytext,yyleng);goto 30998\n");
"common /yyldat/ yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta\n");
"integer yyfnd, yymorf, yyprev, yybgin, yylsp, yylsta(YYLMAX)\n");
}
void
phead2(void)
{
if (!ratfor)
chd2();
}
static void
chd2(void)
{
"/* to avoid CC and lint complaining yyfussy not being used ...*/\n");
}
void
ptail(void)
{
if (!pflag)
pflag = 1;
}
static void
ctail(void)
{
"(void)fprintf(yyout,\"bad switch yylook %%d\",nstr);\n");
}
static void
rtail(void)
{
int i;
"\n30998 if(nstr .lt. 0 .or. nstr .gt. %d)goto 30999\n", casecount);
for (i = 0; i < casecount; i++)
}
void
statistics(void)
{
"%d/%d nodes(%%e), %d/%d positions(%%p), %d/%d (%%n), %ld transitions,\n",
if (optim)
}