78 lab6-c

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
%%
#define PROGRAM "/* Expression */ ( alpha + ’ beta ’ - ’\\n ’)\ n " \
" * 666666666 /* blah - blah - blah "
int main ()
{
int tag;
YYSTYPE value;
YYLTYPE coords;
init_scanner (PROGRAM);
do
{
tag = yylex (&value ,&coords);
if (tag != 0)
{ ... }
}
while ( tag != 0);
return 0;
}