/* 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";
cp
= "'x'\0'x'\0'x'\0'x'";
* for four times reentrant code!
* if (bounce = ((bounce + 1) & 1))
bounce
= ( bounce
+ 1 ) % 4;
cp
+= (4 * bounce
); /* 'x'\0 is 4 chars */
for (kp
= yykey
; kp
->kw_str
!= NIL
&& kp
->kw_val
!= tp
->Yychar
; kp
++)
return ( which
? cp2
: cp
);