summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/fe/idl.yy
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/fe/idl.yy')
-rw-r--r--TAO/TAO_IDL/fe/idl.yy36
1 files changed, 31 insertions, 5 deletions
diff --git a/TAO/TAO_IDL/fe/idl.yy b/TAO/TAO_IDL/fe/idl.yy
index 8f3a7b214a0..6efb3bc0669 100644
--- a/TAO/TAO_IDL/fe/idl.yy
+++ b/TAO/TAO_IDL/fe/idl.yy
@@ -171,7 +171,7 @@ extern int yyleng;
/* OBV tokens see OMG ptc/98-10-04 3.2.4 */
%token IDL_ABSTRACT
%token IDL_CUSTOM
-%token IDL_FACTORY
+%token IDL_INIT
%token IDL_PRIVATE
%token IDL_PUBLIC
%token IDL_SUPPORTS
@@ -1627,11 +1627,37 @@ struct_type :
}
;
-at_least_one_member : member members ;
+at_least_one_member
+ : member members
+ | /* EMPTY */
+ {
+ idl_global->err()->syntax_error(idl_global->parse_state());
+ idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ yyerrok;
+ }
+ | error
+ {
+ idl_global->err()->syntax_error(idl_global->parse_state());
+ }
+ ';'
+ {
+ idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ yyerrok;
+ }
+ ;
members
: members member
| /* EMPTY */
+ | error
+ {
+ idl_global->err()->syntax_error(idl_global->parse_state());
+ }
+ ';'
+ {
+ idl_global->set_parse_state(IDL_GlobalData::PS_NoState);
+ yyerrok;
+ }
;
member :
@@ -2586,15 +2612,15 @@ op_type_spec
;
init_decl
- : IDL_FACTORY IDENTIFIER parameter_list
+ : IDL_INIT
{
- // TODO: replace parameter_list with rule that accepts only IN args
cerr << "error in " << idl_global->filename()->get_string()
<< " line " << idl_global->lineno() << ":\n" ;
- cerr << "Sorry, I (TAO_IDL) can't handle factory yet\n";
+ cerr << "Sorry, I (TAO_IDL) can't handle init yet\n";
}
;
+
parameter_list
: '('
{