home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
OS2-YACC.ZIP
/
YPTITM.1C
< prev
next >
Wrap
Text File
|
1989-09-29
|
1KB
|
52 lines
/*
HEADER: CUG nnn.nn;
TITLE: YACC - Yet Another Compilier-Compilier
VERSION: 1.0 for IBM-PC
DATE: JAN 28, 1985
DESCRIPTION: LALR(1) Parser Generator. From UNIX
KEYWORDS: Parser Generator Compilier-Compilier YACC
SYSTEM: IBM-PC and Compatiables
FILENAME: YPTITM.1C
WARNINGS: This program is not for the casual user. It will
be useful primarily to expert developers.
CRC: N/A
SEE-ALSO: LEX and PREP
AUTHORS: Scott Guthery 11100 leafwood lane Austin, TX 78750
COMPILERS: DESMET-C
REFERENCES: UNIX Systems Manuals
*/
#include "y1.h"
/*
* yptitm.1c
*
* Modified to make debug code conditionally compile.
* 28-Aug-81
* Bob Denny
*/
void putitem( int *ptr, struct looksets *lptr )
{
register struct item *j;
#ifdef debug
if( foutput!=NULL )
{
fprintf( foutput, "putitem(%s), state %d\n", writem(ptr), nstate );
}
#endif
j = pstate[nstate+1];
j->pitem = ptr;
if( !nolook ) j->look = flset( lptr );
pstate[nstate+1] = ++j;
if( (int *)j > zzmemsz )
{
zzmemsz = (int *)j;
if( zzmemsz >= &mem0[MEMSIZE] ) error( "out of state space" );
}
}