diff options
Diffstat (limited to 'idlc')
-rw-r--r-- | idlc/inc/idlc/astoperation.hxx | 8 | ||||
-rw-r--r-- | idlc/inc/idlc/idlctypes.hxx | 2 | ||||
-rw-r--r-- | idlc/source/astoperation.cxx | 16 | ||||
-rw-r--r-- | idlc/source/errorhandler.cxx | 4 | ||||
-rw-r--r-- | idlc/source/idlc.cxx | 10 | ||||
-rw-r--r-- | idlc/source/parser.y | 37 | ||||
-rw-r--r-- | idlc/source/scanner.l | 1 | ||||
-rw-r--r-- | idlc/test/interface.idl | 2 |
8 files changed, 16 insertions, 64 deletions
diff --git a/idlc/inc/idlc/astoperation.hxx b/idlc/inc/idlc/astoperation.hxx index c8d406189b88..304113c9a495 100644 --- a/idlc/inc/idlc/astoperation.hxx +++ b/idlc/inc/idlc/astoperation.hxx @@ -25,7 +25,6 @@ namespace typereg { class Writer; } #define OP_NONE 0x0000 -#define OP_ONEWAY 0x0001 class AstType; @@ -33,17 +32,13 @@ class AstOperation : public AstDeclaration , public AstScope { public: - AstOperation(sal_uInt32 flags, AstType* pReturnType, const ::rtl::OString& name, AstScope* pScope) + AstOperation(AstType* pReturnType, const ::rtl::OString& name, AstScope* pScope) : AstDeclaration(NT_operation, name, pScope) , AstScope(NT_operation) - , m_flags(flags) , m_pReturnType(pReturnType) {} virtual ~AstOperation() {} - sal_Bool isOneway() - { return ((m_flags & OP_ONEWAY) == OP_ONEWAY); } - bool isVariadic() const; bool isConstructor() const { return m_pReturnType == 0; } @@ -59,7 +54,6 @@ public: // scope management virtual AstDeclaration* addDeclaration(AstDeclaration* pDecl); private: - sal_uInt32 m_flags; AstType* m_pReturnType; DeclList m_exceptions; }; diff --git a/idlc/inc/idlc/idlctypes.hxx b/idlc/inc/idlc/idlctypes.hxx index 4fd174f29f8c..3c9568cff891 100644 --- a/idlc/inc/idlc/idlctypes.hxx +++ b/idlc/inc/idlc/idlctypes.hxx @@ -235,7 +235,6 @@ enum ParseState PS_ExceptQsSeen, // Seen '}' for exception PS_ExceptBodySeen, // Seen complete exception body - PS_OpHeadSeen, // Seen the operation head PS_OpTypeSeen, // Seen operation return type PS_OpIDSeen, // Seen operation ID PS_OpParsCompleted, // Completed operation param list @@ -246,7 +245,6 @@ enum ParseState PS_OpParDirSeen, // Seen parameter direction PS_OpParTypeSeen, // Seen parameter type PS_OpParDeclSeen, // Seen parameter declaration - PS_OpOnewaySeen, // Seen ONEWAY keyword PS_RaiseSeen, // Seen RAISES keyword PS_RaiseSqSeen, // Seen '(' for RAISES diff --git a/idlc/source/astoperation.cxx b/idlc/source/astoperation.cxx index 1f02196a1bf6..f1d11174a057 100644 --- a/idlc/source/astoperation.cxx +++ b/idlc/source/astoperation.cxx @@ -30,9 +30,6 @@ using namespace ::rtl; void AstOperation::setExceptions(DeclList const * pExceptions) { if (pExceptions != 0) { - if (isOneway()) { - idlc()->error()->error1(EIDL_ONEWAY_RAISE_CONFLICT, this); - } m_exceptions = *pExceptions; } } @@ -49,9 +46,6 @@ sal_Bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index) sal_uInt16 nExcep = nExceptions(); RTMethodMode methodMode = RT_MODE_TWOWAY; - if ( isOneway() ) - methodMode = RT_MODE_ONEWAY; - rtl::OUString returnTypeName; if (m_pReturnType == 0) { returnTypeName = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("void")); @@ -129,16 +123,6 @@ sal_Bool AstOperation::dumpBlob(typereg::Writer & rBlob, sal_uInt16 index) AstDeclaration* AstOperation::addDeclaration(AstDeclaration* pDecl) { - if ( pDecl->getNodeType() == NT_parameter ) - { - AstParameter* pParam = (AstParameter*)pDecl; - if ( isOneway() && - (pParam->getDirection() == DIR_OUT || pParam->getDirection() == DIR_INOUT) ) - { - idlc()->error()->error2(EIDL_ONEWAY_CONFLICT, pDecl, this); - return NULL; - } - } return AstScope::addDeclaration(pDecl); } diff --git a/idlc/source/errorhandler.cxx b/idlc/source/errorhandler.cxx index fd7227e8cc1a..2b91d4dac28a 100644 --- a/idlc/source/errorhandler.cxx +++ b/idlc/source/errorhandler.cxx @@ -408,8 +408,6 @@ static const sal_Char* parseStateToMessage(ParseState state) return "Illegal syntax after exception '}' closer"; case PS_ExceptBodySeen: return "Illegal syntax after exception member(s)"; - case PS_OpHeadSeen: - return "Illegasl syntax after operation header"; case PS_OpTypeSeen: return "Illegal syntax or missing identifier after operation type"; case PS_OpIDSeen: @@ -430,8 +428,6 @@ static const sal_Char* parseStateToMessage(ParseState state) return "Illegal syntax or missing declarator in parameter declaration"; case PS_OpParDeclSeen: return "Illegal syntax following parameter declarator"; - case PS_OpOnewaySeen: - return "Illegal syntax after ONEWAY keyword"; case PS_RaiseSeen: return "Illegal syntax or missing '(' after RAISES keyword"; case PS_RaiseSqSeen: diff --git a/idlc/source/idlc.cxx b/idlc/source/idlc.cxx index 895a54554ff6..2fd29096a5ee 100644 --- a/idlc/source/idlc.cxx +++ b/idlc/source/idlc.cxx @@ -132,7 +132,7 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) pParentScope->addDeclaration(pInterface); // define XInterface::queryInterface - AstOperation* pOp = new AstOperation(0, (AstType*)(pRoot->lookupPrimitiveType(ET_any)), + AstOperation* pOp = new AstOperation((AstType*)(pRoot->lookupPrimitiveType(ET_any)), OString("queryInterface"), pInterface); AstParameter* pParam = new AstParameter(DIR_IN, false, (AstType*)(pRoot->lookupPrimitiveType(ET_type)), @@ -141,13 +141,13 @@ static void SAL_CALL predefineXInterface(AstModule* pRoot) pInterface->addMember(pOp); // define XInterface::acquire - pOp = new AstOperation(1, (AstType*)(pRoot->lookupPrimitiveType(ET_void)), - OString("acquire"), pInterface); + pOp = new AstOperation((AstType*)(pRoot->lookupPrimitiveType(ET_void)), + OString("acquire"), pInterface); pInterface->addMember(pOp); // define XInterface::release - pOp = new AstOperation(1, (AstType*)(pRoot->lookupPrimitiveType(ET_void)), - OString("release"), pInterface); + pOp = new AstOperation((AstType*)(pRoot->lookupPrimitiveType(ET_void)), + OString("release"), pInterface); pInterface->addMember(pOp); } diff --git a/idlc/source/parser.y b/idlc/source/parser.y index e0bc51e220ab..2b5997d00d2f 100644 --- a/idlc/source/parser.y +++ b/idlc/source/parser.y @@ -342,7 +342,6 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) { %token IDL_IN %token IDL_OUT %token IDL_INOUT -%token IDL_ONEWAY %token IDL_GET %token IDL_SET @@ -394,7 +393,7 @@ bool includes(AstDeclaration const * type1, AstDeclaration const * type2) { %type <ihval> exception_header structure_header interfaceheader -%type <ulval> flag_header opt_attrflags opt_attrflag operation_head +%type <ulval> flag_header opt_attrflags opt_attrflag %type <ulval> direction service_interface_header service_service_header %type <llval> case_labels at_least_one_case_label @@ -995,7 +994,6 @@ attribute_set_raises: ; operation : - operation_head op_type_spec { idlc()->setParseState(PS_OpTypeSeen); @@ -1003,7 +1001,7 @@ operation : identifier { idlc()->setParseState(PS_OpIDSeen); - checkIdentifier($4); + checkIdentifier($3); AstInterface * pScope = static_cast< AstInterface * >( idlc()->scopes()->top()); @@ -1013,15 +1011,15 @@ operation : * Create a node representing an operation on an interface * and add it to its enclosing scope */ - if ( pScope && $2 ) + if ( pScope && $1 ) { - AstType *pType = (AstType*)$2; + AstType *pType = (AstType*)$1; if ( !pType || (pType->getNodeType() == NT_exception) ) { // type ERROR } else { - pOp = new AstOperation($1, pType, *$4, pScope); + pOp = new AstOperation(pType, *$3, pScope); AstInterface::DoubleMemberDeclarations doubleMembers( pScope->checkMemberClashes(pOp)); @@ -1032,7 +1030,7 @@ operation : } } } - delete $4; + delete $3; /* * Push the operation scope onto the scopes stack */ @@ -1062,9 +1060,9 @@ operation : pOp = (AstOperation*)pScope; if ( pOp ) - pOp->setExceptions($12); + pOp->setExceptions($11); } - delete $12; + delete $11; /* * Done with this operation. Pop its scope from the scopes stack */ @@ -1072,23 +1070,6 @@ operation : } ; -operation_head : - '[' - IDL_ONEWAY - { - idlc()->setParseState(PS_OpOnewaySeen); - } - ']' - { - idlc()->setParseState(PS_OpHeadSeen); - $$ = OP_ONEWAY; - } - | /* EMPTY */ - { - $$ = OP_NONE; - } - ; - op_type_spec : simple_type_spec | IDL_VOID @@ -2006,7 +1987,7 @@ constructor: { checkIdentifier($1); AstScope * scope = idlc()->scopes()->top(); - AstOperation * ctor = new AstOperation(OP_NONE, 0, *$1, scope); + AstOperation * ctor = new AstOperation(0, *$1, scope); delete $1; scope->addDeclaration(ctor); idlc()->scopes()->push(ctor); diff --git a/idlc/source/scanner.l b/idlc/source/scanner.l index 5b4794a19cb4..4c123ea8f0c3 100644 --- a/idlc/source/scanner.l +++ b/idlc/source/scanner.l @@ -344,7 +344,6 @@ False return IDL_FALSE; in return IDL_IN; out return IDL_OUT; inout return IDL_INOUT; -oneway return IDL_ONEWAY; get return IDL_GET; set return IDL_SET; diff --git a/idlc/test/interface.idl b/idlc/test/interface.idl index 7aa0e3e7dc75..7af48c8b60d7 100644 --- a/idlc/test/interface.idl +++ b/idlc/test/interface.idl @@ -35,7 +35,7 @@ interface XBase interface XTestBaseTypes : XBase { void voidFunc(); - [oneway] void onewayFunc(); + void onewayFunc(); short shortFunc( [in] short inparam, [out] short outparam, [inout] short inoutparam); unsigned short uShortFunc( [in] unsigned short inparam, [out] unsigned short outparam, [inout] unsigned short inoutparam); |