home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
minnie.tuhs.org
/
unixen.tar
/
unixen
/
PDP-11
/
Distributions
/
ucb
/
spencer_2bsd.tar.gz
/
2bsd.tar
/
src
/
pi0
/
yyseman.c
< prev
next >
Wrap
C/C++ Source or Header
|
1980-02-17
|
873b
|
47 lines
/* Copyright (c) 1979 Regents of the University of California */
#
/*
* pi - Pascal interpreter code translator
*
* Charles Haley, Bill Joy UCB
* Version 1.2 January 1979
*
*
* pxp - Pascal execution profiler
*
* Bill Joy UCB
* Version 1.2 January 1979
*/
#include "0.h"
#include "yy.h"
/*
* Assign semantics to a generated token
*
* Most terminals have a semantic value the current
* input line. If they are generated they are flagged
* by having this number negated.
*
* The terminals which have true semantics such
* as identifiers and strings are instead given
* semantic value NIL here - we do not attempt
* to do repair, e.g. by giving generated integers
* the value 1, etc.
*/
nullsem(ch)
int ch;
{
switch (ch) {
case YID:
case YINT:
case YNUMB:
case YBINT:
case YSTRING:
return (NIL);
default:
return (-yyeline);
}
}