A jumptoeof must fall through rule invocations as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6529 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
1f6a1c0197
commit
7b0cd0ecb0
@ -515,7 +515,15 @@ compile_rule(
|
||||
/* Run rules, appending results from each */
|
||||
|
||||
for( l = ll; l; l = list_next( l ) )
|
||||
result = evaluate_rule( l->string, nargs, result );
|
||||
{
|
||||
int localJmp = JMP_NONE;
|
||||
result = evaluate_rule( l->string, nargs, result, &localJmp );
|
||||
if (localJmp == JMP_EOF)
|
||||
{
|
||||
*jmp = JMP_EOF;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
list_free( ll );
|
||||
lol_free( nargs );
|
||||
@ -531,7 +539,8 @@ LIST *
|
||||
evaluate_rule(
|
||||
const char *rulename,
|
||||
LOL *args,
|
||||
LIST *result )
|
||||
LIST *result,
|
||||
int *jmp )
|
||||
{
|
||||
RULE *rule = bindrule( rulename );
|
||||
|
||||
@ -576,7 +585,6 @@ evaluate_rule(
|
||||
{
|
||||
PARSE *parse = rule->procedure;
|
||||
SETTINGS *s = 0;
|
||||
int jmp = JMP_NONE;
|
||||
LIST *l;
|
||||
int i;
|
||||
|
||||
@ -593,7 +601,7 @@ evaluate_rule(
|
||||
parse_refer( parse );
|
||||
|
||||
pushsettings( s );
|
||||
result = list_append( result, (*parse->func)( parse, args, &jmp ) );
|
||||
result = list_append( result, (*parse->func)( parse, args, jmp ) );
|
||||
popsettings( s );
|
||||
freesettings( s );
|
||||
|
||||
|
@ -36,7 +36,7 @@ LIST *compile_settings( PARSE *parse, LOL *args, int *jmp );
|
||||
LIST *compile_switch( PARSE *parse, LOL *args, int *jmp );
|
||||
LIST *compile_while( PARSE *parse, LOL *args, int *jmp );
|
||||
|
||||
LIST *evaluate_rule( const char *rulename, LOL *args, LIST *result );
|
||||
LIST *evaluate_rule( const char *rulename, LOL *args, LIST *result, int *jmp );
|
||||
|
||||
/* Conditions for compile_if() */
|
||||
|
||||
|
@ -81,7 +81,10 @@ headers( TARGET *t )
|
||||
#endif
|
||||
|
||||
if( lol_get( &lol, 1 ) )
|
||||
list_free( evaluate_rule( hdrrule->string, &lol, L0 ) );
|
||||
{
|
||||
int jmp = JMP_NONE;
|
||||
list_free( evaluate_rule( hdrrule->string, &lol, L0, &jmp ) );
|
||||
}
|
||||
|
||||
/* Clean up */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user