static void dump( grib_action* act, FILE* f, int lvl)
{
  grib_action_template* a = ( grib_action_template*)act;
  int i = 0;
  for (i=0;i<lvl;i++) grib_context_print(act->context,f,"     ");
  grib_context_print(act->context,f,"Template %s  %s\n",act->name , a->arg );
}
Beispiel #2
0
static void dump(grib_action* act, FILE* f, int lvl)
{
    grib_action_if* a = (grib_action_if*)act;
    int i = 0;

    for (i=0;i<lvl;i++)
        grib_context_print(act->context,f,"     ");

    printf("if(%s) { ",act->name);  grib_expression_print(act->context,a->expression,0);
    printf("\n");

    if(a->block_true){
        /*      grib_context_print(act->context,f,"IF \t TODO \n");  TODO */
        grib_dump_action_branch(f,a->block_true,lvl+1);
    }
    if(a->block_false){
        printf("}\n");
        for (i=0;i<lvl;i++)
            grib_context_print(act->context,f,"     ");
        printf("else(%s) { ",act->name);  grib_expression_print(act->context,a->expression,0);
        /*     grib_context_print(act->context,f,"ELSE \n" );*/
        grib_dump_action_branch(f,a->block_false,lvl+1);
    }
    for (i=0;i<lvl;i++)
        grib_context_print(act->context,f,"     ");
    printf("}\n");
}
static void dump( grib_action* act, FILE* f, int lvl)
{
	/* grib_action_trigger* a = ( grib_action_trigger*)act; */
	int i = 0;
	for (i=0;i<lvl;i++) grib_context_print(act->context,f,"     ");
	grib_context_print(act->context,f,"Trigger\n");  

}
Beispiel #4
0
static void dump( grib_action* act, FILE* f, int lvl)
{
    grib_action_gen* a = ( grib_action_gen*)act;
    int i =0;
    for (i=0;i<lvl;i++)
        grib_context_print(act->context,f,"     ");
    grib_context_print(act->context,f,"%s[%d] %s \n", act->op, a->len , act->name);
}
static void dump( grib_action* act, FILE* f, int lvl)
{

	int i =0;
	for (i=0;i<lvl;i++)
		grib_context_print(act->context,f,"     ");
	grib_context_print(act->context,f," meta %s \n", act->name );
}
static void dump(grib_action* act, FILE* f, int lvl)
{
  int i =0;
  grib_action_set* self=(grib_action_set*)act;
  for (i=0;i<lvl;i++)
    grib_context_print(act->context,f,"     ");
  grib_context_print(act->context,f,self->name);
  printf("\n");
}
Beispiel #7
0
static void dump( grib_action* act, FILE* f, int lvl)
{
	grib_action_put* a = ( grib_action_put*)act;

	int i = 0;

	for (i=0;i<lvl;i++) grib_context_print(act->context,f,"     ");

	grib_context_print(act->context,f,"put %s as %s in %s\n",grib_arguments_get_name(0,a->args,0),act->name,grib_arguments_get_name(0,a->args,1));  

}
static void dump( grib_action* act, FILE* f, int lvl)
{
    grib_action_alias* a = (grib_action_alias*)act;
    int i =0;
    for (i=0;i<lvl;i++)
        grib_context_print(act->context,f,"     ");
    if(a->target)
        grib_context_print(act->context,f," alias %s  %s \n", act->name, a->target );
    else
        grib_context_print(act->context,f," unalias %s  \n", act->name);
}