home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
unix
/
volume24
/
hp
/
hp.scan.l
< prev
next >
Wrap
Text File
|
1991-03-13
|
572b
|
33 lines
%{
/* hp.scan.l --- lex scanner for hp calculator */
#include "y.tab.h"
#undef input
#undef unput
%}
%%
"." return (DOT);
[0-9] return (DIGIT);
"P" return (BIGP);
"p" return (LITTLEP);
"+" return (PLUS);
"-" return (MINUS);
[Xx*] return (STAR);
"/" return (SLASH);
"%" return (PERCENT);
[:^] return (POW);
"&" return (AND);
"|" return (OR);
"!" return (NOT);
"=" return (EQ);
"<" return (LT);
">" return (GT);
"<=" return (LE);
">=" return (GE);
"D" return (BIGD);
"d" return (LITTLED);
[Qq] return (QUIT);
[ \t\n] ;
. fprintf(stderr, "%s: unknown command.\n", yytext);