input:
/* empty */
- | input newcmd accelerator
- | input newcmd bitmap
- | input newcmd cursor
- | input newcmd dialog
- | input newcmd font
- | input newcmd icon
- | input newcmd language
- | input newcmd menu
- | input newcmd menuex
- | input newcmd messagetable
- | input newcmd rcdata
- | input newcmd stringtable
- | input newcmd user
- | input newcmd versioninfo
- | input newcmd IGNORED_TOKEN
- ;
-
-newcmd:
- /* empty */
- {
- rcparse_discard_strings ();
- }
+ | input accelerator
+ | input bitmap
+ | input cursor
+ | input dialog
+ | input font
+ | input icon
+ | input language
+ | input menu
+ | input menuex
+ | input messagetable
+ | input rcdata
+ | input stringtable
+ | input user
+ | input versioninfo
+ | input IGNORED_TOKEN
;
/* Accelerator resources. */
id ACCELERATORS suboptions BEG acc_entries END
{
define_accelerator ($1, &$3, $5);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
$$.id = $2;
$$.flags |= $4;
if (($$.flags & ACC_VIRTKEY) == 0
- && ($$.flags & (ACC_SHIFT | ACC_CONTROL | ACC_ALT)) != 0)
+ && ($$.flags & (ACC_SHIFT | ACC_CONTROL)) != 0)
rcparse_warning (_("inappropriate modifiers for non-VIRTKEY"));
}
;
id BITMAP memflags_move file_name
{
define_bitmap ($1, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id CURSOR memflags_move_discard file_name
{
define_cursor ($1, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
styles BEG controls END
{
define_dialog ($1, &sub_res_info, &dialog);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
| id DIALOGEX memflags_move exstyle posnumexpr cnumexpr cnumexpr
cnumexpr
styles BEG controls END
{
define_dialog ($1, &sub_res_info, &dialog);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
| id DIALOGEX memflags_move exstyle posnumexpr cnumexpr cnumexpr
cnumexpr cnumexpr
styles BEG controls END
{
define_dialog ($1, &sub_res_info, &dialog);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
style |= DS_SETFONT;
dialog.pointsize = $3;
unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ if (dialog.ex != NULL)
+ {
+ dialog.ex->weight = 0;
+ dialog.ex->italic = 0;
+ dialog.ex->charset = 1;
+ }
+ }
+ | styles FONT numexpr ',' QUOTEDSTRING cnumexpr
+ {
+ dialog.style |= DS_SETFONT;
+ style |= DS_SETFONT;
+ dialog.pointsize = $3;
+ unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ if (dialog.ex == NULL)
+ rcparse_warning (_("extended FONT requires DIALOGEX"));
+ else
+ {
+ dialog.ex->weight = $6;
+ dialog.ex->italic = 0;
+ dialog.ex->charset = 1;
+ }
}
| styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr
{
{
dialog.ex->weight = $6;
dialog.ex->italic = $7;
+ dialog.ex->charset = 1;
+ }
+ }
+ | styles FONT numexpr ',' QUOTEDSTRING cnumexpr cnumexpr cnumexpr
+ {
+ dialog.style |= DS_SETFONT;
+ style |= DS_SETFONT;
+ dialog.pointsize = $3;
+ unicode_from_ascii ((int *) NULL, &dialog.font, $5);
+ if (dialog.ex == NULL)
+ rcparse_warning (_("extended FONT requires DIALOGEX"));
+ else
+ {
+ dialog.ex->weight = $6;
+ dialog.ex->italic = $7;
+ dialog.ex->charset = $8;
}
}
| styles MENU id
id FONT memflags_move_discard file_name
{
define_font ($1, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id ICON memflags_move_discard file_name
{
define_icon ($1, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id MENU suboptions BEG menuitems END
{
define_menu ($1, &$3, $5);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id MENUEX suboptions BEG menuexitems END
{
define_menu ($1, &$3, $5);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id MESSAGETABLE memflags_move file_name
{
define_messagetable ($1, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id RCDATA suboptions BEG optrcdata_data END
{
define_rcdata ($1, &$3, $5.first);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
| string_data numexpr QUOTEDSTRING
{
define_stringtable (&sub_res_info, $2, $3);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
| string_data numexpr ',' QUOTEDSTRING
{
define_stringtable (&sub_res_info, $2, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id id suboptions BEG optrcdata_data END
{
define_user_data ($1, $2, &$3, $5.first);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
| id id suboptions file_name
{
define_user_file ($1, $2, &$3, $4);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
id VERSIONINFO fixedverinfo BEG verblocks END
{
define_versioninfo ($1, language, $3, $5);
+ if (yychar != YYEMPTY)
+ YYERROR;
+ rcparse_discard_strings ();
}
;
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
/* FIXME: Is this the right default? */
- $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
+ $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
}
| suboptions memflag
{
{
memset (&$$, 0, sizeof (struct res_res_info));
$$.language = language;
- $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE;
+ $$.memflags = MEMFLAG_MOVEABLE | MEMFLAG_PURE | MEMFLAG_DISCARDABLE;
}
| memflags_move memflag
{