SCM

SCM Repository

[inlinedocs] Diff of /pkg/inlinedocs/R/parsers.R
ViewVC logotype

Diff of /pkg/inlinedocs/R/parsers.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 356, Mon Apr 9 15:39:09 2012 UTC revision 370, Fri Nov 9 19:48:27 2012 UTC
# Line 58  Line 58 
58  })  })
59    
60  ### combine lists or character strings  ### combine lists or character strings
61  combine <- function(x,y)UseMethod("combine")  combine.NULL<-function(x,y){
62        if (class(x) == "NULL"){
63            # print(paste("mm x=",x))
64            # print(paste("mm class(x)=",class(x)))
65            x=list("")
66        }
67        if (class(y) == "NULL"){
68            # print(paste("mm y=",y))
69            # print(paste("mm class(y)=",class(y)))
70            y=list("")
71        }
72        return(combine(x,y))
73    }
74    combine <- function(x,y){
75        UseMethod("combine")
76    }
77    
78  ### combine character strings by pasting them together  ### combine character strings by pasting them together
79  combine.character <- function(x,y)  combine.character <- function(x,y)
# Line 951  Line 966 
966    if(verbose)cat("Applying parsers:\n")    if(verbose)cat("Applying parsers:\n")
967    for(i in seq_along(parsers)){    for(i in seq_along(parsers)){
968      N <- names(parsers[i])      N <- names(parsers[i])
969      if(verbose){      #mm if(verbose){
970        if(is.character(N) && N!=""){        if(is.character(N) && N!=""){
971          cat(N,"\n",sep="")          cat(" this is parser:",N,"\n",sep="")
972        }else cat('.\n')        }else cat('.\n')
973      }      #mm }
974      p <- parsers[[i]]      p <- parsers[[i]]
975      ## This is the argument list that each parser receives:      ## This is the argument list that each parser receives:
976      L <- p(code=code,objs=objs,docs=docs,env=e,...)      L <- p(code=code,objs=objs,docs=docs,env=e,...)
977        # print("mm point1")
978        #save(docs,L,file="/home/mm/SoilR/scripts/docs_L.RData")
979      #print(paste(L,"\n"))      #print(paste(L,"\n"))
980      #if(N=="exclude")browser()      #if(N=="exclude")browser()
981      docs <- combine(docs,L)      docs <- combine(docs,L) #mm
982    }    }
983    ## post-process to collapse all character vectors    ## post-process to collapse all character vectors
984    for(i in seq_along(docs)){    for(i in seq_along(docs)){

Legend:
Removed from v.356  
changed lines
  Added in v.370

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge