3 # define NLSTATE yyprevious=YYNEWLINE
4 # define BEGIN yybgin = yysvec + 1 +
7 # define YYSTATE (yyestate-yysvec-1)
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
[];
18 extern char *yysptr
, yysbuf
[];
20 FILE *yyin
= {stdin
}, *yyout
= {stdout
};
23 struct yywork
*yystoff
;
24 struct yysvf
*yyother
;
26 struct yysvf
*yyestate
;
27 extern struct yysvf yysvec
[], *yybgin
;
43 void lua_setinput (Input fn
)
48 void lua_setunput (Unput fn
)
53 char *lua_lasttext (void)
60 int nstr
; extern int yyprevious
;
61 while((nstr
= yylook()) >= 0)
62 yyfussy
: switch(nstr
){
64 if(yywrap()) return(0); break;
69 {yylval
.vInt
= 1; return DEBUG
;}
72 {yylval
.vInt
= 0; return DEBUG
;}
109 yylval
.vWord
= lua_nfile
-1;
149 yylval
.vWord
= lua_findenclosedconstant (yytext
);
158 yylval
.vFloat
= atof(yytext
);
164 yylval
.vWord
= lua_findsymbol (yytext
);
174 fprintf(yyout
,"bad switch yylook %d",nstr
);
491 struct yywork
{ YYTYPE verify
, advance
; } yycrank
[] = {
495 6,29, 4,28, 0,0, 0,0,
497 6,29, 6,29, 0,0, 0,0,
498 0,0, 0,0, 7,31, 7,31,
504 0,0, 1,10, 6,29, 7,31,
505 8,33, 0,0, 6,29, 0,0,
506 7,32, 0,0, 0,0, 6,29,
507 7,31, 1,11, 0,0, 1,12,
508 2,27, 7,31, 1,13, 11,39,
509 12,40, 1,13, 26,56, 0,0,
511 6,29, 0,0, 0,0, 6,29,
514 2,11, 0,0, 2,12, 0,0,
517 0,0, 1,15, 1,16, 1,17,
518 0,0, 22,52, 1,18, 18,47,
519 23,53, 1,19, 42,63, 1,20,
520 1,21, 25,55, 14,42, 1,22,
521 15,43, 1,23, 1,24, 16,44,
522 1,25, 16,45, 17,46, 19,48,
523 21,51, 2,14, 20,49, 1,26,
524 2,15, 2,16, 2,17, 24,54,
525 20,50, 2,18, 44,64, 45,65,
526 2,19, 46,66, 2,20, 2,21,
527 27,57, 48,67, 2,22, 49,68,
528 2,23, 2,24, 50,69, 2,25,
529 52,70, 53,72, 27,58, 54,73,
530 52,71, 9,34, 2,26, 9,35,
531 9,35, 9,35, 9,35, 9,35,
532 9,35, 9,35, 9,35, 9,35,
533 9,35, 10,36, 55,74, 10,37,
534 10,37, 10,37, 10,37, 10,37,
535 10,37, 10,37, 10,37, 10,37,
536 10,37, 57,75, 58,76, 64,80,
537 66,81, 67,82, 70,83, 71,84,
538 72,85, 73,86, 74,87, 10,38,
539 10,38, 38,61, 10,38, 38,61,
540 75,88, 76,89, 38,62, 38,62,
541 38,62, 38,62, 38,62, 38,62,
542 38,62, 38,62, 38,62, 38,62,
543 80,92, 81,93, 13,41, 13,41,
544 13,41, 13,41, 13,41, 13,41,
545 13,41, 13,41, 13,41, 13,41,
546 82,94, 83,95, 84,96, 10,38,
547 10,38, 86,97, 10,38, 13,41,
548 13,41, 13,41, 13,41, 13,41,
549 13,41, 13,41, 13,41, 13,41,
550 13,41, 13,41, 13,41, 13,41,
551 13,41, 13,41, 13,41, 13,41,
552 13,41, 13,41, 13,41, 13,41,
553 13,41, 13,41, 13,41, 13,41,
554 13,41, 87,98, 88,99, 60,79,
555 60,79, 13,41, 60,79, 13,41,
556 13,41, 13,41, 13,41, 13,41,
557 13,41, 13,41, 13,41, 13,41,
558 13,41, 13,41, 13,41, 13,41,
559 13,41, 13,41, 13,41, 13,41,
560 13,41, 13,41, 13,41, 13,41,
561 13,41, 13,41, 13,41, 13,41,
562 13,41, 33,33, 89,100, 60,79,
563 60,79, 92,101, 60,79, 93,102,
564 95,103, 33,33, 33,0, 96,104,
565 99,105, 100,106, 102,107, 106,108,
566 107,109, 35,35, 35,35, 35,35,
567 35,35, 35,35, 35,35, 35,35,
568 35,35, 35,35, 35,35, 108,110,
570 0,0, 0,0, 33,33, 0,0,
571 0,0, 35,59, 35,59, 33,33,
572 35,59, 0,0, 0,0, 33,33,
574 33,33, 0,0, 0,0, 0,0,
575 0,0, 36,60, 36,60, 36,60,
576 36,60, 36,60, 36,60, 36,60,
577 36,60, 36,60, 36,60, 0,0,
578 0,0, 33,33, 0,0, 0,0,
579 33,33, 35,59, 35,59, 0,0,
580 35,59, 36,38, 36,38, 59,77,
581 36,38, 59,77, 0,0, 0,0,
582 59,78, 59,78, 59,78, 59,78,
583 59,78, 59,78, 59,78, 59,78,
584 59,78, 59,78, 61,62, 61,62,
585 61,62, 61,62, 61,62, 61,62,
586 61,62, 61,62, 61,62, 61,62,
588 0,0, 36,38, 36,38, 0,0,
589 36,38, 77,78, 77,78, 77,78,
590 77,78, 77,78, 77,78, 77,78,
591 77,78, 77,78, 77,78, 79,90,
592 0,0, 79,90, 0,0, 0,0,
593 79,91, 79,91, 79,91, 79,91,
594 79,91, 79,91, 79,91, 79,91,
595 79,91, 79,91, 90,91, 90,91,
596 90,91, 90,91, 90,91, 90,91,
597 90,91, 90,91, 90,91, 90,91,
599 struct yysvf yysvec
[] = {
601 yycrank
+-1, 0, yyvstop
+1,
602 yycrank
+-28, yysvec
+1, yyvstop
+3,
603 yycrank
+0, 0, yyvstop
+5,
604 yycrank
+4, 0, yyvstop
+7,
605 yycrank
+0, 0, yyvstop
+10,
606 yycrank
+-11, 0, yyvstop
+12,
607 yycrank
+-17, 0, yyvstop
+14,
608 yycrank
+7, 0, yyvstop
+16,
609 yycrank
+107, 0, yyvstop
+18,
610 yycrank
+119, 0, yyvstop
+20,
611 yycrank
+6, 0, yyvstop
+23,
612 yycrank
+7, 0, yyvstop
+25,
613 yycrank
+158, 0, yyvstop
+27,
614 yycrank
+4, yysvec
+13, yyvstop
+30,
615 yycrank
+5, yysvec
+13, yyvstop
+33,
616 yycrank
+11, yysvec
+13, yyvstop
+36,
617 yycrank
+5, yysvec
+13, yyvstop
+39,
618 yycrank
+5, yysvec
+13, yyvstop
+42,
619 yycrank
+12, yysvec
+13, yyvstop
+45,
620 yycrank
+21, yysvec
+13, yyvstop
+48,
621 yycrank
+10, yysvec
+13, yyvstop
+51,
622 yycrank
+4, yysvec
+13, yyvstop
+54,
623 yycrank
+4, yysvec
+13, yyvstop
+57,
624 yycrank
+21, yysvec
+13, yyvstop
+60,
625 yycrank
+9, yysvec
+13, yyvstop
+63,
626 yycrank
+9, 0, yyvstop
+66,
627 yycrank
+40, 0, yyvstop
+68,
628 yycrank
+0, yysvec
+4, yyvstop
+70,
629 yycrank
+0, yysvec
+6, 0,
630 yycrank
+0, 0, yyvstop
+72,
631 yycrank
+0, yysvec
+7, 0,
632 yycrank
+0, 0, yyvstop
+74,
633 yycrank
+-280, 0, yyvstop
+76,
634 yycrank
+0, 0, yyvstop
+78,
635 yycrank
+249, 0, yyvstop
+80,
636 yycrank
+285, 0, yyvstop
+82,
637 yycrank
+0, yysvec
+10, yyvstop
+84,
639 yycrank
+0, 0, yyvstop
+86,
640 yycrank
+0, 0, yyvstop
+88,
641 yycrank
+0, yysvec
+13, yyvstop
+90,
642 yycrank
+10, yysvec
+13, yyvstop
+92,
643 yycrank
+0, yysvec
+13, yyvstop
+94,
644 yycrank
+19, yysvec
+13, yyvstop
+97,
645 yycrank
+35, yysvec
+13, yyvstop
+99,
646 yycrank
+27, yysvec
+13, yyvstop
+101,
647 yycrank
+0, yysvec
+13, yyvstop
+103,
648 yycrank
+42, yysvec
+13, yyvstop
+106,
649 yycrank
+35, yysvec
+13, yyvstop
+108,
650 yycrank
+30, yysvec
+13, yyvstop
+110,
651 yycrank
+0, yysvec
+13, yyvstop
+112,
652 yycrank
+36, yysvec
+13, yyvstop
+115,
653 yycrank
+48, yysvec
+13, yyvstop
+117,
654 yycrank
+35, yysvec
+13, yyvstop
+119,
655 yycrank
+61, yysvec
+13, yyvstop
+121,
656 yycrank
+0, 0, yyvstop
+123,
660 yycrank
+183, yysvec
+36, yyvstop
+125,
662 yycrank
+0, yysvec
+61, yyvstop
+128,
663 yycrank
+0, yysvec
+13, yyvstop
+130,
664 yycrank
+78, yysvec
+13, yyvstop
+133,
665 yycrank
+0, yysvec
+13, yyvstop
+135,
666 yycrank
+81, yysvec
+13, yyvstop
+138,
667 yycrank
+84, yysvec
+13, yyvstop
+140,
668 yycrank
+0, yysvec
+13, yyvstop
+142,
669 yycrank
+0, yysvec
+13, yyvstop
+145,
670 yycrank
+81, yysvec
+13, yyvstop
+148,
671 yycrank
+66, yysvec
+13, yyvstop
+150,
672 yycrank
+74, yysvec
+13, yyvstop
+152,
673 yycrank
+80, yysvec
+13, yyvstop
+154,
674 yycrank
+78, yysvec
+13, yyvstop
+156,
678 yycrank
+0, yysvec
+77, yyvstop
+158,
680 yycrank
+99, yysvec
+13, yyvstop
+160,
681 yycrank
+89, yysvec
+13, yyvstop
+163,
682 yycrank
+108, yysvec
+13, yyvstop
+165,
683 yycrank
+120, yysvec
+13, yyvstop
+167,
684 yycrank
+104, yysvec
+13, yyvstop
+169,
685 yycrank
+0, yysvec
+13, yyvstop
+171,
686 yycrank
+113, yysvec
+13, yyvstop
+174,
687 yycrank
+148, yysvec
+13, yyvstop
+176,
691 yycrank
+0, yysvec
+90, yyvstop
+178,
692 yycrank
+183, yysvec
+13, yyvstop
+181,
693 yycrank
+182, yysvec
+13, yyvstop
+183,
694 yycrank
+0, yysvec
+13, yyvstop
+185,
695 yycrank
+172, yysvec
+13, yyvstop
+189,
696 yycrank
+181, yysvec
+13, yyvstop
+191,
697 yycrank
+0, yysvec
+13, yyvstop
+193,
698 yycrank
+0, yysvec
+13, yyvstop
+196,
701 yycrank
+0, yysvec
+13, yyvstop
+199,
702 yycrank
+183, yysvec
+13, yyvstop
+202,
703 yycrank
+0, yysvec
+13, yyvstop
+204,
704 yycrank
+0, yysvec
+13, yyvstop
+207,
705 yycrank
+0, 0, yyvstop
+210,
707 yycrank
+186, yysvec
+13, yyvstop
+212,
709 yycrank
+0, yysvec
+13, yyvstop
+214,
710 yycrank
+0, 0, yyvstop
+217,
712 struct yywork
*yytop
= yycrank
+423;
713 struct yysvf
*yybgin
= yysvec
+1;
715 00 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
716 01 ,011 ,012 ,01 ,01 ,01 ,01 ,01 ,
717 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
718 01 ,01 ,01 ,01 ,01 ,01 ,01 ,01 ,
719 011 ,01 ,'"' ,01 ,01 ,01 ,01 ,047 ,
720 01 ,01 ,01 ,'+' ,01 ,'+' ,01 ,01 ,
721 '0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,'0' ,
722 '0' ,'0' ,01 ,01 ,01 ,01 ,01 ,01 ,
723 01 ,'A' ,'A' ,'A' ,'D' ,'D' ,'A' ,'D' ,
724 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
725 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
726 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,'A' ,
727 01 ,'A' ,'A' ,'A' ,'D' ,'D' ,'A' ,'D' ,
728 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
729 'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,'A' ,
730 'A' ,'A' ,'A' ,01 ,01 ,01 ,01 ,01 ,
740 static char ncform_sccsid
[] = "@(#)ncform 1.6 88/02/08 SMI"; /* from S5R2 1.2 */
745 # define NLSTATE yyprevious=YYNEWLINE
747 struct yysvf
*yylstate
[YYLMAX
], **yylsp
, **yyolsp
;
749 char *yysptr
= yysbuf
;
751 extern struct yysvf
*yyestate
;
752 int yyprevious
= YYNEWLINE
;
754 register struct yysvf
*yystate
, **lsp
;
755 register struct yywork
*yyt
;
763 /* start off machines */
772 yylastch
= yytext
+yyleng
;
776 yyestate
= yystate
= yybgin
;
777 if (yyprevious
==YYNEWLINE
) yystate
++;
780 if(debug
)fprintf(yyout
,"state %d\n",yystate
-yysvec
-1);
782 yyt
= yystate
->yystoff
;
783 if(yyt
== yycrank
&& !yyfirst
){ /* may not be any transitions */
784 yyz
= yystate
->yyother
;
786 if(yyz
->yystoff
== yycrank
)break;
788 *yylastch
++ = yych
= input();
793 fprintf(yyout
,"char ");
799 if ( (int)yyt
> (int)yycrank
){
801 if (yyt
<= yytop
&& yyt
->verify
+yysvec
== yystate
){
802 if(yyt
->advance
+yysvec
== YYLERR
) /* error transitions */
803 {unput(*--yylastch
);break;}
804 *lsp
++ = yystate
= yyt
->advance
+yysvec
;
809 else if((int)yyt
< (int)yycrank
) { /* r < yycrank */
810 yyt
= yyr
= yycrank
+(yycrank
-yyt
);
812 if(debug
)fprintf(yyout
,"compressed state\n");
815 if(yyt
<= yytop
&& yyt
->verify
+yysvec
== yystate
){
816 if(yyt
->advance
+yysvec
== YYLERR
) /* error transitions */
817 {unput(*--yylastch
);break;}
818 *lsp
++ = yystate
= yyt
->advance
+yysvec
;
821 yyt
= yyr
+ YYU(yymatch
[yych
]);
824 fprintf(yyout
,"try fall back character ");
825 allprint(YYU(yymatch
[yych
]));
829 if(yyt
<= yytop
&& yyt
->verify
+yysvec
== yystate
){
830 if(yyt
->advance
+yysvec
== YYLERR
) /* error transition */
831 {unput(*--yylastch
);break;}
832 *lsp
++ = yystate
= yyt
->advance
+yysvec
;
836 if ((yystate
= yystate
->yyother
) && (yyt
= yystate
->yystoff
) != yycrank
){
838 if(debug
)fprintf(yyout
,"fall back to state %d\n",yystate
-yysvec
-1);
844 {unput(*--yylastch
);break;}
848 fprintf(yyout
,"state %d char ",yystate
-yysvec
-1);
857 fprintf(yyout
,"stopped at %d with ",*(lsp
-1)-yysvec
-1);
862 while (lsp
-- > yylstate
){
864 if (*lsp
!= 0 && (yyfnd
= (*lsp
)->yystops
) && *yyfnd
> 0){
866 if(yyextra
[*yyfnd
]){ /* must backup */
867 while(yyback((*lsp
)->yystops
,-*yyfnd
) != 1 && lsp
> yylstate
){
872 yyprevious
= YYU(*yylastch
);
874 yyleng
= yylastch
-yytext
+1;
878 fprintf(yyout
,"\nmatch ");
880 fprintf(yyout
," action %d\n",*yyfnd
);
887 if (yytext
[0] == 0 /* && feof(yyin) */)
892 yyprevious
= yytext
[0] = input();
897 if(debug
)putchar('\n');
912 /* the following are only used in the lex library */