R/dots.R

Defines functions dots

Documented in dots

#do not edit, edit noweb/qmrparser.nw
dots <- function(action = function(s) list(type="dots",value=s), 
                 error  = function(p) list(type="dots",pos  =p)) 
  
  function (stream) {
    cstream <- streamParserNextChar(stream)             
    
    if ( cstream$status == "eof" || cstream$char != "." ) return(list(status="fail",node=error(streamParserPosition(stream)),stream=stream)) 
    s <- cstream$char
    repeat {
      stream  <- cstream$stream
      cstream <- streamParserNextCharSeq(stream) 
      
      if ( cstream$status == "eof" || ! ( cstream$char == "." ) ) return(list(status="ok",node=action(paste(s,collapse="")),stream=stream)) 
      
      s      <- c(s,cstream$char)
    }
  }

Try the qmrparser package in your browser

Any scripts or data that you put into this service are public.

qmrparser documentation built on April 24, 2022, 1:05 a.m.