/* ===================================================================== Source: display.rule ===================================================================== */ opt_at : { struct dt_display *d; d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_LINE; add_feature("UI_DISPLAY_LINE_MODE"); $$=d; map_ui("DISPLAY_LINE_MODE"); } | KW_AT fgl_expr_c KW_COMMA fgl_expr_c { struct dt_display *d; map_display_at($4,$2); d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_AT; d->dt_display_u.x_y.x=chk_expr($4); d->dt_display_u.x_y.y=chk_expr($2); $$=d; add_feature("UI_DISPLAY_AT"); } | TO_MENUITEM identifier { A4GL_assertion(1,"Not implemented yet"); strcpy($$,"#error not implemented yet"); } | TO_MAIN_CAPTION { struct dt_display *d; d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_MAIN_CAPTION; $$=d; } | KW_TO field_name_list_as_struct { struct dt_display *d; d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_FIELD_LIST; d->dt_display_u.field_list=$2; add_feature("UI_DISPLAY_TO"); $$=d; map_ui("DISPLAYTO"); } | KW_TO KWFORM identifier KWFIELD field_name_list_as_struct { struct dt_display *d; d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_FORM_FIELD; d->dt_display_u.fldform_field.form=strdup($3); d->dt_display_u.fldform_field.field_list=$5; add_feature("UI_DISPLAY_FORM_FIELD"); $$=d; } | KW_TO KWFORM identifier CAPTION { struct dt_display *d; d=malloc(sizeof(struct dt_display)); d->dttype=DT_DISPLAY_TYPE_FORM_CAPTION; d->dt_display_u.caption=strdup($3); $$=d; } | TO_STATUSBOX identifier { strcpy($$,"#error not implemented yet"); } ; display_b_n_cmd : DISPLAY_BY_NAME atline expanded_ibind_var_list display_attr { add_feature("DISPLAY_BY_NAME"); set_cmdlineno($2); $$=cmd_display_by_name($3, $4); inc_var_usage_from_binding_list($3); map_ui("DISPLAYBYNAME"); } ; display_cmd : KW_DISPLAY atline expanded_fgl_expr_list_ptr opt_at display_attr { add_feature("DISPLAY"); set_cmdlineno($2); $$=new_display_cmd(make_fgl_expr_list($3),$4,$5,EB_FALSE); } ; display_form_cmd : DISPLAY_FORM atline form_name_p display_attr { add_feature("UI_DISPLAY_FORM"); set_cmdlineno($2); $$=new_display_form_cmd($3,$4); map_ui("DISPLAYFORM"); } ; display_array_cmd : DISPLAY_ARRAY atline { add_feature("UI_DISPLAY_ARRAY"); map_ui_block("DISPLAYARRAY"); push_blockcommand("DISPLAY"); $$=get_sio_id("DISPLAY"); } variable_usage_expression opt_slice KW_TO idm_input_array opt_scroll display_attr { if (!check_input_or_display_array_variable($4)) { a4gl_yyerror("Variable cannot be used for an DISPLAY ARRAY"); } inc_var_usage($4); /* $$=copy_togenbind('o'); */ A4GL_new_events(); } disp_rest { //add_continue_blockcommand ("DISPLAY"); A4GL_drop_events(); map_ui_endblock("DISPLAYARRAY"); set_cmdlineno($2); $$=new_display_array_cmd($7,$4, $9, $11, $8,$3, $5); pop_blockcommand("DISPLAY"); } ; opt_scroll: { $$=0; } | SCROLL_USING field_name_as_struct { $$=$2; } ; display_attr : opt_attributes ; disp_rest : {$$=0;} | events_darray END_DISPLAY {$$=$1;} | END_DISPLAY {$$=0;} ; /* ============================ display.rule ====================== */