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

📄 mwmlex.c

📁 安装DDD之前
💻 C
📖 第 1 页 / 共 4 页
字号:
      298,  297,  296,  295,  294,  293,  291,  290,  289,  288,      287,  286,  285,  284,  283,  282,  280,  279,  278,  277,      275,  274,  272,  271,  270,  268,  267,  266,  265,  264,      263,  262,  261,  260,  259,  256,  255,  254,  253,  252,      251,  250,  249,  248,  247,  246,  244,  243,  242,  241,      240,  239,  238,  237,  236,  235,  233,  231,  230,  228,      227,  224,  222,  220,  219,  217,  216,  214,  213,  211,      210,  208,  207,  205,  204,  203,  200,  198,  197,  195,      194,  193,  192,  191,  190,  189,  187,  186,  185,  184,      183,  182,  181,  180,  178,  177,  176,  175,  174,  173,      172,  171,  170,  169,  168,  167,  166,  165,  164,  163,      162,  161,  160,  159,  158,  157,  156,  155,  154,  153,      152,  151,  150,  149,  148,  147,  146,  145,  144,  135,      133,  132,  128,  127,  126,  125,  124,  122,  120,  119,      118,  117,  114,  113,  112,  111,  110,  109,  108,  107,      106,  105,  104,  103,  102,  100,   94,   92,   91,   90,       89,   88,   87,   86,   85,   83,   82,   81,   80,   79,       78,   77,   76,   75,   74,   70,   66,   65,   64,   63,       62,   61,   60,   59,   58,   57,   55,   54,   50,   49,       48,   47,   46,   45,   44,   43,   41,   40,   39,   38,       35,   34,   33,   32,   31,   30,   26,   23,   21,   20,       19,   18,   16,   15,   14,   12,   10,    7,    3,    2,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454,  454,  454,  454,  454,  454,  454,  454,  454,      454,  454    } ;static yy_state_type yy_last_accepting_state;static char *yy_last_accepting_cpos;/* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */#define REJECT reject_used_but_not_detected#define yymore() yymore_used_but_not_detected#define YY_MORE_ADJ 0#define YY_RESTORE_YY_MORE_OFFSETchar *yytext;#line 1 "mwmlex.l"#define INITIAL 0#line 2 "mwmlex.l"/** * * $Id: mwmlex.l,v 1.1 2004/08/28 19:27:39 dannybackx Exp $ * * Copyright (C) 1995 Free Software Foundation, Inc. * Copyright (C) 1995-2001 LessTif Development Team * * This file is part of the GNU LessTif Library. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. * * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * **/#include <LTconfig.h>#include <string.h>#include <X11/Intrinsic.h>#include "mwmparse.h"#include "mwm.h"/* for flex */#ifdef FLEX_SCANNERstatic voidlex_getc(char *b, int *r, int m){    *b = mwm_getc();    if (*b)	*r = 1;    else	*r = 0;}#define YY_INPUT(b,r,m) lex_getc(b,&r,m)#else#undef input#define input	mwm_getc#undef output#define output(c)#undef unput#define unput(c) mwm_unputc(c)#endif#undef ECHO#define ECHOstatic char *dupquot(char *str);static char *dupstr(char *str);#line 689 "mwmlex.c"/* Macros after this point can all be overridden by user definitions in * section 1. */#ifndef YY_SKIP_YYWRAP#ifdef __cplusplusextern "C" int yywrap YY_PROTO(( void ));#elseextern int yywrap YY_PROTO(( void ));#endif#endif#ifndef YY_NO_UNPUTstatic void yyunput YY_PROTO(( int c, char *buf_ptr ));#endif#ifndef yytext_ptrstatic void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int ));#endif#ifdef YY_NEED_STRLENstatic int yy_flex_strlen YY_PROTO(( yyconst char * ));#endif#ifndef YY_NO_INPUT#ifdef __cplusplusstatic int yyinput YY_PROTO(( void ));#elsestatic int input YY_PROTO(( void ));#endif#endif#if YY_STACK_USEDstatic int yy_start_stack_ptr = 0;static int yy_start_stack_depth = 0;static int *yy_start_stack = 0;#ifndef YY_NO_PUSH_STATEstatic void yy_push_state YY_PROTO(( int new_state ));#endif#ifndef YY_NO_POP_STATEstatic void yy_pop_state YY_PROTO(( void ));#endif#ifndef YY_NO_TOP_STATEstatic int yy_top_state YY_PROTO(( void ));#endif#else#define YY_NO_PUSH_STATE 1#define YY_NO_POP_STATE 1#define YY_NO_TOP_STATE 1#endif#ifdef YY_MALLOC_DECLYY_MALLOC_DECL#else#if __STDC__#ifndef __cplusplus#include <stdlib.h>#endif#else/* Just try to get by without declaring the routines.  This will fail * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) * or sizeof(void*) != sizeof(int). */#endif#endif/* Amount of stuff to slurp up with each read. */#ifndef YY_READ_BUF_SIZE#define YY_READ_BUF_SIZE 8192#endif/* Copy whatever the last rule matched to the standard output. */#ifndef ECHO/* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )#endif/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL, * is returned in "result". */#ifndef YY_INPUT#define YY_INPUT(buf,result,max_size) \	if ( yy_current_buffer->yy_is_interactive ) \		{ \		int c = '*', n; \		for ( n = 0; n < max_size && \			     (c = getc( yyin )) != EOF && c != '\n'; ++n ) \			buf[n] = (char) c; \		if ( c == '\n' ) \			buf[n++] = (char) c; \		if ( c == EOF && ferror( yyin ) ) \			YY_FATAL_ERROR( "input in flex scanner failed" ); \		result = n; \		} \	else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \		  && ferror( yyin ) ) \		YY_FATAL_ERROR( "input in flex scanner failed" );#endif/* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */#ifndef yyterminate#define yyterminate() return YY_NULL#endif/* Number of entries by which start-condition stack grows. */#ifndef YY_START_STACK_INCR#define YY_START_STACK_INCR 25#endif/* Report a fatal error. */#ifndef YY_FATAL_ERROR#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )#endif/* Default declaration of generated scanner - a define so the user can * easily add parameters. */#ifndef YY_DECL#define YY_DECL int yylex YY_PROTO(( void ))#endif/* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. */#ifndef YY_USER_ACTION#define YY_USER_ACTION#endif/* Code executed at the end of each rule. */#ifndef YY_BREAK#define YY_BREAK break;#endif#define YY_RULE_SETUP \	if ( yyleng > 0 ) \		yy_current_buffer->yy_at_bol = \				(yytext[yyleng - 1] == '\n'); \	YY_USER_ACTIONYY_DECL	{	register yy_state_type yy_current_state;	register char *yy_cp, *yy_bp;	register int yy_act;#line 74 "mwmlex.l"#line 845 "mwmlex.c"	if ( yy_init )		{		yy_init = 0;#ifdef YY_USER_INIT		YY_USER_INIT;#endif		if ( ! yy_start )			yy_start = 1;	/* first start state */		if ( ! yyin )			yyin = stdin;		if ( ! yyout )			yyout = stdout;		if ( ! yy_current_buffer )			yy_current_buffer =				yy_create_buffer( yyin, YY_BUF_SIZE );		yy_load_buffer_state();		}	while ( 1 )		/* loops until end-of-file is reached */		{		yy_cp = yy_c_buf_p;		/* Support of yytext. */		*yy_cp = yy_hold_char;		/* yy_bp points to the position in yy_ch_buf of the start of		 * the current run.		 */		yy_bp = yy_cp;		yy_current_state = yy_start;		yy_current_state += YY_AT_BOL();yy_match:		do			{			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];			if ( yy_accept[yy_current_state] )				{				yy_last_accepting_state = yy_current_state;				yy_last_accepting_cpos = yy_cp;				}			while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )				{				yy_current_state = (int) yy_def[yy_current_state];				if ( yy_current_state >= 455 )					yy_c = yy_meta[(unsigned int) yy_c];				}			yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];			++yy_cp;			}		while ( yy_base[yy_current_state] != 481 );yy_find_action:		yy_act = yy_accept[yy_current_state];		if ( yy_act == 0 )			{ /* have to back up */			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			yy_act = yy_accept[yy_current_state];			}		YY_DO_BEFORE_ACTION;do_action:	/* This label is used only to access EOF actions. */		switch ( yy_act )	{ /* beginning of action switch */			case 0: /* must back up */			/* undo the effects of YY_DO_BEFORE_ACTION */			*yy_cp = yy_hold_char;			yy_cp = yy_last_accepting_cpos;			yy_current_state = yy_last_accepting_state;			goto yy_find_action;case 1:YY_RULE_SETUP#line 75 "mwmlex.l"{ /* dump whitespace */ }	YY_BREAKcase 2:YY_RULE_SETUP#line 76 "mwmlex.l"{ /* dump comments */ }	YY_BREAKcase 3:YY_RULE_SETUP#line 77 "mwmlex.l"{ /* dump comments */ }	YY_BREAKcase 4:YY_RULE_SETUP#line 78 "mwmlex.l"{ return WITHIN_TOK; }	YY_BREAKcase 5:YY_RULE_SETUP#line 79 "mwmlex.l"{ return FREE_FAMILY_TOK; }	YY_BREAKcase 6:YY_RULE_SETUP#line 80 "mwmlex.l"{ return NEXT_TOK; }	YY_BREAKcase 7:YY_RULE_SETUP#line 81 "mwmlex.l"{ return PREV_TOK; }	YY_BREAKcase 8:YY_RULE_SETUP#line 82 "mwmlex.l"{ return BACK_TOK; }	YY_BREAKcase 9:YY_RULE_SETUP#line 83 "mwmlex.l"{ return MENU_TOK; }	YY_BREAKcase 10:YY_RULE_SETUP#line 84 "mwmlex.l"{ return BUTTONS_TOK; }	YY_BREAKcase 11:YY_RULE_SETUP#line 85 "mwmlex.l"{ return KEYS_TOK; }	YY_BREAKcase 12:YY_RULE_SETUP#line 86 "mwmlex.l"{ return KEY_TOK; }	YY_BREAKcase 13:YY_RULE_SETUP#line 87 "mwmlex.l"{ return ICON_TOK; }	YY_BREAKcase 14:YY_RULE_SETUP#line 88 "mwmlex.l"{ return WINDOW_TOK; }	YY_BREAKcase 15:YY_RULE_SETUP#line 89 "mwmlex.l"{ return TRANSIENT_TOK; }	YY_BREAKcase 16:YY_RULE_SETUP#line 90 "mwmlex.l"{ return ROOT_TOK; }	YY_BREAKcase 17:YY_RULE_SETUP#line 91 "mwmlex.l"{ return FRAME_TOK; }	YY_BREAKcase 18:YY_RULE_SETUP#line 92 "mwmlex.l"{ return TITLE_TOK; }	YY_BREAKcase 19:YY_RULE_SETUP#line 93 "mwmlex.l"{ return BORDER_TOK; }	YY_BREAKcase 20:YY_RULE_SETUP#line 94 "mwmlex.l"{ return MENUB_TOK; }	YY_BREAKcase 21:YY_RULE_SETUP#line 95 "mwmlex.l"{ return MINIMIZEB_TOK; }	YY_BREAKcase 22:YY_RULE_SETUP#line 96 "mwmlex.l"{ return MAXIMIZEB_TOK; }	YY_BREAKcase 23:YY_RULE_SETUP#line 97 "mwmlex.l"{ return CTRL_TOK; }	YY_BREAKcase 24:YY_RULE_SETUP#line 98 "mwmlex.l"{ return SHIFT_TOK; }	YY_BREAKcase 25:YY_RULE_SETUP#line 99 "mwmlex.l"{ return ALT_TOK; }	YY_BREAKcase 26:YY_RULE_SETUP#line 100 "mwmlex.l"{ return ALT_TOK; }	YY_BREAKcase 27:YY_RULE_SETUP#line 101 "mwmlex.l"{ return LOCK_TOK; }	YY_BREAKcase 28:YY_RULE_SETUP#line 102 "mwmlex.l"{ return MOD1_TOK; }	YY_BREAKcase 29:YY_RULE_SETUP#line 103 "mwmlex.l"{ return MOD2_TOK; }	YY_BREAKcase 30:YY_RULE_SETUP#line 104 "mwmlex.l"{ return MOD3_TOK; }	YY_BREAKcase 31:YY_RULE_SETUP#line 105 "mwmlex.l"{ return MOD4_TOK; }	YY_BREAKcase 32:YY_RULE_SETUP#line 106 "mwmlex.l"{ return MOD5_TOK; }	YY_BREAKcase 33:YY_RULE_SETUP#line 107 "mwmlex.l"{ return BTN1_DOWN_TOK; }	YY_BREAKcase 34:YY_RULE_SETUP#line 108 "mwmlex.l"{ return BTN1_UP_TOK; }	YY_BREAKcase 35:YY_RULE_SETUP#line 109 "mwmlex.l"{ return BTN1_CLICK_TOK; }	YY_BREAKcase 36:YY_RULE_SETUP#line 110 "mwmlex.l"{ return BTN1_CLICK2_TOK; }	YY_BREAKcase 37:YY_RULE_SETUP#line 111 "mwmlex.l"{ return BTN2_DOWN_TOK; }	YY_BREAKcase 38:YY_RULE_SETUP#line 112 "mwmlex.l"{ return BTN2_UP_TOK; }	YY_BREAKcase 39:YY_RULE_SETUP#line 113 "mwmlex.l"{ return BTN2_CLICK_TOK; }	YY_BREAKcase 40:YY_RULE_SETUP#line 114 "mwmlex.l"{ return BTN2_CLICK2_TOK; }	YY_BREAKcase 41:YY_RULE_SETUP#line 115 "mwmlex.l"{ return BTN3_DOWN_TOK; }	YY_BREAKcase 42:YY_RULE_SETUP#line 116 "mwmlex.l"{ return BTN3_UP_TOK; }	YY_BREAKcase 43:YY_RULE_SETUP#line 117 "mwmlex.l"{ return BTN3_CLICK_TOK; }	YY_BREAKcase 44:YY_RULE_SETUP#line 118 "mwmlex.l"{ return BTN3_CLICK2_TOK; }	YY_BREAKcase 45:YY_RULE_SETUP#line 119 "mwmlex.l"{ return BTN4_DOWN_TOK; }	YY_BREAKcase 46:YY_RULE_SETUP#line 120 "mwmlex.l"{ return BTN4_UP_TOK; }	YY_BREAKcase 47:YY_RULE_SETUP#line 121 "mwmlex.l"{ return BTN4_CLICK_TOK; }	YY_BREAK

⌨️ 快捷键说明

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