public String compile(Script depRoot,boolean replaceQuotes){
  final Resource resource=depRoot.eResource();
  EcoreUtil2.resolveLazyCrossReferences(resource,CancelIndicator.NullImpl);
  final AbstractSubGenerator generator=getGeneratorForResource(resource);
  String compileResultStr=generator.getCompileResultAsText(depRoot);
  if (replaceQuotes) {
    compileResultStr=compileResultStr.replace("\"","'");
  }
  return compileResultStr;
}

public String compile ( Script depRoot , boolean replaceQuotes ) { final Resource resource = depRoot . eResource ( ) ; EcoreUtil2 . resolveLazyCrossReferences ( resource , CancelIndicator . NullImpl ) ; final AbstractSubGenerator generator = getGeneratorForResource ( resource ) ; String compileResultStr = generator . getCompileResultAsText ( depRoot ) ; if ( replaceQuotes ) { compileResultStr = compileResultStr . replace ( "\"" , "'" ) ; } return compileResultStr ; }
compiles provided script . can replace backslashes with single quote ( for windows command line issues )
