home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 018.lha / parser / lex.yy.c < prev    next >
Text File  |  1986-10-19  |  18KB  |  1,037 lines

  1. /* # include "stdio.h" */
  2. # define U(x) x
  3. # define NLSTATE yyprevious=YYNEWLINE
  4. # define BEGIN yybgin = yysvec + 1 +
  5. # define INITIAL 0
  6. # define YYLERR yysvec
  7. # define YYSTATE (yyestate-yysvec-1)
  8. # define YYOPTIM 1
  9. # define YYLMAX 200
  10. # define output(c) putc(c,yyout)
  11. # define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:yytchar)
  12. # define unput(c) {yytchar= (c);if(yytchar=='\n')yylineno--;*yysptr++=yytchar;}
  13. # define yymore() (yymorfg=1)
  14. # define ECHO fprintf(yyout, "%s",yytext)
  15. # define REJECT { nstr = yyreject(); goto yyfussy;}
  16. int yyleng; extern char yytext[];
  17. int yymorfg;
  18. extern char *yysptr, yysbuf[];
  19. int yytchar;
  20. FILE *yyin = {stdin}, *yyout = {stdout};
  21. extern int yylineno;
  22. struct yysvf { 
  23.     int yystoff;
  24.     struct yysvf *yyother;
  25.     int *yystops;};
  26. struct yysvf *yyestate;
  27. extern struct yysvf yysvec[], *yybgin;
  28. /*
  29.         Little Smalltalk lexical analyzer
  30. */
  31. # include <math.h>
  32.  
  33. # undef input
  34. # undef unput
  35.  
  36. double atof();
  37. int linenum = 1;
  38. # define YYNEWLINE 10
  39. yylex(){
  40. int nstr; extern int yyprevious;
  41. while((nstr = yylook()) >= 0)
  42. yyfussy: switch(nstr){
  43. case 0:
  44. if(yywrap()) return(0); break;
  45. case 1:
  46.                        {;}
  47. break;
  48. case 2:
  49.                              {linenum++;}
  50. break;
  51. case 3:
  52.                              {readcomment();}
  53. break;
  54. case 4:
  55.                            {return(ASSIGN);}
  56. break;
  57. case 5:
  58.                            {return(ASSIGN);}
  59. break;
  60. case 6:
  61.                           {return(lexsave(CLASS));}
  62. break;
  63. case 7:
  64.                            {yylval.p = selfvar;  return(PSEUDO);}
  65. break;
  66. case 8:
  67.         {yylval.p = procvar;  return(PSEUDO);}
  68. break;
  69. case 9:
  70.                           {yylval.p = supervar; return(PSEUDO);}
  71. break;
  72. case 10:
  73.                             {yylval.p = nilvar;   return(PSEUDO);}
  74. break;
  75. case 11:
  76.                            {yylval.p = truevar;  return(PSEUDO);}
  77. break;
  78. case 12:
  79.                           {yylval.p = falsevar; return(PSEUDO);}
  80. break;
  81. case 13:
  82.                       {yylval.p = smallvar; return(PSEUDO);}
  83. break;
  84. case 14:
  85.                             {yylval.i = yytext[1]; return(LITCHAR);}
  86. break;
  87. case 15:
  88.                               {return(PS);}
  89. break;
  90. case 16:
  91. {return(lexsave(LITFNUM));}
  92. break;
  93. case 17:
  94.                          {yylval.i = atoi(yytext); return(LITNUM);}
  95. break;
  96. case 18:
  97.   {return(lexsave(LITFNUM));}
  98. break;
  99. case 19:
  100.                         {char c; unput(c = input());
  101.                                  if (c == '\'') yymore();
  102.                                  else return(lexlstr());}
  103. break;
  104. case 20:
  105.                  {return(varlex());}
  106. break;
  107. case 21:
  108.                   {return(slexsave(COLONVAR));}
  109. break;
  110. case 22:
  111.                 {return(slexsave(LITSYM));}
  112. break;
  113. case 23:
  114.                             {return(lexsave(MINUS));}
  115. break;
  116. case 24:
  117.                             {return(LP);}
  118. break;
  119. case 25:
  120.                             {return(RP);}
  121. break;
  122. case 26:
  123.                             {return(LB);}
  124. break;
  125. case 27:
  126.                             {return(RB);}
  127. break;
  128. case 28:
  129.                             {return(PERIOD);}
  130. break;
  131. case 29:
  132.             {return(lexsave(MBAR));}
  133. break;
  134. case 30:
  135.             {return(lexsave(MBAR));}
  136. break;
  137. case 31:
  138.                             {return(lexsave(BAR));}
  139. break;
  140. case 32:
  141.                             {return(lexsave(BAR));}
  142. break;
  143. case 33:
  144.                             {return(SEMI);}
  145. break;
  146. case 34:
  147.                             {return(lexsave(UPARROW));}
  148. break;
  149. case 35:
  150.             {return(lexsave(PE));}
  151. break;
  152. case 36:
  153.               {return(lexsave(BINARY));}
  154. break;
  155. case 37:
  156.               {return(PRIMITIVE);}
  157. break;
  158. case -1:
  159. break;
  160. default:
  161. fprintf(yyout,"bad switch yylook %d",nstr);
  162. } return(0); }
  163. /* end of yylex */
  164. static int ocbuf = 0;
  165. static int pbbuf[400];
  166.  
  167. static int input()
  168. {    int c;
  169.  
  170.     if (ocbuf) {c = pbbuf[--ocbuf]; }
  171.     else {
  172.         c = getc(fp);
  173.         if (c == EOF) c = 0;
  174.         }
  175.     return(c);
  176. }
  177.  
  178. static unput(c)
  179. char c;
  180. {
  181.     if (c) pbbuf[ocbuf++] = c;
  182. }
  183.  
  184. # include <ctype.h>
  185.  
  186. static readcomment()
  187. {  char c;
  188.  
  189.    while ((c = input()) && c != '\"')
  190.     if (c == '\n') linenum++;
  191.    if (!c) yyerror("unterminated comment");
  192. }
  193.  
  194. char *walloc(s) char *s;
  195. {  char *p, *malloc();
  196.  
  197.    p = malloc((unsigned) (strlen(s) + 1));
  198.    if (p == (char *) 0) yyerror("out of variable string space");
  199.    strcpy(p, s);
  200.    return(p);
  201. }
  202.  
  203. static int slexsave(type)
  204. int type;
  205. {
  206.  
  207.     yylval.c = walloc(&yytext[1]);
  208.     if (yylval.c == 0) yerr("cannot create symbol %s", yytext);
  209.     return(type);
  210. }
  211.  
  212. static int lexsave(type)
  213. int type;
  214. {
  215.  
  216.     yylval.c = walloc(yytext);
  217.     if (yylval.c == 0) yerr("cannot create string %s", yytext);
  218.     return(type);
  219. }
  220.  
  221. static int varlex()
  222. {  
  223.  
  224.    lexsave(0);
  225.    if (yytext[yyleng-1] == ':') return(KEYWORD);
  226.    else if (islower(yytext[0])) return(LOWERCASEVAR);
  227.    else return(UPPERCASEVAR);
  228. }
  229.  
  230. static int lexlstr()
  231. {  char *p, *q;
  232.  
  233.    yylval.c = p = walloc(&yytext[1]);
  234.    *(p + yyleng -2) = '\0';
  235.    return(LITSTR);
  236. }
  237. int yyvstop[] = {
  238. 0,
  239.  
  240. 36,
  241. 0,
  242.  
  243. 1,
  244. 0,
  245.  
  246. 2,
  247. 0,
  248.  
  249. 1,
  250. 36,
  251. 0,
  252.  
  253. 32,
  254. 36,
  255. 0,
  256.  
  257. 3,
  258. 36,
  259. 0,
  260.  
  261. 15,
  262. 36,
  263. 0,
  264.  
  265. 36,
  266. 0,
  267.  
  268. 36,
  269. 0,
  270.  
  271. 24,
  272. 36,
  273. 0,
  274.  
  275. 25,
  276. 36,
  277. 0,
  278.  
  279. 23,
  280. 36,
  281. 0,
  282.  
  283. 28,
  284. 36,
  285. 0,
  286.  
  287. 17,
  288. 18,
  289. 20,
  290. 0,
  291.  
  292. 36,
  293. 0,
  294.  
  295. 33,
  296. 36,
  297. 0,
  298.  
  299. 36,
  300. 0,
  301.  
  302. 35,
  303. 36,
  304. 0,
  305.  
  306. 20,
  307. 0,
  308.  
  309. 20,
  310. 0,
  311.  
  312. 26,
  313. 36,
  314. 0,
  315.  
  316. 27,
  317. 36,
  318. 0,
  319.  
  320. 34,
  321. 36,
  322. 0,
  323.  
  324. 20,
  325. 0,
  326.  
  327. 20,
  328. 0,
  329.  
  330. 20,
  331. 0,
  332.  
  333. 20,
  334. 0,
  335.  
  336. 31,
  337. 36,
  338. 0,
  339.  
  340. 30,
  341. 32,
  342. 36,
  343. 0,
  344.  
  345. 29,
  346. 31,
  347. 36,
  348. 0,
  349.  
  350. 22,
  351. 0,
  352.  
  353. 14,
  354. 0,
  355.  
  356. 19,
  357. 0,
  358.  
  359. 20,
  360. 0,
  361.  
  362. 20,
  363. 0,
  364.  
  365. 20,
  366. 0,
  367.  
  368. 21,
  369. 0,
  370.  
  371. 4,
  372. 0,
  373.  
  374. 5,
  375. 0,
  376.  
  377. 20,
  378. 0,
  379.  
  380. 20,
  381. 0,
  382.  
  383. 20,
  384. 0,
  385.  
  386. 20,
  387. 0,
  388.  
  389. 20,
  390. 0,
  391.  
  392. 20,
  393. 0,
  394.  
  395. 20,
  396. 0,
  397.  
  398. 18,
  399. 0,
  400.  
  401. 18,
  402. 20,
  403. 0,
  404.  
  405. 16,
  406. 20,
  407. 0,
  408.  
  409. 20,
  410. 0,
  411.  
  412. 20,
  413. 0,
  414.  
  415. 10,
  416. 20,
  417. 0,
  418.  
  419. 20,
  420. 0,
  421.  
  422. 20,
  423. 0,
  424.  
  425. 20,
  426. 0,
  427.  
  428. 20,
  429. 0,
  430.  
  431. 18,
  432. 0,
  433.  
  434. 16,
  435. 0,
  436.  
  437. 20,
  438. 0,
  439.  
  440. 20,
  441. 0,
  442.  
  443. 20,
  444. 0,
  445.  
  446. 7,
  447. 20,
  448. 0,
  449.  
  450. 20,
  451. 0,
  452.  
  453. 20,
  454. 0,
  455.  
  456. 11,
  457. 20,
  458. 0,
  459.  
  460. 16,
  461. 0,
  462.  
  463. 16,
  464. 20,
  465. 0,
  466.  
  467. 6,
  468. 20,
  469. 0,
  470.  
  471. 12,
  472. 20,
  473. 0,
  474.  
  475. 20,
  476. 0,
  477.  
  478. 20,
  479. 0,
  480.  
  481. 9,
  482. 20,
  483. 0,
  484.  
  485. 16,
  486. 0,
  487.  
  488. 20,
  489. 0,
  490.  
  491. 20,
  492. 0,
  493.  
  494. 20,
  495. 0,
  496.  
  497. 20,
  498. 0,
  499.  
  500. 20,
  501. 0,
  502.  
  503. 20,
  504. 0,
  505.  
  506. 20,
  507. 0,
  508.  
  509. 13,
  510. 20,
  511. 0,
  512.  
  513. 37,
  514. 0,
  515.  
  516. 20,
  517. 0,
  518.  
  519. 8,
  520. 20,
  521. 0,
  522. 0};
  523. # define YYTYPE char
  524. struct yywork { YYTYPE verify, advance; } yycrank[] = {
  525. 0,0,    0,0,    1,3,    0,0,    
  526. 0,0,    0,0,    0,0,    0,0,    
  527. 0,0,    0,0,    1,4,    1,5,    
  528. 0,0,    0,0,    1,6,    4,4,    
  529. 0,0,    0,0,    0,0,    4,4,    
  530. 0,0,    0,0,    0,0,    0,0,    
  531. 0,0,    0,0,    0,0,    0,0,    
  532. 0,0,    0,0,    0,0,    0,0,    
  533. 0,0,    0,0,    1,7,    1,8,    
  534. 1,9,    1,10,    4,4,    0,0,    
  535. 1,11,    1,12,    1,13,    0,0,    
  536. 1,3,    0,0,    1,14,    1,15,    
  537. 19,43,    1,16,    0,0,    0,0,    
  538. 0,0,    0,0,    0,0,    0,0,    
  539. 0,0,    0,0,    0,0,    1,17,    
  540. 1,18,    1,19,    0,0,    1,20,    
  541. 0,0,    0,0,    1,21,    0,0,    
  542. 1,22,    0,0,    0,0,    65,53,    
  543. 0,0,    65,53,    0,0,    2,31,    
  544. 2,8,    2,9,    2,10,    0,0,    
  545. 0,0,    9,33,    0,0,    2,13,    
  546. 0,0,    0,0,    0,0,    2,14,    
  547. 2,15,    9,0,    9,0,    0,0,    
  548. 1,23,    9,33,    1,24,    1,25,    
  549. 0,0,    0,0,    1,21,    26,46,    
  550. 2,17,    2,18,    2,19,    1,26,    
  551. 2,20,    45,58,    0,0,    27,47,    
  552. 49,62,    2,22,    22,45,    1,27,    
  553. 9,0,    46,59,    47,60,    19,44,    
  554. 1,28,    1,29,    29,51,    9,33,    
  555. 9,0,    9,0,    10,34,    9,33,    
  556. 28,48,    1,30,    9,0,    44,57,    
  557. 9,33,    48,61,    10,34,    10,0,    
  558. 28,49,    2,23,    10,34,    2,24,    
  559. 2,25,    50,63,    51,64,    52,65,    
  560. 28,50,    11,35,    57,70,    58,71,    
  561. 2,26,    9,33,    59,72,    61,73,    
  562. 62,74,    11,35,    11,35,    63,75,    
  563. 2,27,    11,35,    64,76,    70,81,    
  564. 71,82,    2,28,    2,29,    72,83,    
  565. 10,34,    10,34,    67,68,    73,84,    
  566. 10,34,    74,85,    2,32,    75,86,    
  567. 78,77,    10,34,    81,88,    9,0,    
  568. 84,89,    85,90,    88,91,    89,92,    
  569. 90,93,    9,33,    91,94,    11,36,    
  570. 11,35,    92,95,    93,96,    11,35,    
  571. 94,97,    95,98,    10,34,    96,99,    
  572. 11,35,    37,52,    37,52,    37,52,    
  573. 37,52,    37,52,    37,52,    37,52,    
  574. 37,52,    37,52,    37,52,    97,100,    
  575. 98,101,    39,53,    101,102,    39,53,    
  576. 0,0,    11,35,    39,54,    39,54,    
  577. 39,54,    39,54,    39,54,    39,54,    
  578. 39,54,    39,54,    39,54,    39,54,    
  579. 0,0,    67,77,    10,34,    16,37,    
  580. 0,0,    16,16,    16,16,    16,16,    
  581. 16,16,    16,16,    16,16,    16,16,    
  582. 16,16,    16,16,    16,16,    16,38,    
  583. 0,0,    0,0,    0,0,    0,0,    
  584. 0,0,    11,35,    16,21,    16,21,    
  585. 16,21,    16,21,    16,21,    16,21,    
  586. 16,21,    16,21,    16,21,    16,21,    
  587. 16,21,    16,21,    16,21,    16,21,    
  588. 16,21,    16,21,    16,21,    16,21,    
  589. 16,21,    16,21,    16,21,    16,21,    
  590. 16,21,    16,21,    16,21,    16,21,    
  591. 0,0,    0,0,    0,0,    0,0,    
  592. 0,0,    0,0,    16,21,    16,21,    
  593. 16,21,    16,21,    16,39,    16,21,    
  594. 16,21,    16,21,    16,21,    16,21,    
  595. 16,21,    16,21,    16,21,    16,21,    
  596. 16,21,    16,21,    16,21,    16,40,    
  597. 16,21,    16,21,    16,21,    16,21,    
  598. 16,21,    16,21,    16,21,    16,21,    
  599. 17,41,    17,41,    17,41,    17,41,    
  600. 17,41,    17,41,    17,41,    17,41,    
  601. 17,41,    17,41,    0,0,    0,0,    
  602. 0,0,    17,42,    0,0,    0,0,    
  603. 0,0,    17,41,    17,41,    17,41,    
  604. 17,41,    17,41,    17,41,    17,41,    
  605. 17,41,    17,41,    17,41,    17,41,    
  606. 17,41,    17,41,    17,41,    17,41,    
  607. 17,41,    17,41,    17,41,    17,41,    
  608. 17,41,    17,41,    17,41,    17,41,    
  609. 17,41,    17,41,    17,41,    0,0,    
  610. 0,0,    0,0,    0,0,    0,0,    
  611. 0,0,    17,41,    17,41,    17,41,    
  612. 17,41,    17,41,    17,41,    17,41,    
  613. 17,41,    17,41,    17,41,    17,41,    
  614. 17,41,    17,41,    17,41,    17,41,    
  615. 17,41,    17,41,    17,41,    17,41,    
  616. 17,41,    17,41,    17,41,    17,41,    
  617. 17,41,    17,41,    17,41,    21,21,    
  618. 21,21,    21,21,    21,21,    21,21,    
  619. 21,21,    21,21,    21,21,    21,21,    
  620. 21,21,    21,38,    0,0,    0,0,    
  621. 0,0,    0,0,    0,0,    0,0,    
  622. 21,21,    21,21,    21,21,    21,21,    
  623. 21,21,    21,21,    21,21,    21,21,    
  624. 21,21,    21,21,    21,21,    21,21,    
  625. 21,21,    21,21,    21,21,    21,21,    
  626. 21,21,    21,21,    21,21,    21,21,    
  627. 21,21,    21,21,    21,21,    21,21,    
  628. 21,21,    21,21,    0,0,    0,0,    
  629. 0,0,    0,0,    0,0,    0,0,    
  630. 21,21,    21,21,    21,21,    21,21,    
  631. 21,21,    21,21,    21,21,    21,21,    
  632. 21,21,    21,21,    21,21,    21,21,    
  633. 21,21,    21,21,    21,21,    21,21,    
  634. 21,21,    21,21,    21,21,    21,21,    
  635. 21,21,    21,21,    21,21,    21,21,    
  636. 21,21,    21,21,    33,0,    33,0,    
  637. 53,66,    53,66,    53,66,    53,66,    
  638. 53,66,    53,66,    53,66,    53,66,    
  639. 53,66,    53,66,    54,54,    54,54,    
  640. 54,54,    54,54,    54,54,    54,54,    
  641. 54,54,    54,54,    54,54,    54,54,    
  642. 0,0,    33,0,    0,0,    0,0,    
  643. 0,0,    0,0,    0,0,    0,0,    
  644. 0,0,    33,0,    33,0,    0,0,    
  645. 0,0,    40,55,    0,0,    33,0,    
  646. 40,56,    40,56,    40,56,    40,56,    
  647. 40,56,    40,56,    40,56,    40,56,    
  648. 40,56,    40,56,    0,0,    0,0,    
  649. 0,0,    0,0,    0,0,    0,0,    
  650. 0,0,    40,56,    40,56,    40,56,    
  651. 40,56,    40,56,    40,56,    40,56,    
  652. 40,56,    40,56,    40,56,    40,56,    
  653. 40,56,    40,56,    40,56,    40,56,    
  654. 40,56,    40,56,    40,56,    40,56,    
  655. 40,56,    40,56,    40,56,    40,56,    
  656. 40,56,    40,56,    40,56,    0,0,    
  657. 33,0,    41,41,    41,41,    41,41,    
  658. 41,41,    41,41,    41,41,    41,41,    
  659. 41,41,    41,41,    41,41,    0,0,    
  660. 0,0,    0,0,    0,0,    0,0,    
  661. 0,0,    0,0,    41,41,    41,41,    
  662. 41,41,    41,41,    41,41,    41,41,    
  663. 41,41,    41,41,    41,41,    41,41,    
  664. 41,41,    41,41,    41,41,    41,41,    
  665. 41,41,    41,41,    41,41,    41,41,    
  666. 41,41,    41,41,    41,41,    41,41,    
  667. 41,41,    41,41,    41,41,    41,41,    
  668. 0,0,    0,0,    0,0,    0,0,    
  669. 0,0,    0,0,    41,41,    41,41,    
  670. 41,41,    41,41,    41,41,    41,41,    
  671. 41,41,    41,41,    41,41,    41,41,    
  672. 41,41,    41,41,    41,41,    41,41,    
  673. 41,41,    41,41,    41,41,    41,41,    
  674. 41,41,    41,41,    41,41,    41,41,    
  675. 41,41,    41,41,    41,41,    41,41,    
  676. 55,67,    55,67,    55,67,    55,67,    
  677. 55,67,    55,67,    55,67,    55,67,    
  678. 55,67,    55,67,    0,0,    0,0,    
  679. 0,0,    0,0,    0,0,    0,0,    
  680. 0,0,    55,67,    55,67,    55,67,    
  681. 55,67,    55,67,    55,67,    55,67,    
  682. 55,67,    55,67,    55,67,    55,67,    
  683. 55,67,    55,67,    55,67,    55,67,    
  684. 55,67,    55,67,    55,67,    55,67,    
  685. 55,67,    55,67,    55,67,    55,67,    
  686. 55,67,    55,67,    55,67,    56,68,    
  687. 0,0,    56,56,    56,56,    56,56,    
  688. 56,56,    56,56,    56,56,    56,56,    
  689. 56,56,    56,56,    56,56,    0,0,    
  690. 0,0,    0,0,    0,0,    0,0,    
  691. 0,0,    0,0,    56,56,    56,56,    
  692. 56,56,    56,56,    56,56,    56,56,    
  693. 56,56,    56,56,    56,56,    56,56,    
  694. 56,56,    56,56,    56,56,    56,56,    
  695. 56,56,    56,56,    56,56,    56,56,    
  696. 56,56,    56,56,    56,56,    56,56,    
  697. 56,56,    56,56,    56,56,    56,56,    
  698. 68,78,    68,78,    68,78,    68,78,    
  699. 68,78,    68,78,    68,78,    68,78,    
  700. 68,78,    68,78,    56,69,    0,0,    
  701. 0,0,    0,0,    0,0,    0,0,    
  702. 0,0,    68,78,    68,78,    68,78,    
  703. 68,78,    68,78,    68,78,    68,78,    
  704. 68,78,    68,78,    68,78,    68,78,    
  705. 68,78,    68,78,    68,78,    68,78,    
  706. 68,78,    68,78,    68,78,    68,78,    
  707. 68,78,    68,78,    68,78,    68,78,    
  708. 68,78,    68,78,    68,78,    69,79,    
  709. 0,0,    69,79,    0,0,    0,0,    
  710. 69,80,    69,80,    69,80,    69,80,    
  711. 69,80,    69,80,    69,80,    69,80,    
  712. 69,80,    69,80,    77,79,    0,0,    
  713. 77,79,    0,0,    0,0,    77,87,    
  714. 77,87,    77,87,    77,87,    77,87,    
  715. 77,87,    77,87,    77,87,    77,87,    
  716. 77,87,    79,87,    79,87,    79,87,    
  717. 79,87,    79,87,    79,87,    79,87,    
  718. 79,87,    79,87,    79,87,    80,80,    
  719. 80,80,    80,80,    80,80,    80,80,    
  720. 80,80,    80,80,    80,80,    80,80,    
  721. 80,80,    0,0,    0,0,    0,0,    
  722. 0,0};
  723. struct yysvf yysvec[] = {
  724. 0,    0,    0,
  725. -1,    0,        0,    
  726. -42,    yysvec+1,    0,    
  727. 0,    0,        yyvstop+1,
  728. 6,    0,        yyvstop+3,
  729. 0,    0,        yyvstop+5,
  730. 0,    yysvec+4,    yyvstop+7,
  731. 0,    0,        yyvstop+10,
  732. 0,    0,        yyvstop+13,
  733. -80,    0,        yyvstop+16,
  734. -121,    0,        yyvstop+19,
  735. -140,    0,        yyvstop+21,
  736. 0,    0,        yyvstop+23,
  737. 0,    0,        yyvstop+26,
  738. 0,    0,        yyvstop+29,
  739. 0,    0,        yyvstop+32,
  740. 173,    0,        yyvstop+35,
  741. 248,    0,        yyvstop+39,
  742. 0,    0,        yyvstop+41,
  743. 3,    0,        yyvstop+44,
  744. 0,    0,        yyvstop+46,
  745. 323,    0,        yyvstop+49,
  746. 2,    yysvec+21,    yyvstop+51,
  747. 0,    0,        yyvstop+53,
  748. 0,    0,        yyvstop+56,
  749. 0,    0,        yyvstop+59,
  750. 2,    yysvec+21,    yyvstop+62,
  751. 2,    yysvec+21,    yyvstop+64,
  752. 23,    yysvec+21,    yyvstop+66,
  753. 4,    yysvec+21,    yyvstop+68,
  754. 0,    0,        yyvstop+70,
  755. 0,    0,        yyvstop+73,
  756. 0,    0,        yyvstop+77,
  757. -437,    yysvec+9,    yyvstop+81,
  758. 0,    0,        yyvstop+83,
  759. 0,    yysvec+11,    0,    
  760. 0,    0,        yyvstop+85,
  761. 141,    0,        0,    
  762. 0,    0,        yyvstop+87,
  763. 158,    yysvec+21,    yyvstop+89,
  764. 436,    yysvec+21,    yyvstop+91,
  765. 481,    0,        yyvstop+93,
  766. 0,    0,        yyvstop+95,
  767. 0,    0,        yyvstop+97,
  768. 13,    0,        0,    
  769. 8,    yysvec+21,    yyvstop+99,
  770. 5,    yysvec+21,    yyvstop+101,
  771. 6,    yysvec+21,    yyvstop+103,
  772. 21,    yysvec+21,    yyvstop+105,
  773. 11,    yysvec+21,    yyvstop+107,
  774. 25,    yysvec+21,    yyvstop+109,
  775. 21,    yysvec+21,    yyvstop+111,
  776. 38,    yysvec+37,    yyvstop+113,
  777. 400,    0,        0,    
  778. 410,    yysvec+21,    yyvstop+115,
  779. 556,    0,        0,    
  780. 601,    yysvec+21,    yyvstop+118,
  781. 37,    0,        0,    
  782. 28,    yysvec+21,    yyvstop+121,
  783. 31,    yysvec+21,    yyvstop+123,
  784. 0,    yysvec+21,    yyvstop+125,
  785. 45,    yysvec+21,    yyvstop+128,
  786. 40,    yysvec+21,    yyvstop+130,
  787. 50,    yysvec+21,    yyvstop+132,
  788. 53,    yysvec+21,    yyvstop+134,
  789. 28,    yysvec+53,    0,    
  790. 0,    yysvec+53,    yyvstop+136,
  791. 116,    yysvec+55,    yyvstop+138,
  792. 644,    0,        0,    
  793. 692,    yysvec+21,    yyvstop+140,
  794. 46,    0,        0,    
  795. 41,    yysvec+21,    yyvstop+142,
  796. 58,    yysvec+21,    yyvstop+144,
  797. 83,    yysvec+21,    yyvstop+146,
  798. 57,    yysvec+21,    yyvstop+149,
  799. 53,    yysvec+21,    yyvstop+151,
  800. 0,    yysvec+21,    yyvstop+153,
  801. 707,    0,        0,    
  802. 67,    yysvec+68,    yyvstop+156,
  803. 717,    0,        0,    
  804. 727,    yysvec+21,    yyvstop+158,
  805. 65,    0,        0,    
  806. 0,    yysvec+21,    yyvstop+161,
  807. 0,    yysvec+21,    yyvstop+164,
  808. 58,    yysvec+21,    yyvstop+167,
  809. 57,    yysvec+21,    yyvstop+169,
  810. 0,    yysvec+21,    yyvstop+171,
  811. 0,    yysvec+79,    yyvstop+174,
  812. 58,    0,        0,    
  813. 64,    yysvec+21,    yyvstop+176,
  814. 79,    yysvec+21,    yyvstop+178,
  815. 73,    0,        0,    
  816. 82,    yysvec+21,    yyvstop+180,
  817. 74,    yysvec+21,    yyvstop+182,
  818. 66,    0,        0,    
  819. 84,    yysvec+21,    yyvstop+184,
  820. 80,    yysvec+21,    yyvstop+186,
  821. 98,    0,        0,    
  822. 85,    yysvec+21,    yyvstop+188,
  823. 0,    yysvec+21,    yyvstop+190,
  824. 0,    0,        yyvstop+193,
  825. 87,    yysvec+21,    yyvstop+195,
  826. 0,    yysvec+21,    yyvstop+197,
  827. 0,    0,    0};
  828. struct yywork *yytop = yycrank+784;
  829. struct yysvf *yybgin = yysvec+1;
  830. char yymatch[] = {
  831. 00  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  832. 01  ,011 ,012 ,01  ,01  ,015 ,01  ,01  ,
  833. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  834. 01  ,01  ,01  ,01  ,01  ,01  ,01  ,01  ,
  835. 011 ,01  ,01  ,01  ,01  ,01  ,01  ,047 ,
  836. '(' ,'(' ,01  ,'+' ,01  ,'+' ,'(' ,01  ,
  837. '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,
  838. '0' ,'0' ,01  ,01  ,01  ,01  ,01  ,01  ,
  839. 01  ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
  840. 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
  841. 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
  842. 'A' ,'A' ,'A' ,'(' ,01  ,01  ,01  ,01  ,
  843. 01  ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,
  844. 'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,
  845. 'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,'a' ,
  846. 'a' ,'a' ,'a' ,01  ,01  ,01  ,01  ,01  ,
  847. 0};
  848. char yyextra[] = {
  849. 0,0,0,0,0,0,0,0,
  850. 0,0,0,0,0,0,0,0,
  851. 0,0,0,0,0,0,0,0,
  852. 0,0,0,0,0,0,0,0,
  853. 0,0,0,0,0,0,0,0,
  854. 0};
  855. /* UNISRC_ID    @(#)27.2   85/07/11  */
  856. int yylineno =1;
  857. # define YYU(x) x
  858. # define NLSTATE yyprevious=YYNEWLINE
  859. char yytext[YYLMAX];
  860. struct yysvf *yylstate [YYLMAX], **yylsp, **yyolsp;
  861. char yysbuf[YYLMAX];
  862. char *yysptr = yysbuf;
  863. int *yyfnd;
  864. extern struct yysvf *yyestate;
  865. int yyprevious = YYNEWLINE;
  866. yylook(){
  867.     register struct yysvf *yystate, **lsp;
  868.     register struct yywork *yyt;
  869.     struct yysvf *yyz;
  870.     int yych, yyfirst;
  871.     struct yywork *yyr;
  872. # ifdef LEXDEBUG
  873.     int debug;
  874. # endif
  875.     char *yylastch;
  876.     /* start off machines */
  877. # ifdef LEXDEBUG
  878.     debug = 0;
  879. # endif
  880.     yyfirst=1;
  881.     if (!yymorfg)
  882.         yylastch = yytext;
  883.     else {
  884.         yymorfg=0;
  885.         yylastch = yytext+yyleng;
  886.         }
  887.     for(;;){
  888.         lsp = yylstate;
  889.         yyestate = yystate = yybgin;
  890.         if (yyprevious==YYNEWLINE) yystate++;
  891.         for (;;){
  892. # ifdef LEXDEBUG
  893.             if(debug)fprintf(yyout,"state %d\n",yystate-yysvec-1);
  894. # endif
  895.             yyt = &yycrank[yystate->yystoff];
  896.             if(yyt == yycrank && !yyfirst){  /* may not be any transitions */
  897.                 yyz = yystate->yyother;
  898.                 if(yyz == 0)break;
  899.                 if(yyz->yystoff == 0)break;
  900.                 }
  901.             *yylastch++ = yych = input();
  902.             yyfirst=0;
  903.         tryagain:
  904. # ifdef LEXDEBUG
  905.             if(debug){
  906.                 fprintf(yyout,"char ");
  907.                 allprint(yych);
  908.                 putchar('\n');
  909.                 }
  910. # endif
  911.             yyr = yyt;
  912.             if ( (long)yyt > (long)yycrank){
  913.                 yyt = yyr + yych;
  914.                 if (yyt <= yytop && yyt->verify+yysvec == yystate){
  915.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  916.                         {unput(*--yylastch);break;}
  917.                     *lsp++ = yystate = yyt->advance+yysvec;
  918.                     goto contin;
  919.                     }
  920.                 }
  921. # ifdef YYOPTIM
  922.             else if((long)yyt < (long)yycrank) {        /* r < yycrank */
  923.                 yyt = yyr = yycrank+(yycrank-yyt);
  924. # ifdef LEXDEBUG
  925.                 if(debug)fprintf(yyout,"compressed state\n");
  926. # endif
  927.                 yyt = yyt + yych;
  928.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  929.                     if(yyt->advance+yysvec == YYLERR)    /* error transitions */
  930.                         {unput(*--yylastch);break;}
  931.                     *lsp++ = yystate = yyt->advance+yysvec;
  932.                     goto contin;
  933.                     }
  934.                 yyt = yyr + YYU(yymatch[yych]);
  935. # ifdef LEXDEBUG
  936.                 if(debug){
  937.                     fprintf(yyout,"try fall back character ");
  938.                     allprint(YYU(yymatch[yych]));
  939.                     putchar('\n');
  940.                     }
  941. # endif
  942.                 if(yyt <= yytop && yyt->verify+yysvec == yystate){
  943.                     if(yyt->advance+yysvec == YYLERR)    /* error transition */
  944.                         {unput(*--yylastch);break;}
  945.                     *lsp++ = yystate = yyt->advance+yysvec;
  946.                     goto contin;
  947.                     }
  948.                 }
  949.             if ((yystate = yystate->yyother) && (yyt = &yycrank[yystate->yystoff]) != yycrank){
  950. # ifdef LEXDEBUG
  951.                 if(debug)fprintf(yyout,"fall back to state %d\n",yystate-yysvec-1);
  952. # endif
  953.                 goto tryagain;
  954.                 }
  955. # endif
  956.             else
  957.                 {unput(*--yylastch);break;}
  958.         contin:
  959. # ifdef LEXDEBUG
  960.             if(debug){
  961.                 fprintf(yyout,"state %d char ",yystate-yysvec-1);
  962.                 allprint(yych);
  963.                 putchar('\n');
  964.                 }
  965. # endif
  966.             ;
  967.             }
  968. # ifdef LEXDEBUG
  969.         if(debug){
  970.             fprintf(yyout,"stopped at %d with ",*(lsp-1)-yysvec-1);
  971.             allprint(yych);
  972.             putchar('\n');
  973.             }
  974. # endif
  975.         while (lsp-- > yylstate){
  976.             *yylastch-- = 0;
  977.             if (*lsp != 0 && (yyfnd= (*lsp)->yystops) && *yyfnd > 0){
  978.                 yyolsp = lsp;
  979.                 if(yyextra[*yyfnd]){        /* must backup */
  980.                     while(yyback((*lsp)->yystops,-*yyfnd) != 1 && lsp > yylstate){
  981.                         lsp--;
  982.                         unput(*yylastch--);
  983.                         }
  984.                     }
  985.                 yyprevious = YYU(*yylastch);
  986.                 yylsp = lsp;
  987.                 yyleng = yylastch-yytext+1;
  988.                 yytext[yyleng] = 0;
  989. # ifdef LEXDEBUG
  990.                 if(debug){
  991.                     fprintf(yyout,"\nmatch ");
  992.                     sprint(yytext);
  993.                     fprintf(yyout," action %d\n",*yyfnd);
  994.                     }
  995. # endif
  996.                 return(*yyfnd++);
  997.                 }
  998.             unput(*yylastch);
  999.             }
  1000.         if (yytext[0] == 0  /* && feof(yyin) */)
  1001.             {
  1002.             yysptr=yysbuf;
  1003.             return(0);
  1004.             }
  1005.         yyprevious = yytext[0] = input();
  1006.         if (yyprevious>0)
  1007.             output(yyprevious);
  1008.         yylastch=yytext;
  1009. # ifdef LEXDEBUG
  1010.         if(debug)putchar('\n');
  1011. # endif
  1012.         }
  1013.     }
  1014. yyback(p, m)
  1015.     int *p;
  1016. {
  1017. if (p==0) return(0);
  1018. while (*p)
  1019.     {
  1020.     if (*p++ == m)
  1021.         return(1);
  1022.     }
  1023. return(0);
  1024. }
  1025.     /* the following are only used in the lex library */
  1026. yyinput(){
  1027.     return(input());
  1028.     }
  1029. yyoutput(c)
  1030.   int c; {
  1031.     output(c);
  1032.     }
  1033. yyunput(c)
  1034.    int c; {
  1035.     unput(c);
  1036.     }
  1037.