📄 chanimy.cpp
字号:
break;
}
}
printf( "%s\n", yytoks[yy_i].t_name );
}
}
#endif /* YYDEBUG */
/*
** look through exception table
*/
{
register int *yyxi = yyexca;
while ( ( *yyxi != -1 ) ||
( yyxi[1] != yy_state ) )
{
yyxi += 2;
}
while ( ( *(yyxi += 2) >= 0 ) &&
( *yyxi != yychar ) )
;
if ( ( yy_n = yyxi[1] ) < 0 )
YYACCEPT;
}
}
/*
** check for syntax error
*/
if ( yy_n == 0 ) /* have an error */
{
/* no worry about speed here! */
switch ( yyerrflag )
{
case 0: /* new error */
yyerror( "syntax error" );
goto skip_init;
yyerrlab:
/*
** get globals into registers.
** we have a user generated syntax type error
*/
yy_pv = yypv;
yy_ps = yyps;
yy_state = yystate;
skip_init:
yynerrs++;
/* FALLTHRU */
case 1:
case 2: /* incompletely recovered error */
/* try again... */
yyerrflag = 3;
/*
** find state where "error" is a legal
** shift action
*/
while ( yy_ps >= yys )
{
yy_n = yypact[ *yy_ps ] + YYERRCODE;
if ( yy_n >= 0 && yy_n < YYLAST &&
yychk[yyact[yy_n]] == YYERRCODE) {
/*
** simulate shift of "error"
*/
yy_state = yyact[ yy_n ];
goto yy_stack;
}
/*
** current state has no shift on
** "error", pop stack
*/
#if YYDEBUG
# define _POP_ "Error recovery pops state %d, uncovers state %d\n"
if ( yydebug )
printf( _POP_, *yy_ps,
yy_ps[-1] );
# undef _POP_
#endif
yy_ps--;
yy_pv--;
}
/*
** there is no state on stack with "error" as
** a valid shift. give up.
*/
YYABORT;
case 3: /* no shift yet; eat a token */
#if YYDEBUG
/*
** if debugging, look up token in list of
** pairs. 0 and negative shouldn't occur,
** but since timing doesn't matter when
** debugging, it doesn't hurt to leave the
** tests here.
*/
if ( yydebug )
{
register int yy_i;
printf( "Error recovery discards " );
if ( yychar == 0 )
printf( "token end-of-file\n" );
else if ( yychar < 0 )
printf( "token -none-\n" );
else
{
for ( yy_i = 0;
yytoks[yy_i].t_val >= 0;
yy_i++ )
{
if ( yytoks[yy_i].t_val
== yychar )
{
break;
}
}
printf( "token %s\n",
yytoks[yy_i].t_name );
}
}
#endif /* YYDEBUG */
if ( yychar == 0 ) /* reached EOF. quit */
YYABORT;
yychar = -1;
goto yy_newstate;
}
}/* end if ( yy_n == 0 ) */
/*
** reduction by production yy_n
** put stack tops, etc. so things right after switch
*/
#if YYDEBUG
/*
** if debugging, print the string that is the user's
** specification of the reduction which is just about
** to be done.
*/
if ( yydebug )
printf( "Reduce by (%d) \"%s\"\n",
yy_n, yyreds[ yy_n ] );
#endif
yytmp = yy_n; /* value to switch over */
yypvt = yy_pv; /* $vars top of value stack */
/*
** Look in goto table for next state
** Sorry about using yy_state here as temporary
** register variable, but why not, if it works...
** If yyr2[ yy_n ] doesn't have the low order bit
** set, then there is no action to be done for
** this reduction. So, no saving & unsaving of
** registers done. The only difference between the
** code just after the if and the body of the if is
** the goto yy_stack in the body. This way the test
** can be made before the choice of what to do is needed.
*/
{
/* length of production doubled with extra bit */
register int yy_len = yyr2[ yy_n ];
if ( !( yy_len & 01 ) )
{
yy_len >>= 1;
yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
*( yy_ps -= yy_len ) + 1;
if ( yy_state >= YYLAST ||
yychk[ yy_state =
yyact[ yy_state ] ] != -yy_n )
{
yy_state = yyact[ yypgo[ yy_n ] ];
}
goto yy_stack;
}
yy_len >>= 1;
yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
*( yy_ps -= yy_len ) + 1;
if ( yy_state >= YYLAST ||
yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
{
yy_state = yyact[ yypgo[ yy_n ] ];
}
}
/* save until reenter driver code */
yystate = yy_state;
yyps = yy_ps;
yypv = yy_pv;
}
/*
** code supplied by user is placed in this switch
*/
switch( yytmp )
{
case 1:
# line 95 "ChAnimy.y"
{m_lResult = yypvt[-0];} break;
case 2:
# line 97 "ChAnimy.y"
{m_lResult = yypvt[-0];} break;
case 3:
# line 99 "ChAnimy.y"
{m_lResult = yypvt[-0];} break;
case 4:
# line 101 "ChAnimy.y"
{m_lResult = yypvt[-0];} break;
case 5:
# line 104 "ChAnimy.y"
{ yyval = yypvt[-1];} break;
case 7:
# line 108 "ChAnimy.y"
{ yyval = yypvt[-0]; } break;
case 11:
# line 113 "ChAnimy.y"
{ yyval = 0; } break;
case 14:
# line 118 "ChAnimy.y"
{ yyval = AddAnchor( (ChBindList *)(yypvt[-1]) ); } break;
case 15:
# line 121 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 16:
# line 123 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 25:
# line 136 "ChAnimy.y"
{ yyval = bind(NODEID, yypvt[-0]); } break;
case 26:
# line 139 "ChAnimy.y"
{ yyval = bind(HOTRECT, new CRect(yypvt[-3], yypvt[-2], yypvt[-1], yypvt[-0])); } break;
case 27:
# line 142 "ChAnimy.y"
{ yyval = bind(HINT, (void *)(yypvt[-0])); } break;
case 28:
# line 145 "ChAnimy.y"
{ yyval = bind(CMDARG, (void *)(yypvt[-0])); } break;
case 29:
# line 148 "ChAnimy.y"
{ yyval = bind(CURSOR, (void *)(yypvt[-0])); } break;
case 30:
# line 151 "ChAnimy.y"
{ yyval = bind(HOTCAST, yypvt[-0]); } break;
case 31:
# line 154 "ChAnimy.y"
{ yyval = bind(CAST, yypvt[-0]); } break;
case 32:
# line 157 "ChAnimy.y"
{ yyval = bind(STARTFRAME, yypvt[-0]); } break;
case 33:
# line 161 "ChAnimy.y"
{
yyval = 0;
Background( (ChBindList *)(yypvt[-1]) );
} break;
case 34:
# line 167 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 35:
# line 169 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 37:
# line 176 "ChAnimy.y"
{
yyval = 0;
AddCast( (ChBindList *)(yypvt[-1]) );
} break;
case 38:
# line 182 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 39:
# line 184 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 47:
# line 196 "ChAnimy.y"
{ yyval = bind(NODEID, yypvt[-0]); } break;
case 48:
# line 199 "ChAnimy.y"
{ yyval = bind(NAME, (void *)(yypvt[-0])); } break;
case 49:
# line 202 "ChAnimy.y"
{ yyval = bind(ISVISIBLE, (yypvt[-0])); } break;
case 50:
# line 205 "ChAnimy.y"
{ yyval = bind(ISANIMATING, (yypvt[-0])); } break;
case 51:
# line 208 "ChAnimy.y"
{ yyval = bind(ISDRAGGABLE, (yypvt[-0])); } break;
case 52:
# line 211 "ChAnimy.y"
{ yyval = 1; } break;
case 53:
# line 213 "ChAnimy.y"
{ yyval = 0; } break;
case 54:
# line 216 "ChAnimy.y"
{
ChAnimParser * parser = ChAnimParser::GetParser();
yyval = parser->bind(SPRITE, (void *)(parser->Sprite( (ChBindList *)(yypvt[-1]) )));
} break;
case 55:
# line 222 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 56:
# line 224 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 62:
# line 233 "ChAnimy.y"
{ yyval = bind(FILE, (void *)(yypvt[-0])); } break;
case 63:
# line 236 "ChAnimy.y"
{ yyval = bind(ROWS, yypvt[-0]); } break;
case 64:
# line 239 "ChAnimy.y"
{ yyval = bind(COLUMNS, yypvt[-0]); } break;
case 65:
# line 243 "ChAnimy.y"
{
yyval = bind(SCRIPT, (void *)(Script((ChBindList *)(yypvt[-1]))));
} break;
case 66:
# line 247 "ChAnimy.y"
{
yyval = bind(SCRIPTREF, (void *)(yypvt[-0]));
} break;
case 67:
# line 252 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 68:
# line 254 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 74:
# line 263 "ChAnimy.y"
{ yyval = bind(FRAMERATE, yypvt[-0]); } break;
case 75:
# line 266 "ChAnimy.y"
{ yyval = bind(STARTFRAME, yypvt[-0]); } break;
case 76:
# line 269 "ChAnimy.y"
{
ChAnimParser * parser = ChAnimParser::GetParser();
yyval = parser->bind(FRAMES, parser->Frames( (ChBindList *)(yypvt[-1]) ));
} break;
case 77:
# line 275 "ChAnimy.y"
{ yyval = AppendBindingList( (ChBindList *)(yypvt[-1]), (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 78:
# line 277 "ChAnimy.y"
{ yyval = NewBindingList( (ChAnimBindVal*)(yypvt[-0]) ); } break;
case 82:
# line 285 "ChAnimy.y"
{ yyval = bind(FRAMEVAL, new ChCell(yypvt[-5], yypvt[-4], yypvt[-3], yypvt[-2], yypvt[-1], yypvt[-0])); } break;
case 83:
# line 288 "ChAnimy.y"
{ yyval = bind(STOP, 0); } break;
case 84:
# line 291 "ChAnimy.y"
{ yyval = bind(GOTO, yypvt[-0]); } break;
}
goto yystack; /* reset registers in driver code */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -