⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 llamapar.unx

📁 compiler
💻 UNX
📖 第 1 页 / 共 2 页
字号:
#define __TIME__ "14:59:39"
#define __DATE__ "Mar 11 1992"
#define __STDC__ 0
                                                                              

                                                                
                                     
   

#include <stdio.h>
#include <string.h> 	                                            	     
#include <stdlib.h>	                                                     
			                                        	     
#ifndef va_start
#include <stdarg.h>
#endif

#include <tools/debug.h>                                                     
#include <tools/l.h>	                                                     
			                                                     
			                                                     
			                                          	     
			                                                     
			                        			     
			                                            	     
			                              			     

extern int	yylineno;			                      
extern int	yyleng;
extern char	*yytext;
extern int 	yylex    P((void));

void	yycode	    P(( char *fmt, ...	));	                        
void	yydata	    P(( char *fmt, ...	));	                        
void	yybss 	    P(( char *fmt, ...	));
void 	yyerror     P(( char *fmt, ...  ));
void 	yycomment   P(( char *fmt, ...  ));
int	yy_nextoken P(( void		));

@@  Stuff from code blocks in the header part of the LLama input file goes here.
@@  LLama removes all lines that begin with @@ when it copies llout.par
@@  to the output file.






typedef unsigned char   YY_TTYPE;	                         	  

#define YYF	(YY_TTYPE)( -1 )	                                  

                                                                          
#define YY_ISTERM(x)    (YY_MINTERM    <= (x) && (x) <= YY_MAXTERM   )
#define YY_ISNONTERM(x) (YY_MINNONTERM <= (x) && (x) <= YY_MAXNONTERM)
#define YY_ISACT(x)     (YY_MINACT     <= (x)                        )

#ifndef YYACCEPT
#    define YYACCEPT return(0)	                                       	       
#endif

#ifndef YYABORT
#    define YYABORT return(1)	                                       	       
#endif

#ifndef YYPRIVATE
#    define YYPRIVATE static	                                               
#endif

#ifndef YYMAXERR
#    define YYMAXERR 25  	                                            
#endif

#ifndef YYMAXDEPTH           	                                	    
#    define YYMAXDEPTH 128
#endif

#ifndef YYSTYPE           	                                            
#    define YYSTYPE int
#endif

int 	 yy_act  ( int actnum );		                       
YY_TTYPE yy_next ( int cur_state, unsigned c );

                                                                        
                          
   

                                                                              
                                                                              

                                                                              
                                                                              

                                                                              
#ifndef __YYSTACK_H

            	                                                    
   






































#endif                  


                                                                   
                                                                          
   

static int yyabort P((void)) { exit(1); BCC( return 0; ) }


#define  yystk_cls YYPRIVATE

#define  yystk_err(o)  ((o) ? (yyerror("Stack overflow\n" ),yyabort())	: (yyerror("Stack underflow\n"),yyabort()) )




typedef int yyt_Yy_stack; yystk_cls yyt_Yy_stack Yy_stack[YYMAXDEPTH]; yystk_cls yyt_Yy_stack (*yyp_Yy_stack) = Yy_stack + (YYMAXDEPTH);

typedef struct			                                       
{
    YYSTYPE  left;		                                                
    YYSTYPE  right;		                                                

} yyvstype;


yyvstype Yy_vstack[ YYMAXDEPTH ]; 		               		  
yyvstype *Yy_vsp = Yy_vstack + YYMAXDEPTH;	                      	  

@@
@@ Tables go here. LLama removes all lines that begin with @@ when it copies
@@ 						   llout.par to the output file.





                                                                          

FILE  *yycodeout = stdout ;	                           		   
FILE  *yybssout  = stdout ;	                                       	   
FILE  *yydataout = stdout ;	                                           
int   yynerrs    = 0;		               	 			   

                                                                          
#ifdef YYDEBUG                  	                            

typedef char yyt_Yy_dstack; yystk_cls yyt_Yy_dstack Yy_dstack[YYMAXDEPTH]; yystk_cls yyt_Yy_dstack (*yyp_Yy_dstack) = Yy_dstack + (YYMAXDEPTH);

ANSI( YYPRIVATE char *yy_sym( int sym )	)
KnR ( YYPRIVATE char *yy_sym(     sym )	)
KnR ( int sym;				)
{
                                                                      
                                                       
       

    return ( YY_ISTERM( sym ) || !sym ) ?   Yy_stok     [sym]:
           ( YY_ISNONTERM( sym )      ) ?   Yy_snonterm [sym - YY_MINNONTERM]:
                                            Yy_sact     [sym - YY_MINACT] ;
}

                                                                         
                                                                               
                                                                       
                                                                              
                                                                             
                                                                             
                                                                               
                    
   

ANSI( YYPRIVATE  void yy_push(int x, YYSTYPE val) 	)
KnR ( YYPRIVATE  void yy_push(    x,         val) 	)
KnR ( int	   x;   )		                                        
KnR ( YYSTYPE	   val;	)		                                        
{
    ( ( (yyp_Yy_stack) <= Yy_stack )? ((yyt_Yy_stack)(long)(yystk_err(1))) : ( *--yyp_Yy_stack = (x) ));
    ( *--yyp_Yy_dstack = (yy_sym(x)) );

    --Yy_vsp;					                                
    Yy_vsp->left = Yy_vsp->right = val;		                                

    yycomment( "push %s\n", yy_sym( x )  );
    yy_pstack( 0, 1 );
}

YYPRIVATE int yy_pop P((void))
{
    int prev_tos = ( ( (yyp_Yy_stack) >= (Yy_stack + sizeof(Yy_stack)/sizeof(*Yy_stack)) )? ((yyt_Yy_stack )(long)(yystk_err(0))) : ( *yyp_Yy_stack++ ));
    ++Yy_vsp;

    yycomment( "pop %s\n", ( *yyp_Yy_dstack++ ));
    yy_pstack ( 0, 1 );

    return prev_tos;
}

ANSI( YYPRIVATE void yy_say_whats_happening(int tos_item, int production) )
KnR ( YYPRIVATE void yy_say_whats_happening(    tos_item,     production) )
KnR ( int tos_item;   	)                         		    
KnR ( int production; 	)                                             
{
                                                                             
                                                                          
                                                                              
                                                                             
                                                                            
                                                                              
                                                                         
                                                                       
       			                       
                                                                        
                                                                          
                                                                         
                                                                 
       

    char  buf[80];	                                                        
    int	  count;                                                    	        
    int   *start, *end;                                                         
    int   nterms;	                                                        

    start = Yy_pushtab[ production ];
    for( end = start; *end; ++end )                                        
	;				                                   

    count = sizeof(buf);
    *buf  = '\0';
    for(nterms = end - start; --nterms >= 0 && count > 0 ; ) 	              
    {								              
	strncat( buf, yy_sym(*--end), count );
	if( (count -= strlen( yy_sym(*end) + 1 )) < 1 )
	    break;
	strncat( buf, " ", --count );
    }
    yycomment( "Applying %s->%s\n", yy_sym(tos_item), buf );
}

                                                                           
                                                                         
                                                                              
                                                                     
                                                                             
                                                                           
                                                                           
                                           
   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -