/* Copyright (c) 1979 Regents of the University of California */
* pi - Pascal interpreter code translator
* Charles Haley, Bill Joy UCB
* Version 1.1 February 1978
* pxp - Pascal execution profiler
* Version 1.1 February 1978
* Printing representation of a
* "character" - a lexical token
* not in a yytok structure.
* 'which' indicates which char * you want
* should always be called as "charname(...,0),charname(...,1)"
Ych
.Yylval
= nullsem(ch
);
return (tokname(&Ych
, which
));
* Printing representation of a token
register struct yytok
*tp
;
register struct kwtab
*kp
;
cp
= "illegal character";
cp
= cp
== NIL
|| cp
[1] == 0 ? "character" : "string";
* for twice reentrant code!
* if (bounce = ((bounce + 1) & 1))
* now: don't bounce unless 0th call
bounce
= ((bounce
+ 1) & 1);
for (kp
= yykey
; kp
->kw_str
!= NIL
&& kp
->kw_val
!= tp
->Yychar
; kp
++)
return ( which
? cp2
: cp
);