⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psdl.yy

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 YY
📖 第 1 页 / 共 3 页
字号:
		    YYABORT;
	
		  $$ = $1;
		}
			;

op_dcl : 		op_attribute op_type_spec op_name parameter_dcls raises_expr context_expr
		{ TAO_PSDL_Scope::instance ()->set_scope ();
		  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4, $5, $6); }
			|
			op_type_spec op_name parameter_dcls raises_expr context_expr
		{ TAO_PSDL_Scope::instance ()->set_scope (); 
		  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4, $5); }
			|
			 op_attribute op_type_spec op_name parameter_dcls raises_expr
		{ TAO_PSDL_Scope::instance ()->set_scope ();
		  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4, $5); }
			|
			 op_attribute op_type_spec op_name parameter_dcls context_expr
		{ TAO_PSDL_Scope::instance ()->set_scope ();
		  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4, $5); }
			|
			op_type_spec op_name parameter_dcls raises_expr
		{ TAO_PSDL_Scope::instance ()->set_scope ();
                  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4); }
			|
			op_type_spec op_name parameter_dcls context_expr
		{ TAO_PSDL_Scope::instance ()->set_scope ();
		  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3, $4); }
			|
			op_type_spec op_name parameter_dcls
		{ TAO_PSDL_Scope::instance ()->set_scope ();
                  $$ = new TAO_PSDL_Op_Dcl ($1, $2, $3); }
			;

op_attribute : 		TAO_PSDL_ONEWAY
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_ONEWAY); }
			;

op_type_spec : 		param_type_spec
		{ $$ = new TAO_PSDL_Op_Type_Spec ($1); }
			|
		 	TAO_PSDL_VOID
		{ $$ = new TAO_PSDL_Op_Type_Spec (TAO_PSDL_VOID); }
			;

parameter_dcls : 	TAO_PSDL_OPEN_BRACE param_dcl TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Parameter_Dcls ($2); }
			|
			TAO_PSDL_OPEN_BRACE TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Parameter_Dcls (); }
			;

param_dcl : 		param_attribute param_type_spec simple_declarator
		{ $$ = new TAO_PSDL_Param_Dcl ($1, $2, $3); }
			|
			param_attribute param_type_spec simple_declarator TAO_PSDL_COMMA param_dcl
		{ $$ = new TAO_PSDL_Param_Dcl ($1, $2, $3, $5); }
			;

param_attribute : 	TAO_PSDL_IN
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_IN); }
			|
			TAO_PSDL_OUT
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_OUT); }
			|
			TAO_PSDL_INOUT
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_INOUT); }
			;

raises_expr : 		TAO_PSDL_RAISES TAO_PSDL_OPEN_BRACE scoped_name TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Raises_Expr ($3); }
			|
			TAO_PSDL_RAISES TAO_PSDL_OPEN_BRACE scoped_name TAO_PSDL_COMMA comma_scoped_name TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Raises_Expr ($3, $4); }
			;

context_expr : 		TAO_PSDL_CONTEXT TAO_PSDL_OPEN_BRACE string_literal TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Context_Expr ($3); }
			;

param_type_spec : 	base_type_spec
		{ $$ = new TAO_PSDL_Param_Type_Spec ($1); }
			|
			string_type
		{ $$ = new TAO_PSDL_Param_Type_Spec ($1); }
			|
			wide_string_type
		{ $$ = new TAO_PSDL_Param_Type_Spec ($1); }
			|
			scoped_name
		{ $$ = new TAO_PSDL_Param_Type_Spec ($1); }
			;

fixed_pt_type : 	TAO_PSDL_FIXED TAO_PSDL_OPEN_ANGULAR_BRACE positive_int_const TAO_PSDL_COMMA positive_int_const TAO_PSDL_CLOSE_ANGULAR_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type ($3, $5); }
			;

fixed_pt_const_type : 	TAO_PSDL_FIXED
		{ $$ = $1; }
			;

value_base_type : 	TAO_PSDL_VALUEBASE
		{ $$ = $1; }
			;

constr_forward_decl : 	TAO_PSDL_STRUCT identifier
		{ $$ = new TAO_PSDL_Constr_Forward_Decl ($1, $2); }
			|
			TAO_PSDL_UNION identifier
		{ $$ = new TAO_PSDL_Constr_Forward_Decl ($1, $2); }
			;

interface : 		interface_dcl
		{ $$ = new TAO_PSDL_Interface ($1); }
			|
			forward_dcl
		{ $$ = new TAO_PSDL_Interface ($1); }
			;

interface_dcl : 	interface_header TAO_PSDL_OPEN_CURLY_BRACE interface_body TAO_PSDL_CLOSE_CURLY_BRACE
		{
		  TAO_PSDL_Scope::instance ()->set_interface_scope ();
		  $$ = new TAO_PSDL_Interface_Dcl ($1, $3);
		}
			|
			interface_header TAO_PSDL_OPEN_CURLY_BRACE TAO_PSDL_CLOSE_CURLY_BRACE
		{
		  TAO_PSDL_Scope::instance ()->set_interface_scope ();
		  $$ = new TAO_PSDL_Interface_Dcl ($1);
		}
			;

forward_dcl : 		TAO_PSDL_ABSTRACT TAO_PSDL_INTERFACE identifier
		{ $$ = new TAO_PSDL_Forward_Dcl (TAO_PSDL_ABSTRACT, $3); }
			|
			TAO_PSDL_LOCAL TAO_PSDL_INTERFACE identifier
		{ $$ = new TAO_PSDL_Forward_Dcl (TAO_PSDL_LOCAL, $3); }
			|
			TAO_PSDL_INTERFACE identifier
		{ $$ = new TAO_PSDL_Forward_Dcl ($2); }
			;

interface_identifier:    TAO_PSDL_INTERFACE identifier
		{
		  int good_interface_name = TAO_PSDL_Scope::instance ()->pop_top_scope ()->add_interface (TAO_PSDL_Scope::instance ()->get_identifier ());
		  if (good_interface_name == -1)
		      YYABORT;

		  $$ = $2;
		}
			;

interface_header : 	TAO_PSDL_ABSTRACT interface_identifier
		{ $$ = new TAO_PSDL_Interface_Header ($1, $2); }
			|
			TAO_PSDL_LOCAL interface_identifier
		{ $$ = new TAO_PSDL_Interface_Header ($1, $2); }
			|
			interface_identifier
		{ $$ = new TAO_PSDL_Interface_Header ($1); }
			|
	 		TAO_PSDL_ABSTRACT interface_identifier interface_inheritance_spec
		{ $$ = new TAO_PSDL_Interface_Header ($1, $2, $3); }
			|
			TAO_PSDL_LOCAL interface_identifier interface_inheritance_spec
		{ $$ = new TAO_PSDL_Interface_Header ($1, $2, $3); }
			|
			interface_identifier interface_inheritance_spec
		{ $$ = new TAO_PSDL_Interface_Header ($2, $1); }
			;

interface_body : 	export
		{ $$ = new TAO_PSDL_Interface_Body ($1); }
			|
			export interface_body
		{ $$ = new TAO_PSDL_Interface_Body ($1, $2); }
			;

export : 		type_dcl TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Export_Dcl ($1); }
			|
			const_dcl TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Export_Dcl ($1); }
			|
			except_dcl TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Export_Dcl ($1); }
			|
			attr_dcl TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Export_Dcl ($1); }
			|
			op_dcl TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Export_Dcl ($1); }
			;

interface_inheritance_spec:
			TAO_PSDL_COLON interface_name
		{ $$ = new TAO_PSDL_Interface_Inheritance_Spec ($2); }
			;

interface_name : 	scoped_name
		{ $$ = new TAO_PSDL_Interface_Name ($1); }
			|
			scoped_name TAO_PSDL_COMMA interface_name
		{ $$ = new TAO_PSDL_Interface_Name ($1, $2); }
			;

scoped_name : 		identifier TAO_PSDL_DOUBLE_COLON scoped_name
		{ $$ = new TAO_PSDL_Scoped_Name ($1, $3); }
			|
			identifier
		{ $$ = $1; }
			;

comma_scoped_name: 	identifier TAO_PSDL_COMMA comma_scoped_name
		{ $$ = new TAO_PSDL_Scoped_Name ($1, $3); }
			|
			identifier
		{ $$ = $1; }
			;

value  :  		value_dcl
		{ $$ = new TAO_PSDL_Value ($1); }
			|
			value_abs_dcl
		{ $$ = new TAO_PSDL_Value ($1); }
			|
			value_box_dcl
		{ $$ = new TAO_PSDL_Value ($1); }
			|
			value_forward_dcl
		{ $$ = new TAO_PSDL_Value ($1); }
			;

value_common_base:  	TAO_PSDL_VALUETYPE identifier
		{ $$ = new TAO_PSDL_Value_Common_Base ($2); }
			;

value_forward_dcl:	TAO_PSDL_ABSTRACT value_common_base
		{ $$ = new TAO_PSDL_Value_Forward_Dcl ($1, $2); }
			|
			value_common_base
		{ $$ = new TAO_PSDL_Value_Forward_Dcl ($1); }
			;

value_box_dcl  : 	value_common_base type_spec
		{ $$ = new TAO_PSDL_Value_Box_Dcl ($1, $2); }
			;

value_abs_dcl : 	TAO_PSDL_ABSTRACT value_common_base value_inheritance_spec TAO_PSDL_OPEN_CURLY_BRACE export TAO_PSDL_CLOSE_CURLY_BRACE
		{ $$ = new TAO_PSDL_Value_Abs_Dcl ($2, $3, $5); }
			|
			TAO_PSDL_ABSTRACT value_common_base TAO_PSDL_OPEN_CURLY_BRACE export TAO_PSDL_CLOSE_CURLY_BRACE
		{ $$ = new TAO_PSDL_Value_Abs_Dcl ($2, $4); }
			;

value_dcl   : value_header TAO_PSDL_OPEN_CURLY_BRACE value_element TAO_PSDL_CLOSE_CURLY_BRACE
		{ $$ = new TAO_PSDL_Value_Dcl ($1, $3); }
			;

value_header  : 	TAO_PSDL_CUSTOM value_common_base value_inheritance_spec
		{ $$ = new TAO_PSDL_Value_Header ($1, $2, $3); }
			|
			value_common_base value_inheritance_spec
		{ $$ = new TAO_PSDL_Value_Header ($1, $2); }
			|
			TAO_PSDL_CUSTOM value_common_base
		{ $$ = new TAO_PSDL_Value_Header ($1, $2); }
			;

value_inheritance_spec  :  	TAO_PSDL_COLON TAO_PSDL_TRUNCATABLE value_name TAO_PSDL_SUPPORTS interface_name
		{ $$ = new TAO_PSDL_Value_Inheritance_Spec ($2, $3, $5); }
				|
				TAO_PSDL_COLON value_name TAO_PSDL_SUPPORTS interface_name
		{ $$ = new TAO_PSDL_Value_Inheritance_Spec ($2, $4); }
				|
				TAO_PSDL_SUPPORTS interface_name
		{ $$ = new TAO_PSDL_Value_Inheritance_Spec ($2); }
				|
				TAO_PSDL_COLON TAO_PSDL_TRUNCATABLE value_name
		{ $$ = new TAO_PSDL_Value_Inheritance_Spec ($2, $3); }
				|
				TAO_PSDL_COLON value_name
		{ $$ = new TAO_PSDL_Value_Inheritance_Spec ($2); }
				;


string_type: 			TAO_PSDL_STRING TAO_PSDL_OPEN_ANGULAR_BRACE positive_int_const TAO_PSDL_CLOSE_ANGULAR_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_STRING, $3); }
				|
				TAO_PSDL_STRING
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_STRING); }
				;

wide_string_type : 		TAO_PSDL_WSTRING TAO_PSDL_OPEN_ANGULAR_BRACE positive_int_const TAO_PSDL_CLOSE_ANGULAR_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type ($3); }
				|
				TAO_PSDL_WSTRING
		{ $$ = $1; }
				;

array_declarator : 		identifier fixed_array_size
		{ $$ = new TAO_PSDL_Array_Declarator ($1, $2); }
				;

fixed_array_size : 		TAO_PSDL_OPEN_SQUARE_BRACE positive_int_const TAO_PSDL_CLOSE_SQUARE_BRACE
		{ $$ = new TAO_PSDL_Fixed_Array_Size ($2); }
				;

attr_dcl : 			TAO_PSDL_READONLY TAO_PSDL_ATTRIBUTE param_type_spec simple_declarator
		{ $$ = new TAO_PSDL_Attr_Dcl (TAO_PSDL_READONLY, $3, $4); }
				|
				TAO_PSDL_ATTRIBUTE param_type_spec simple_declarator
		{ $$ = new TAO_PSDL_Attr_Dcl ($2, $3); }
				;

enum_type : 			TAO_PSDL_ENUM identifier TAO_PSDL_OPEN_CURLY_BRACE enumerator TAO_PSDL_CLOSE_CURLY_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_ENUM, $2, $4); }
				;

enumerator : 			identifier
		{ $$ = new TAO_PSDL_Enumerator ($1); }
				|
				identifier TAO_PSDL_COMMA enumerator
		{ $$ = new TAO_PSDL_Enumerator ($1, $3); }
				;

sequence_type : 		TAO_PSDL_SEQUENCE TAO_PSDL_OPEN_ANGULAR_BRACE simple_type_spec TAO_PSDL_COMMA positive_int_const TAO_PSDL_CLOSE_ANGULAR_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_SEQUENCE, $3, $5); }
				|
				TAO_PSDL_SEQUENCE TAO_PSDL_OPEN_ANGULAR_BRACE simple_type_spec TAO_PSDL_CLOSE_ANGULAR_BRACE
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_SEQUENCE, $3); }
				;

literal : 			integer_literal
		{ $$ = $1; }
				|
			 	string_literal
		{ $$ = $1; }
				|
				wide_string_literal
		{ $$ = $1; }
				|
				character_literal
		{ $$ = $1; }
				|
				wide_character_literal
		{ $$ = $1; }
				|
				fixed_pt_literal
		{ $$ = $1; }
				|
				floating_pt_literal
		{ $$ = $1; }
				|
				boolean_literal
		{ $$ = $1; }
				;

boolean_literal : 		TAO_PSDL_TRUE
		{ $$ = $1; }
				|
				TAO_PSDL_FALSE
		{ $$ = $1; }
				;

integer_literal: 		TAO_PSDL_INTEGER
		{ $$ = $1; }
				;

floating_pt_literal: 		TAO_PSDL_FLOATING_PT
		{ $$ = $1; }
				;

character_literal: 		TAO_PSDL_CHAR_LITERAL
		{ $$ = $1; }
				;

wide_character_literal: 	TAO_PSDL_WCHAR
		{ $$ = $1; }
				;

string_literal: 		TAO_PSDL_STRING
		{ $$ = $1; }
				;

wide_string_literal: 		TAO_PSDL_WSTRING
		{ $$ = $1; }
				;

fixed_pt_literal: 		TAO_PSDL_FIXED_PT
		{ $$ = $1; }
				;

value_name: 			scoped_name
		{ $$ = new TAO_PSDL_Value_Name ($1); }
				|
				scoped_name TAO_PSDL_COMMA value_name
		{ $$ = new TAO_PSDL_Value_Name ($1, $3); }
				;

value_element : 		export
		{ $$ = new TAO_PSDL_Value_Element ($1); }
				|
				state_member
		{ $$ = new TAO_PSDL_Value_Element ($1); }
				|
				init_dcl
		{ $$ = new TAO_PSDL_Value_Element ($1); }
				;

state_member : 			TAO_PSDL_PUBLIC type_spec declarators TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_State_Member ($1, $2, $3); }
				|
				TAO_PSDL_PRIVATE type_spec declarators TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_State_Member ($1, $2, $3); }
				;

init_dcl : 			TAO_PSDL_FACTORY identifier TAO_PSDL_OPEN_BRACE init_param_decls TAO_PSDL_CLOSE_BRACE TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Init_Dcl ($2, $4); }
				|
				TAO_PSDL_FACTORY identifier TAO_PSDL_OPEN_BRACE  TAO_PSDL_CLOSE_BRACE TAO_PSDL_SEMI
		{ $$ = new TAO_PSDL_Init_Dcl ($2); }
				;

init_param_decls: 		init_param_decl
		{ $$ = new TAO_PSDL_Init_Param_Decls ($1); }
				|
				init_param_decl TAO_PSDL_COMMA init_param_decls
		{ $$ = new TAO_PSDL_Init_Param_Decls ($1, $2); }
				;

init_param_decl : 		init_param_attribute param_type_spec simple_declarator
		{ $$ = new TAO_PSDL_Init_Param_Decl ($1, $2, $3); }
				;

init_param_attribute : 		TAO_PSDL_IN
		{ $$ = new TAO_PSDL_Predefined_Type (TAO_PSDL_IN); }
				;

positive_int_const : 		const_exp
		{ $$ = new TAO_PSDL_Positive_Int_Const ($1); }
				;

factory_dcl :			 TAO_PSDL_FACTORY identifier factory_parameters
		{ $$ = new TAO_PSDL_Factory_Dcl ($2, $3); }
				;

factory_parameters: 		 TAO_PSDL_OPEN_BRACE simple_declarator TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Factory_Parameters ($2); }
				 |
				 TAO_PSDL_OPEN_BRACE TAO_PSDL_CLOSE_BRACE
		{ $$ = new TAO_PSDL_Factory_Parameters (); }
				 ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -