incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mvesc...@apache.org
Subject svn commit: r526219 - /incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
Date Fri, 06 Apr 2007 16:36:56 GMT
Author: mvescovi
Date: Fri Apr  6 09:36:55 2007
New Revision: 526219

URL: http://svn.apache.org/viewvc?view=rev&rev=526219
Log:
[YOKO-334] Initial commit to remove generation of spurious ':' operation when parsing IDL
with interface inheritance specifications.

Modified:
    incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java

Modified: incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
URL: http://svn.apache.org/viewvc/incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java?view=diff&rev=526219&r1=526218&r2=526219
==============================================================================
--- incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
(original)
+++ incubator/yoko/trunk/tools/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
Fri Apr  6 09:36:55 2007
@@ -86,7 +86,15 @@
         definition.addPortType(portType);
         Binding binding = createBinding();
         
-        AST exportNode = identifierNode.getNextSibling();
+        AST exportNode = null;
+        AST interfaceInheritanceSpecNode = identifierNode.getNextSibling();
+        if (interfaceInheritanceSpecNode != null
+            && interfaceInheritanceSpecNode.getType() == IDLTokenTypes.COLON) {
+            exportNode = visitInterfaceInheritanceSpec(interfaceInheritanceSpecNode);
+        } else {
+            exportNode = interfaceInheritanceSpecNode;
+        }
+
         while (exportNode != null) {
             
             if (TypeDclVisitor.accept(exportNode)) {
@@ -160,5 +168,20 @@
             }
         }
         return false;
+    }
+    
+    private AST visitInterfaceInheritanceSpec(AST interfaceInheritanceSpecNode) {
+        // <interface_inheritance_spec> ::= ":" <interface_name> { "," <interface_name>
}*
+        
+        AST interfaceNameNode = interfaceInheritanceSpecNode.getFirstChild();
+        while (interfaceNameNode != null) {
+            
+            // TODO
+            // add interface inheritance information to XmlSchema and CorbaTypeMap here 

+            
+            interfaceNameNode = interfaceNameNode.getNextSibling();
+        }
+        
+        return interfaceInheritanceSpecNode.getNextSibling();
     }
 }



Mime
View raw message