Package com.sun.tahiti.compiler

Examples of com.sun.tahiti.compiler.XMLWriter.element()


      {// generate intermediate symbols.
        int cnt=1;
        for( Iterator itr = rules.iterateKeys(); itr.hasNext(); ) {
          Expression symbol = (Expression)itr.next();
          if(!allNames.containsKey(symbol)) {
            out.element( "intermediateSymbol", new String[]{"id","T"+cnt});
            allNames.put( symbol, "T"+cnt );
            cnt++;
          }
        }
      }
View Full Code Here


          Expression symbol = (Expression)itr.next();
          out.start("nonTerminal",
            new String[]{"id",getId(symbol)});
          Rule[] rs = rules.getAll(symbol);
          for( int i=0; i<rs.length; i++ )
            out.element("rule",new String[]{"no",getId(rs[i])});
         
          out.end("nonTerminal");
        }
        out.end("rulesList");
      }
View Full Code Here

              exp.contentModel.visit(this);
          }
        });
       
        Type rootType = TypeUtil.getCommonBaseType(rootClasses);
        out.element("rootType",
          new String[]{"name", rootType.getTypeName()});
      }
     
      out.end("grammar");
      outHandler.endDocument();
View Full Code Here

      out.start("grammar");
     
      {
        int idx = grammar.grammarName.lastIndexOf('.');
        if(idx<0) {
          out.element("name", grammar.grammarName);
        } else {
          out.element("package", grammar.grammarName.substring(0,idx));
          out.element("name", grammar.grammarName.substring(idx+1));
        }
      }
View Full Code Here

      {
        int idx = grammar.grammarName.lastIndexOf('.');
        if(idx<0) {
          out.element("name", grammar.grammarName);
        } else {
          out.element("package", grammar.grammarName.substring(0,idx));
          out.element("name", grammar.grammarName.substring(idx+1));
        }
      }
     
    // collect various primitives (a map to its name)
View Full Code Here

        int idx = grammar.grammarName.lastIndexOf('.');
        if(idx<0) {
          out.element("name", grammar.grammarName);
        } else {
          out.element("package", grammar.grammarName.substring(0,idx));
          out.element("name", grammar.grammarName.substring(idx+1));
        }
      }
     
    // collect various primitives (a map to its name)
    //====================================================================
View Full Code Here

      for( int i=0; i<dts.length; i++ ) {
        // TODO: serious implementation
        out.start( "dataSymbol", new String[]{
          "id",(String)allNames.get(dts[i])});
       
        out.element("library", dts[i].getName().namespaceURI );
        out.element("name", dts[i].getName().localName );
       
        out.end("dataSymbol");
       
//          "type", ((XSDatatype)dts[i].dt).getConcreteType().getName()
View Full Code Here

        // TODO: serious implementation
        out.start( "dataSymbol", new String[]{
          "id",(String)allNames.get(dts[i])});
       
        out.element("library", dts[i].getName().namespaceURI );
        out.element("name", dts[i].getName().localName );
       
        out.end("dataSymbol");
       
//          "type", ((XSDatatype)dts[i].dt).getConcreteType().getName()
//          } );
View Full Code Here

//          "type", ((XSDatatype)dts[i].dt).getConcreteType().getName()
//          } );
      }
     
      for( int i=0; i<cis.length; i++ ) {
        out.element( "classSymbol", new String[]{
          "id",(String)allNames.get(cis[i]),
          "type",(String)cis[i].getTypeName()
        } );
      }
     
View Full Code Here

          "type",(String)cis[i].getTypeName()
        } );
      }
     
      for( int i=0; i<pis.length; i++ )
        out.element( "primitiveSymbol", new String[]{"id",(String)allNames.get(pis[i])} );
     
      for( int i=0; i<fis.length; i++ )
        out.element( "namedSymbol", new String[]{"id",(String)allNames.get(fis[i])} );
     
      for( int i=0; i<iis.length; i++ )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.