diff --git a/additionalPackages/RevoIOQ/DESCRIPTION b/additionalPackages/RevoIOQ/DESCRIPTION index fc0e7ee65..33d4a227e 100644 --- a/additionalPackages/RevoIOQ/DESCRIPTION +++ b/additionalPackages/RevoIOQ/DESCRIPTION @@ -1,6 +1,6 @@ Package: RevoIOQ -Version: 8.0.9 -Date: 2018-01-03 +Version: 8.0.10 +Date: 2018-03-28 Title: Microsoft R Services Test Suite Author: Microsoft Corporation Maintainer: Microsoft Corporation @@ -9,5 +9,4 @@ Suggests: RevoUtils Description: Test suite for Microsoft R Services. License: GPL-2 Copyright: Copyright Microsoft Corporation -BuildID: 9.3.0.0020 - +BuildID: 9.4.1.0077 diff --git a/additionalPackages/RevoIOQ/inst/unitTestData/regression_3.4.4.Rdata b/additionalPackages/RevoIOQ/inst/unitTestData/regression_3.4.4.Rdata new file mode 100644 index 000000000..1ec503f85 Binary files /dev/null and b/additionalPackages/RevoIOQ/inst/unitTestData/regression_3.4.4.Rdata differ diff --git a/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runit.revo.common.version.R b/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runit.revo.common.version.R index 6298c611c..4f8d6495b 100644 --- a/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runit.revo.common.version.R +++ b/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runit.revo.common.version.R @@ -26,7 +26,7 @@ if (!identical(system.file(package="RevoMods"), "")) "test.revor.RevoIOQ.version" <- function() checkTrue("checkPackageVersion"(pkg = "RevoIOQ", ver = revover)) "test.revor.RUnit.version" <- function() checkTrue("checkPackageVersion"(pkg = "RUnit", ver = "0.4.26")) "test.revoparallelr.doParallel.version" <- function() checkTrue("checkPackageVersion"(pkg = "doParallel", ver = "1.0.12")) - "test.revor.RevoUtils.version" <- function() checkTrue("checkPackageVersion"(pkg = "RevoUtils", ver = "10.0.7")) + "test.revor.RevoUtils.version" <- function() checkTrue("checkPackageVersion"(pkg = "RevoUtils", ver = "10.0.9")) "test.revor.RevoMods.version" <- function() checkTrue("checkPackageVersion"(pkg = "RevoMods", ver = "11.0.0")) } else { diff --git a/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runitRegression.R b/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runitRegression.R index c15b2b2ac..7c8f1359d 100644 --- a/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runitRegression.R +++ b/additionalPackages/RevoIOQ/inst/unitTests/Revo/common/runitRegression.R @@ -19,8 +19,10 @@ if (compareVersion(paste(R.version$major, R.version$minor, sep=".") ,"2.9.0") < load(system.file(file.path("unitTestData", "regression_3.0.3.Rdata"), package="RevoIOQ")) } else if (compareVersion(paste(R.version$major, R.version$minor, sep="."), "3.4.0") < 0){ load(system.file(file.path("unitTestData", "regression_3.1.0.Rdata"), package="RevoIOQ")) -} else { +} else if (compareVersion(paste(R.version$major, R.version$minor, sep="."), "3.4.4") < 0){ load(system.file(file.path("unitTestData", "regression_3.4.0.Rdata"), package="RevoIOQ")) +} else { + load(system.file(file.path("unitTestData", "regression_3.4.4.Rdata"), package="RevoIOQ")) } test.lm<- function(){ diff --git a/additionalPackages/RevoUtils/DESCRIPTION b/additionalPackages/RevoUtils/DESCRIPTION index c00f405b6..f777add81 100644 --- a/additionalPackages/RevoUtils/DESCRIPTION +++ b/additionalPackages/RevoUtils/DESCRIPTION @@ -1,7 +1,7 @@ Package: RevoUtils -Version: 10.0.7 -Date: 2018-01-03 -RevoBuildID: {10.0.7.0116} +Version: 10.0.9 +Date: 2018-04-15 +RevoBuildID: 10.0.9.0125 Title: Microsoft R Utility Package Author: Microsoft Corporation Maintainer: Microsoft Corporation @@ -9,5 +9,4 @@ SystemRequirements: R (>= 3.0.0) Description: Utility functions for Microsoft R License: GPL-2 Copyright: Microsoft Corporation -MRANDate: 2018-01-01 - +MRANDate: 2018-04-01 diff --git a/additionalPackages/RevoUtils/R/isClient.R b/additionalPackages/RevoUtils/R/isClient.R index bae8ee25e..cf6133f15 100644 --- a/additionalPackages/RevoUtils/R/isClient.R +++ b/additionalPackages/RevoUtils/R/isClient.R @@ -10,7 +10,11 @@ if (identical(clientPath, Rpath)){ returnVal <- TRUE } - } + } else { + if (!identical(system.file(package="RevoScaleR"), "")) { + returnVal <- RevoScaleR:::rxIsExpressEdition() + } + } } else if(identical(.Platform$OS.type, "unix") && !identical(Sys.info()["sysname"], "Darwin")){ if (!identical(system.file(package="RevoScaleR"), "")) { returnVal <- RevoScaleR:::rxIsExpressEdition() diff --git a/additionalPackages/curl/DESCRIPTION b/additionalPackages/curl/DESCRIPTION index 1f1156671..482a7e2cf 100644 --- a/additionalPackages/curl/DESCRIPTION +++ b/additionalPackages/curl/DESCRIPTION @@ -1,9 +1,10 @@ Package: curl Type: Package Title: A Modern and Flexible Web Client for R -Version: 3.1 +Version: 3.2 Authors@R: c( - person("Jeroen", "Ooms", , "jeroen@berkeley.edu", role = c("cre", "aut")), + person("Jeroen", "Ooms", role = c("aut", "cre"), email = "jeroen@berkeley.edu", + comment = c(ORCID = "0000-0002-4035-0289")), person("Hadley", "Wickham", , "hadley@rstudio.com", role = "ctb"), person("RStudio", role = "cph") ) @@ -17,20 +18,24 @@ Description: The curl() and curl_download() functions provide highly web client see the 'httr' package which builds on this package with http specific tools and logic. License: MIT + file LICENSE -SystemRequirements: libcurl: libcurl-devel (rpm) or libcurl4-openssl-dev (deb). -URL: https://github.com/jeroen/curl#readme (devel) - https://curl.haxx.se/libcurl/ (upstream) +SystemRequirements: libcurl: libcurl-devel (rpm) or + libcurl4-openssl-dev (deb). +URL: https://github.com/jeroen/curl#readme (devel) + https://curl.haxx.se/libcurl/ (upstream) BugReports: https://github.com/jeroen/curl/issues -Suggests: - testthat (>= 1.0.0), - knitr, - jsonlite, - rmarkdown, - magrittr, - httpuv, - webutils +Suggests: spelling, testthat (>= 1.0.0), knitr, jsonlite, rmarkdown, + magrittr, httpuv, webutils VignetteBuilder: knitr -Depends: - R (>= 3.0.0) +Depends: R (>= 3.0.0) LazyData: true -RoxygenNote: 6.0.1 +RoxygenNote: 6.0.1.9000 +Encoding: UTF-8 +Language: en-US +NeedsCompilation: yes +Packaged: 2018-03-19 16:18:53 UTC; jeroen +Author: Jeroen Ooms [aut, cre] (), + Hadley Wickham [ctb], + RStudio [cph] +Maintainer: Jeroen Ooms +Repository: CRAN +Date/Publication: 2018-03-28 07:42:52 UTC diff --git a/additionalPackages/curl/NEWS b/additionalPackages/curl/NEWS index 196fcd4e9..fecf8085b 100644 --- a/additionalPackages/curl/NEWS +++ b/additionalPackages/curl/NEWS @@ -1,3 +1,10 @@ +3.2 + - Windows: Update libcurl to 7.59.0 + - Update curl_symbols dataset to 7.59.0 + - Fix an IDN unit test (malmö.se has messed up their SSL cert) + - Add unit test for multi_fdset + - Add backport of trimws for R 3.1 + 3.1 - Fix potential memory bug in curl() when doubling the buffer is insufficient. - Windows: update to libcurl 7.56.1, restore support for libssh2. diff --git a/additionalPackages/curl/R/fetch.R b/additionalPackages/curl/R/fetch.R index 0732550e9..9be5cfaea 100644 --- a/additionalPackages/curl/R/fetch.R +++ b/additionalPackages/curl/R/fetch.R @@ -16,7 +16,7 @@ #' is enabled when R runs in interactive mode or when #' \code{getOption("curl_interrupt") == TRUE}. #' -#' The \code{curl_fetch_multi} function is the asyncronous equivalent of +#' The \code{curl_fetch_multi} function is the asynchronous equivalent of #' \code{curl_fetch_memory}. It wraps \code{multi_add} to schedule requests which #' are executed concurrently when calling \code{multi_run}. For each successful #' request the \code{done} callback is triggered with response data. For failed diff --git a/additionalPackages/curl/R/multi.R b/additionalPackages/curl/R/multi.R index 1860c47c3..3307742f8 100644 --- a/additionalPackages/curl/R/multi.R +++ b/additionalPackages/curl/R/multi.R @@ -11,7 +11,7 @@ #' if the user presses \code{ESC} or \code{CTRL+C} in the console). In case of #' the latter, simply call \link{multi_run} again to resume pending requests. #' -#' When the request succeeded, the \code{done} callback gets triggerd with +#' When the request succeeded, the \code{done} callback gets triggered with #' the response data. The structure if this data is identical to \link{curl_fetch_memory}. #' When the request fails, the \code{fail} callback is triggered with an error #' message. Note that failure here means something went wrong in performing the diff --git a/additionalPackages/curl/R/utilities.R b/additionalPackages/curl/R/utilities.R index 4f031c0fd..67236b343 100644 --- a/additionalPackages/curl/R/utilities.R +++ b/additionalPackages/curl/R/utilities.R @@ -44,3 +44,7 @@ parse_date <- function(datestring){ split_string <- function(x, split = ":"){ .Call(R_split_string, x, split) } + +trimws <- function(x) { + sub("\\s+$", "", sub("^\\s+", "", x)) +} diff --git a/additionalPackages/curl/data/curl_symbols.rda b/additionalPackages/curl/data/curl_symbols.rda index d1c392bd7..7f29bdd07 100644 Binary files a/additionalPackages/curl/data/curl_symbols.rda and b/additionalPackages/curl/data/curl_symbols.rda differ diff --git a/additionalPackages/curl/man/curl_fetch.Rd b/additionalPackages/curl/man/curl_fetch.Rd index d9a42737e..a0cb268f2 100644 --- a/additionalPackages/curl/man/curl_fetch.Rd +++ b/additionalPackages/curl/man/curl_fetch.Rd @@ -56,7 +56,7 @@ interrupting the download prematurely (using e.g. CTRL+C or ESC). Interrupting is enabled when R runs in interactive mode or when \code{getOption("curl_interrupt") == TRUE}. -The \code{curl_fetch_multi} function is the asyncronous equivalent of +The \code{curl_fetch_multi} function is the asynchronous equivalent of \code{curl_fetch_memory}. It wraps \code{multi_add} to schedule requests which are executed concurrently when calling \code{multi_run}. For each successful request the \code{done} callback is triggered with response data. For failed diff --git a/additionalPackages/curl/man/handle.Rd b/additionalPackages/curl/man/handle.Rd index be07ef6ce..9c6fb8eda 100644 --- a/additionalPackages/curl/man/handle.Rd +++ b/additionalPackages/curl/man/handle.Rd @@ -72,3 +72,4 @@ cat(rawToChar(r$content)) \seealso{ Other handles: \code{\link{handle_cookies}} } +\concept{handles} diff --git a/additionalPackages/curl/man/handle_cookies.Rd b/additionalPackages/curl/man/handle_cookies.Rd index c216fb49c..4189f81f8 100644 --- a/additionalPackages/curl/man/handle_cookies.Rd +++ b/additionalPackages/curl/man/handle_cookies.Rd @@ -32,3 +32,4 @@ handle_cookies(h) \seealso{ Other handles: \code{\link{handle}} } +\concept{handles} diff --git a/additionalPackages/curl/man/multi.Rd b/additionalPackages/curl/man/multi.Rd index b9d3e8fc3..60a688604 100644 --- a/additionalPackages/curl/man/multi.Rd +++ b/additionalPackages/curl/man/multi.Rd @@ -65,7 +65,7 @@ requests have completed, or case of a \code{timeout} or \code{SIGINT} (e.g. if the user presses \code{ESC} or \code{CTRL+C} in the console). In case of the latter, simply call \link{multi_run} again to resume pending requests. -When the request succeeded, the \code{done} callback gets triggerd with +When the request succeeded, the \code{done} callback gets triggered with the response data. The structure if this data is identical to \link{curl_fetch_memory}. When the request fails, the \code{fail} callback is triggered with an error message. Note that failure here means something went wrong in performing the diff --git a/additionalPackages/curl/man/multipart.Rd b/additionalPackages/curl/man/multipart.Rd index f41a5f62b..1fdff9797 100644 --- a/additionalPackages/curl/man/multipart.Rd +++ b/additionalPackages/curl/man/multipart.Rd @@ -3,7 +3,6 @@ \name{multipart} \alias{multipart} \alias{form_file} -\alias{multipart} \alias{form_data} \title{POST files or data} \usage{ diff --git a/additionalPackages/curl/src/Makevars.win b/additionalPackages/curl/src/Makevars.win index 3bc1e7ff5..c6161dba3 100644 --- a/additionalPackages/curl/src/Makevars.win +++ b/additionalPackages/curl/src/Makevars.win @@ -1,4 +1,4 @@ -VERSION=7.56.1 +VERSION=7.59.0 PKG_LIBS= -L../windows/libcurl-$(VERSION)/lib${R_ARCH} \ -L. -lwinhttp -lcurl-dualssl -lssh2 -lz -lssl -lcrypto -lgdi32 -lws2_32 -lcrypt32 -lwldap32 diff --git a/additionalPackages/curl/src/handle.c b/additionalPackages/curl/src/handle.c index 9d67689fe..6e1e0e741 100644 --- a/additionalPackages/curl/src/handle.c +++ b/additionalPackages/curl/src/handle.c @@ -173,6 +173,7 @@ int opt_is_linked_list(int key) { key == 10023 || // CURLOPT_HTTPHEADER key == 10024 || // CURLOPT_HTTPPOST key == 10070 || // CURLOPT_TELNETOPTIONS + key == 10104 || // CURLOPT_HTTP200ALIASES key == 10228; // CURLOPT_PROXYHEADER } diff --git a/additionalPackages/curl/tests/testthat/helper-version.R b/additionalPackages/curl/tests/testthat/helper-version.R index 6438a8b0b..c3a8e3a10 100644 --- a/additionalPackages/curl/tests/testthat/helper-version.R +++ b/additionalPackages/curl/tests/testthat/helper-version.R @@ -6,8 +6,10 @@ find_test_server <- function(){ # Try to download latest test-server list servers <- tryCatch({ - req <- curl_fetch_memory("http://jeroen.github.io/curl/servers", handle = h) - strsplit(rawToChar(req$content), "\n", fixed = TRUE)[[1]] + con <- curl::curl("https://jeroen.github.io/curl/servers.R", handle = h) + on.exit(close(con)) + out <- source(con, local = TRUE) + out$value }, error = function(e){ message("Failed to download server list:", e$message) c("https://eu.httpbin.org", "https://httpbin.org", "http://httpbin.org") diff --git a/additionalPackages/curl/tests/testthat/test-idn.R b/additionalPackages/curl/tests/testthat/test-idn.R index 1c6b36e20..0907d22d0 100644 --- a/additionalPackages/curl/tests/testthat/test-idn.R +++ b/additionalPackages/curl/tests/testthat/test-idn.R @@ -3,16 +3,17 @@ context("IDN") test_that("IDN domain names",{ # OSX does not support IDN by default :( skip_if_not(curl_version()$idn, "libcurl does not have libidn") + skip_on_cran() - malmo <- "http://www.malm\u00F6.se" - expect_is(curl::curl_fetch_memory(enc2utf8(malmo))$status_code, "integer") - expect_is(curl::curl_fetch_memory(enc2native(malmo))$status_code, "integer") + koln <- "http://www.köln.de" + expect_is(curl::curl_fetch_memory(enc2utf8(koln))$status_code, "integer") + expect_is(curl::curl_fetch_memory(enc2native(koln))$status_code, "integer") - con <- curl::curl(enc2utf8(malmo)) + con <- curl::curl(enc2utf8(koln)) expect_is(readLines(con, warn = FALSE), "character") close(con) - con <- curl::curl(enc2native(malmo)) + con <- curl::curl(enc2native(koln)) expect_is(readLines(con, warn = FALSE), "character") close(con) diff --git a/additionalPackages/curl/tests/testthat/test-multi.R b/additionalPackages/curl/tests/testthat/test-multi.R index 48b635113..f0c3f9ebc 100644 --- a/additionalPackages/curl/tests/testthat/test-multi.R +++ b/additionalPackages/curl/tests/testthat/test-multi.R @@ -2,7 +2,7 @@ context("Multi handle") test_that("Max connections works", { skip_on_os("solaris") - skip_if_not(curl_version()$version >= as.numeric_version("7.30"), + skip_if_not(strsplit(curl_version()$version, "-")[[1]][1] >= as.numeric_version("7.30"), "libcurl does not support host_connections") multi_set(host_con = 2, multiplex = FALSE) for(i in 1:3){ @@ -154,6 +154,18 @@ test_that("callback protection", { expect_equal(out$success, 1) }) +test_that("host_con works via and multi_fdset", { + pool <- new_pool(host_con = 3) + for (i in 4:0) { + h1 <- new_handle(url = httpbin(paste0("delay/", i))) + multi_add(h1, done = force, fail = cat, pool = pool) + } + for(i in 4:0){ + res <- multi_run(pool = pool, poll = 1) + expect_length(multi_fdset(pool = pool)$reads, min(3, i)) + } +}) + test_that("GC works", { gc() expect_equal(total_handles(), 0L) diff --git a/additionalPackages/curl/vignettes/intro.Rmd b/additionalPackages/curl/vignettes/intro.Rmd index b151523ee..1d90f74f4 100644 --- a/additionalPackages/curl/vignettes/intro.Rmd +++ b/additionalPackages/curl/vignettes/intro.Rmd @@ -85,10 +85,11 @@ The example shows how to use `readLines` on an opened connection to read `n` lin #### Non blocking connections -As of version 2.3 it is also possible to open connetions in non-blocking mode. In this case `readBin` and `readLines` will return immediately with data that is available without waiting. For non-blocking connections we use `isIncomplete` to check if the download has completed yet. +As of version 2.3 it is also possible to open connections in non-blocking mode. In this case `readBin` and `readLines` will return immediately with data that is available without waiting. For non-blocking connections we use `isIncomplete` to check if the download has completed yet. -```{r} -con <- curl("https://httpbin.org/drip?duration=1&numbytes=50") +```{r, eval=FALSE} +# This httpbin mirror doesn't cache +con <- curl("https://nghttp2.org/httpbin/drip?duration=1&numbytes=50") open(con, "rb", blocking = FALSE) while(isIncomplete(con)){ buf <- readBin(con, raw(), 1024) @@ -138,7 +139,7 @@ The `curl` and `curl_download` functions are safest to use because they automati ```{r} # This is OK -curl_download('https://cran.r-project.org/CRAN_mirrors.csv', 'mirrors.csv') +curl_download('https://cloud.r-project.org/CRAN_mirrors.csv', 'mirrors.csv') mirros <- read.csv('mirrors.csv') unlink('mirrors.csv') ``` @@ -147,8 +148,8 @@ If the HTTP request was unsuccessful, R will not continue: ```{r, error=TRUE, purl = FALSE} # Oops! A typo in the URL! -curl_download('https://cran.r-project.org/CRAN_mirrorZ.csv', 'mirrors.csv') -con <- curl('https://cran.r-project.org/CRAN_mirrorZ.csv') +curl_download('https://cloud.r-project.org/CRAN_mirrorZ.csv', 'mirrors.csv') +con <- curl('https://cloud.r-project.org/CRAN_mirrorZ.csv') open(con) ``` @@ -163,7 +164,7 @@ rm(con) When using any of the `curl_fetch_*` functions it is important to realize that these do **not** raise an error if the request was completed but returned a non-200 status code. When using `curl_fetch_memory` or `curl_fetch_disk` you need to implement such application logic yourself and check if the response was successful. ```{r} -req <- curl_fetch_memory('https://cran.r-project.org/CRAN_mirrors.csv') +req <- curl_fetch_memory('https://cloud.r-project.org/CRAN_mirrors.csv') print(req$status_code) ``` @@ -171,7 +172,7 @@ Same for downloading to disk. If you do not check your status, you might have do ```{r} # Oops a typo! -req <- curl_fetch_disk('https://cran.r-project.org/CRAN_mirrorZ.csv', 'mirrors.csv') +req <- curl_fetch_disk('https://cloud.r-project.org/CRAN_mirrorZ.csv', 'mirrors.csv') print(req$status_code) # This is not the CSV file we were expecting! @@ -183,7 +184,7 @@ If you *do* want the `curl_fetch_*` functions to automatically raise an error, y ```{r, error=TRUE, purl = FALSE} h <- new_handle(failonerror = TRUE) -curl_fetch_memory('https://cran.r-project.org/CRAN_mirrorZ.csv', handle = h) +curl_fetch_memory('https://cloud.r-project.org/CRAN_mirrorZ.csv', handle = h) ``` ## Customizing requests diff --git a/source/SVN-REVISION b/source/SVN-REVISION index 2937f4c5e..8842b3359 100644 --- a/source/SVN-REVISION +++ b/source/SVN-REVISION @@ -1,2 +1,2 @@ -Revision: 73796 -Last Changed Date: 2017-11-30 +Revision: 74408 +Last Changed Date: 2018-03-15 diff --git a/source/VERSION b/source/VERSION index 6cb9d3dd0..f9892605c 100644 --- a/source/VERSION +++ b/source/VERSION @@ -1 +1 @@ -3.4.3 +3.4.4 diff --git a/source/VERSION-NICK b/source/VERSION-NICK index 214bdec87..48e53dd15 100644 --- a/source/VERSION-NICK +++ b/source/VERSION-NICK @@ -1 +1 @@ -Kite-Eating Tree +Someone to Lean On diff --git a/source/configure b/source/configure index caa8cc34b..a31471925 100755 --- a/source/configure +++ b/source/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for R 3.4.3. +# Generated by GNU Autoconf 2.69 for R 3.4.4. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='R' PACKAGE_TARNAME='R' -PACKAGE_VERSION='3.4.3' -PACKAGE_STRING='R 3.4.3' +PACKAGE_VERSION='3.4.4' +PACKAGE_STRING='R 3.4.4' PACKAGE_BUGREPORT='https://bugs.r-project.org' PACKAGE_URL='https://www.r-project.org' @@ -1703,7 +1703,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures R 3.4.3 to adapt to many kinds of systems. +\`configure' configures R 3.4.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1778,7 +1778,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of R 3.4.3:";; + short | recursive ) echo "Configuration of R 3.4.4:";; esac cat <<\_ACEOF @@ -2065,7 +2065,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -R configure 3.4.3 +R configure 3.4.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -3217,7 +3217,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by R $as_me 3.4.3, which was +It was created by R $as_me 3.4.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -27662,6 +27662,7 @@ if test "${GCC}" = yes; then esac shlib_ldflags="-shared" fi +## G77 includes gfortran if test "${G77}" = yes; then case "${host_cpu}" in sparc*|ppc64*|powerpc64*|s390*) @@ -27672,6 +27673,12 @@ if test "${G77}" = yes; then ;; esac fi +## Assume flang is the same as clang (it is a modified front end) +case "${F77}" in + *flang) + fpicflags=${cpicflags} + ;; +esac if test "${GXX}" = yes; then case "${host_cpu}" in sparc*|ppc64*|powerpc64*|s390*) @@ -27891,6 +27898,7 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;} if test "${GCC}" = yes; then cpicflags="-fPIC" fi + ## G77 includes gfortran if test "${G77}" = yes; then fpicflags="-fPIC" fi @@ -27928,7 +27936,7 @@ $as_echo "$as_me: WARNING: Use of flat namespace is requested by user." >&2;} fi fi fi - ## G77 include gfortran + ## G77 includes gfortran if test "${G77}" != yes; then fpicflags="-PIC" else @@ -35677,6 +35685,10 @@ if test "$ac_res" != no; then : fi +## -lnsl is needed on Solaris +## 2018: Sun RPC is being unbundled from glibc, at least in Fedora 28 +## (https://fedoraproject.org/wiki/Changes/SunRPCRemoval) +## Use libtirpc instead, which has been a possible source since ca 2007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing xdr_string" >&5 $as_echo_n "checking for library containing xdr_string... " >&6; } if ${ac_cv_search_xdr_string+:} false; then : @@ -41109,11 +41121,11 @@ BITMAP_CPPFLAGS= BITMAP_LIBS= if test "${use_jpeglib}" = yes; then save_CPPFLAGS=${CPPFLAGS} - ## jpeglib does not support pkg-config, although some OSes add it. - ## This is untested. - if "${PKGCONF}" --exists jpeg; then - JPG_CPPFLAGS=`"${PKGCONF}" --cflags jpeg` - JPG_LIBS=`"${PKGCONF}" --libs jpeg` + ## IJG version 9c (Jan 2018) has support as libjpeg. + ## libjpeg-turbo has had this for a while. + if "${PKGCONF}" --exists libjpeg; then + JPG_CPPFLAGS=`"${PKGCONF}" --cflags libjpeg` + JPG_LIBS=`"${PKGCONF}" --libs libjpeg` CPPFLAGS="${CPPFLAGS} ${JPG_CPPFLAGS}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jpeglib version >= 6b" >&5 @@ -46274,6 +46286,9 @@ case "${host_os}" in *pgf95|*pgf90) fcpicflags="-fpic" ;; + *flang) + fcpicflags=${cpicflags} + ;; esac ;; solaris*) @@ -51362,7 +51377,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by R $as_me 3.4.3, which was +This file was extended by R $as_me 3.4.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -51429,7 +51444,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -R config.status 3.4.3 +R config.status 3.4.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/source/configure.ac b/source/configure.ac index f34744df3..330d79afa 100644 --- a/source/configure.ac +++ b/source/configure.ac @@ -1233,6 +1233,7 @@ if test "${GCC}" = yes; then esac shlib_ldflags="-shared" fi +## G77 includes gfortran if test "${G77}" = yes; then case "${host_cpu}" in sparc*|ppc64*|powerpc64*|s390*) @@ -1243,6 +1244,12 @@ if test "${G77}" = yes; then ;; esac fi +## Assume flang is the same as clang (it is a modified front end) +case "${F77}" in + *flang) + fpicflags=${cpicflags} + ;; +esac if test "${GXX}" = yes; then case "${host_cpu}" in sparc*|ppc64*|powerpc64*|s390*) @@ -1452,6 +1459,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c if test "${GCC}" = yes; then cpicflags="-fPIC" fi + ## G77 includes gfortran if test "${G77}" = yes; then fpicflags="-fPIC" fi @@ -1489,7 +1497,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c fi fi fi - ## G77 include gfortran + ## G77 includes gfortran if test "${G77}" != yes; then fpicflags="-PIC" else @@ -1995,6 +2003,10 @@ AC_CHECK_DECLS([mkdtemp, strdup, strncasecmp]) AC_SEARCH_LIBS(connect, [socket]) # gethostbyname was removed in POSIX 2008 (in favour of getaddrinfo, POSIX 2001) AC_SEARCH_LIBS(gethostbyname, [nsl socket]) +## -lnsl is needed on Solaris +## 2018: Sun RPC is being unbundled from glibc, at least in Fedora 28 +## (https://fedoraproject.org/wiki/Changes/SunRPCRemoval) +## Use libtirpc instead, which has been a possible source since ca 2007 AC_SEARCH_LIBS(xdr_string, [nsl tirpc]) R_FUNC_CALLOC if test "${ac_cv_have_decl_isfinite}" = "yes"; then @@ -2515,6 +2527,9 @@ case "${host_os}" in *pgf95|*pgf90) fcpicflags="-fpic" ;; + *flang) + fcpicflags=${cpicflags} + ;; esac ;; solaris*) diff --git a/source/doc/COPYRIGHTS b/source/doc/COPYRIGHTS index 2510dc93d..3f97cde24 100644 --- a/source/doc/COPYRIGHTS +++ b/source/doc/COPYRIGHTS @@ -286,16 +286,16 @@ THE SOFTWARE. src/modules/lapack/dlapack.f, cmplx.f, dlamc.f Extracted from - * -- LAPACK computational routine (version 3.7.1) -- + * -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- - * June 2017 + * November 2017 where the version number, providers and date vary by subroutine. For version 3.7.0, many of the copyright dates were updated even for routines which have not been changed for years. - LAPACK 3.7.1 contains a LICENSE file, copied to src/modules/lapack + LAPACK 3.8.0 contains a LICENSE file, copied to src/modules/lapack (but many of these routines were originally copied from earlier versions of LAPACK). For binary distributions it is reproduced here: diff --git a/source/doc/NEWS b/source/doc/NEWS index 199cb2046..911cc88b3 100644 --- a/source/doc/NEWS +++ b/source/doc/NEWS @@ -1,5 +1,62 @@ R News +CHANGES IN R 3.4.4: + + NEW FEATURES: + + * Sys.timezone() tries more heuristics on Unix-alikes and so is + more likely to succeed (especially on Linux). For the slowest + method, a warning is given recommending that TZ is set to avoid + the search. + + * The version of LAPACK included in the sources has been updated to + 3.8.0 (for the routines used by R, a very minor bug-fix change). + + * parallel::detectCores(logical = FALSE) is ignored on Linux + systems, since the information is not available with virtualized + OSes. + + INSTALLATION on a UNIX-ALIKE: + + * configure will use pkg-config to find the flags to link to jpeg + if available (as it should be for the recently-released jpeg-9c + and libjpeg-turbo). (This amends the code added in R 3.3.0 as + the module name in jpeg-9c is not what that tested for.) + + DEPRECATED AND DEFUNCT: + + * Sys.timezone(location = FALSE) (which was a stop-gap measure for + Windows long ago) is deprecated. It no longer returns the value + of environment variable TZ (usually a location). + + * Legacy support of make macros such as CXX1X is formally + deprecated: use the CXX11 forms instead. + + BUG FIXES: + + * power.prop.test() now warns when it cannot solve the problem, + typically because of impossible constraints. (PR#17345) + + * removeSource() no longer erroneously removes NULL in certain + cases, thanks to D'enes T'oth. + + * nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now work. (Partly from + PR#17367) + + * R CMD build checks for GNU cp rather than assuming Linux has it. + (PR#17370 says 'Alpine Linux' does not.) + + * Non-UTF-8 multibyte character handling fixed more permanently + (PR#16732). + + * sum(, ) is more consistent. (PR#17372) + + * rf() and rbeta() now also work correctly when ncp is not scalar, + notably when (partly) NA. (PR#17375) + + * R CMD INSTALL now correctly sets C++ compiler flags when all + source files are in sub-directories of src. + CHANGES IN R 3.4.3: INSTALLATION on a UNIX-ALIKE: @@ -682,7 +739,7 @@ CHANGES IN R 3.4.0: * An alternative compiler for C++11 is now specified with CXX11, not CXX1X. Likewise C++11 flags are specified with CXX11FLAGS and - the standard (e.g., -std=gnu++11 is specified with CXX11STD. + the standard (e.g., -std=gnu++11) is specified with CXX11STD. * configure now tests for a C++14-compliant compiler by testing some basic features. This by default tries flags for the @@ -2257,7 +2314,7 @@ CHANGES IN R 3.2.2: * polym() gains a coefs = NULL argument and returns class "poly" just like poly() which gets a new simple=FALSE option. They now lead to correct predict()ions, e.g., on subsets of the original - data. + data. (PR#16239) * rhyper(nn, ) now works correctly. (PR#16489) diff --git a/source/doc/NEWS.2.Rd b/source/doc/NEWS.2.Rd index 93dfcc3db..c1bb2fcc6 100644 --- a/source/doc/NEWS.2.Rd +++ b/source/doc/NEWS.2.Rd @@ -468,7 +468,7 @@ In interactive use it will ask whether to choose the source version of a package if the binary version is older and contains compiled code, and also asks if source packages with no binary - version should be installed). + version should be installed. } } @@ -682,7 +682,7 @@ \sQuote{spectral} or 2-norm) as well, mainly for didactical completeness. - \item \code{pmin()} and \code{pmax())} now also work when one of + \item \code{pmin()} and \code{pmax()} now also work when one of the inputs is of length zero and others are not, returning a zero-length vector, analogously to, say, \code{+}. @@ -941,7 +941,7 @@ active could abort the \R process. \item \code{getMethod(f, sig)} produced an incorrect error message - in some cases when \code{f} was not a string). + in some cases when \code{f} was not a string. \item Using a string as a \dQuote{call} in an error condition with \code{options(showErrorCalls=TRUE)} could cause a segfault. @@ -1674,7 +1674,7 @@ \item \code{tools::deparseLatex(dropBraces=TRUE)} could drop text as well as braces. - \item \code{colormodel = "grey"} (new in \R 2.14.0)) + \item \code{colormodel = "grey"} (new in \R 2.14.0) did not always work in \code{postscript()} and \code{pdf()}. \item \code{file.append()} could return \code{TRUE} for failures. @@ -4465,7 +4465,7 @@ It avoids the use of \command{texindy} by \command{texinfo}'s \command{texi2dvi >= 1.157}, since that does not emulate 'makeindex' well enough to avoid problems with special characters - (such as \samp{(}, \samp{\{}, \samp{!}) in indices. + (such as \samp{(}, \samp{\{}, \samp{!}) in indices. % ) \item The ability of \code{readLines()} and \code{scan()} to re-encode inputs to marked UTF-8 strings on Windows since \R 2.7.0 diff --git a/source/doc/NEWS.Rd b/source/doc/NEWS.Rd index e70347589..de06f921f 100644 --- a/source/doc/NEWS.Rd +++ b/source/doc/NEWS.Rd @@ -5,6 +5,77 @@ \title{R News} \encoding{UTF-8} +\section{\Rlogo CHANGES IN R 3.4.4}{ + + \subsection{NEW FEATURES}{ + \itemize{ + \item \code{Sys.timezone()} tries more heuristics on Unix-alikes and so + is more likely to succeed (especially on Linux). For the slowest + method, a warning is given recommending that \env{TZ} is set to + avoid the search. + + \item The version of LAPACK included in the sources has been + updated to 3.8.0 (for the routines used by \R, a very minor bug-fix + change). + + \item \code{parallel::detectCores(logical = FALSE)} is ignored on + Linux systems, since the information is not available with + virtualized OSes. + } + } + + \subsection{INSTALLATION on a UNIX-ALIKE}{ + \itemize{ + \item \command{configure} will use \command{pkg-config} to find the + flags to link to \code{jpeg} if available (as it should be for the + recently-released \code{jpeg-9c} and \code{libjpeg-turbo}). (This + amends the code added in \R 3.3.0 as the module name in + \code{jpeg-9c} is not what that tested for.) + } + } + + \subsection{DEPRECATED AND DEFUNCT}{ + \itemize{ + \item \code{Sys.timezone(location = FALSE)} (which was a stop-gap + measure for Windows long ago) is deprecated. It no longer returns + the value of environment variable \env{TZ} (usually a location). + + \item Legacy support of \command{make} macros such as \samp{CXX1X} + is formally deprecated: use the \samp{CXX11} forms instead. + } + } + + \subsection{BUG FIXES}{ + \itemize{ + \item \code{power.prop.test()} now warns when it cannot solve the + problem, typically because of impossible constraints. (\PR{17345}) + + \item \code{removeSource()} no longer erroneously removes + \code{NULL} in certain cases, thanks to Dénes Tóth. + + \item \code{nls(`NO [mol/l]` ~ f(t))} and \code{nls(y ~ a)} now + work. (Partly from \PR{17367}) + + \item \command{R CMD build} checks for GNU \command{cp} rather + than assuming Linux has it. (\PR{17370} says \sQuote{Alpine + Linux} does not.) + + \item Non-UTF-8 multibyte character handling fixed more + permanently (\PR{16732}). + + \item \code{sum(, )} is more consistent. + (\PR{17372}) + + \item \code{rf()} and \code{rbeta()} now also work correctly when + \code{ncp} is not scalar, notably when (partly) \code{NA}. + (\PR{17375}) + + \item \command{R CMD INSTALL} now correctly sets C++ compiler flags + when all source files are in sub-directories of \file{src}. + } + } +} + \section{\Rlogo CHANGES IN R 3.4.3}{ \subsection{INSTALLATION on a UNIX-ALIKE}{ @@ -762,7 +833,7 @@ \item An alternative compiler for C++11 is now specified with \samp{CXX11}, not \samp{CXX1X}. Likewise C++11 flags are specified - with \samp{CXX11FLAGS} and the standard (e.g., \samp{-std=gnu++11} + with \samp{CXX11FLAGS} and the standard (e.g., \samp{-std=gnu++11}) is specified with \samp{CXX11STD}. \item \command{configure} now tests for a C++14-compliant compiler @@ -2551,7 +2622,7 @@ returns class \code{"poly"} just like \code{poly()} which gets a new \code{simple=FALSE} option. They now lead to correct \code{predict()}ions, e.g., on subsets of the original data. - %% see https://stat.ethz.ch/pipermail/r-devel/2015-July/071532.html + (\PR{16239}) \item \code{rhyper(nn, )} now works correctly. (\PR{16489}) diff --git a/source/doc/NEWS.pdf b/source/doc/NEWS.pdf index 25e119686..f5656e9a8 100644 Binary files a/source/doc/NEWS.pdf and b/source/doc/NEWS.pdf differ diff --git a/source/doc/html/NEWS.html b/source/doc/html/NEWS.html index 0a6872bc7..3fbb5a112 100644 --- a/source/doc/html/NEWS.html +++ b/source/doc/html/NEWS.html @@ -7,6 +7,108 @@

R News

+

CHANGES IN R 3.4.4

+ + + +

NEW FEATURES

+ + +
    +
  • Sys.timezone() tries more heuristics on Unix-alikes and so +is more likely to succeed (especially on Linux). For the slowest +method, a warning is given recommending that TZ is set to +avoid the search. +

    +
  • +
  • The version of LAPACK included in the sources has been +updated to 3.8.0 (for the routines used by R, a very minor bug-fix +change). +

    +
  • +
  • parallel::detectCores(logical = FALSE) is ignored on +Linux systems, since the information is not available with +virtualized OSes. +

    +
+ + + + +

INSTALLATION on a UNIX-ALIKE

+ + +
    +
  • configure will use pkg-config to find the +flags to link to jpeg if available (as it should be for the +recently-released jpeg-9c and libjpeg-turbo). (This +amends the code added in R 3.3.0 as the module name in +jpeg-9c is not what that tested for.) +

    +
+ + + + +

DEPRECATED AND DEFUNCT

+ + +
    +
  • Sys.timezone(location = FALSE) (which was a stop-gap +measure for Windows long ago) is deprecated. It no longer returns +the value of environment variable TZ (usually a location). +

    +
  • +
  • Legacy support of make macros such as CXX1X +is formally deprecated: use the CXX11 forms instead. +

    +
+ + + + +

BUG FIXES

+ + +
    +
  • power.prop.test() now warns when it cannot solve the +problem, typically because of impossible constraints. (PR#17345) +

    +
  • +
  • removeSource() no longer erroneously removes +NULL in certain cases, thanks to Dénes Tóth. +

    +
  • +
  • nls(`NO [mol/l]` ~ f(t)) and nls(y ~ a) now +work. (Partly from PR#17367) +

    +
  • +
  • R CMD build checks for GNU cp rather +than assuming Linux has it. (PR#17370 says ‘Alpine +Linux’ does not.) +

    +
  • +
  • Non-UTF-8 multibyte character handling fixed more +permanently (PR#16732). +

    +
  • +
  • sum(<large ints>, <stuff>) is more consistent. +(PR#17372) +

    +
  • +
  • rf() and rbeta() now also work correctly when +ncp is not scalar, notably when (partly) NA. +(PR#17375) +

    +
  • +
  • R CMD INSTALL now correctly sets C++ compiler flags +when all source files are in sub-directories of ‘src’. +

    +
+ + + +

CHANGES IN R 3.4.3

@@ -963,7 +1065,7 @@

INSTALLATION on a UNIX-ALIKE

  • An alternative compiler for C++11 is now specified with CXX11, not CXX1X. Likewise C++11 flags are specified -with CXX11FLAGS and the standard (e.g., -std=gnu++11 +with CXX11FLAGS and the standard (e.g., -std=gnu++11) is specified with CXX11STD.

  • @@ -3299,7 +3401,7 @@

    BUG FIXES

    returns class "poly" just like poly() which gets a new simple=FALSE option. They now lead to correct predict()ions, e.g., on subsets of the original data. - +(PR#16239)

  • rhyper(nn, <large>) now works correctly. (PR#16489) diff --git a/source/doc/html/R-admin.html b/source/doc/html/R-admin.html index abbbdb5ff..7f3cc3377 100644 --- a/source/doc/html/R-admin.html +++ b/source/doc/html/R-admin.html @@ -1,8 +1,8 @@ - 2 x "Tracing ..." +# and turn it off: +untrace(expression(ar.yw, ar.yw.default), where = ar) + + \dontrun{ ## trace calls to the function lm() that come from ## the nlme package. diff --git a/source/src/library/datasets/man/ToothGrowth.Rd b/source/src/library/datasets/man/ToothGrowth.Rd index 2e1a044c2..7e33aab52 100644 --- a/source/src/library/datasets/man/ToothGrowth.Rd +++ b/source/src/library/datasets/man/ToothGrowth.Rd @@ -11,7 +11,7 @@ The response is the length of odontoblasts (cells responsible for tooth growth) in 60 guinea pigs. Each animal received one of three dose levels of vitamin C (0.5, 1, and 2 mg/day) by one of two delivery - methods, (orange juice or ascorbic acid (a form of vitamin C and coded + methods, orange juice or ascorbic acid (a form of vitamin C and coded as \code{VC}). } \usage{ToothGrowth} diff --git a/source/src/library/grDevices/man/colorRamp.Rd b/source/src/library/grDevices/man/colorRamp.Rd index 730410584..590e4f80e 100644 --- a/source/src/library/grDevices/man/colorRamp.Rd +++ b/source/src/library/grDevices/man/colorRamp.Rd @@ -50,7 +50,7 @@ colorRampPalette(colors, \dots) \code{colorRampPalette} returns a function that takes an integer argument (the required number of colors) and returns a character vector of colors (see \code{\link{rgb}}) interpolating the given sequence - (similar to \code{\link{heat.colors}} or \code{\link{terrain.colors}}. + (similar to \code{\link{heat.colors}} or \code{\link{terrain.colors}}). } \seealso{ diff --git a/source/src/library/grDevices/man/dev.Rd b/source/src/library/grDevices/man/dev.Rd index 24f01d07c..1ae8a5b06 100644 --- a/source/src/library/grDevices/man/dev.Rd +++ b/source/src/library/grDevices/man/dev.Rd @@ -39,7 +39,7 @@ graphics.off() which all graphics operations occur. There is a \code{"null device"} which is always open but is really a placeholder: any attempt to use it will open a new device specified by - \code{\link{getOption}("device")}). + \code{\link{getOption}("device")}. Devices are associated with a name (e.g., \code{"X11"} or \code{"postscript"}) and a number in the range 1 to 63; the diff --git a/source/src/library/grDevices/man/grSoftVersion.Rd b/source/src/library/grDevices/man/grSoftVersion.Rd index 9b797ebbe..a7b0da7a7 100644 --- a/source/src/library/grDevices/man/grSoftVersion.Rd +++ b/source/src/library/grDevices/man/grSoftVersion.Rd @@ -1,6 +1,6 @@ % File src/library/grDevices/man/grSoftVersion.Rd % Part of the R package, https://www.R-project.org -% Copyright 2014 R Core Team +% Copyright 2014-2017 R Core Team % Distributed under GPL 2 or later \name{grSoftVersion} @@ -13,31 +13,38 @@ grSoftVersion() } \value{ - A named character vector containing at least the element + A named character vector containing at least the elements \item{cairo}{the version of cairographics in use, or \code{""} if cairographics is not available.} - It may also contain the versions of third-party software used - by the + It may also contain the versions of third-party software used by the #ifdef windows standard #endif #ifdef unix X11-based #endif - (not cairo-based) bitmap devices: + bitmap devices: \item{libpng}{the version of \code{libpng} in use, or \code{""} if not available.} \item{jpeg}{the version of the JPEG headers used for compilation, or \code{""} if JPEG support was not compiled in.} \item{libtiff}{the version of \code{libtiff} in use, or \code{""} if not available.} - + + It is conceivable but unlikely that the cairo-based bitmap devices + will use different versions linked \emph{via} cairographics, + especially \code{png(type = "cairo-png")}. +#ifdef unix + If available on macOS, the Quartz-based devices will use the system + versions of these libraries rather than those reported here. +#endif + Unless otherwise stated the reported version is that of the (possibly dynamically-linked) library in use at runtime. - Note that \code{libjpeg-turbo} used on some Linux distributions + Note that \code{libjpeg-turbo} as used on some Linux distributions reports its version as \code{"6.2"}, the IJG version from which it forked. } diff --git a/source/src/library/grDevices/man/postscript.Rd b/source/src/library/grDevices/man/postscript.Rd index 01708ce6f..57af5e507 100644 --- a/source/src/library/grDevices/man/postscript.Rd +++ b/source/src/library/grDevices/man/postscript.Rd @@ -310,7 +310,7 @@ postscript(file = if(onefile) "Rplots.ps" else "Rplot\%03d.ps", (\url{https://en.wikipedia.org/wiki/CMYK_color_model#Mapping_RGB_to_CMYK}), and raster images are output in RGB. - Color models provided for backwards compatibility are \code{"rgb"}) + Color models provided for backwards compatibility are \code{"rgb"} (which is RGB+gray) and \code{"rgb-nogray"} which use uncalibrated RGB (as used in \R prior to 2.13.0). These result in slightly smaller files which may render faster, but do rely on the viewer being diff --git a/source/src/library/grDevices/man/unix/savePlot.Rd b/source/src/library/grDevices/man/unix/savePlot.Rd index 3653fba74..2b2cd86ab 100644 --- a/source/src/library/grDevices/man/unix/savePlot.Rd +++ b/source/src/library/grDevices/man/unix/savePlot.Rd @@ -1,6 +1,6 @@ % File src/library/grDevices/man/windows/savePlot.Rd % Part of the R package, https://www.R-project.org -% Copyright 2008-9 R Core Team +% Copyright 2008-2018 R Core Team % Distributed under GPL 2 or later \name{savePlot} @@ -16,8 +16,7 @@ savePlot(filename = paste("Rplot", type, sep = "."), } \arguments{ \item{filename}{filename to save to.} - \item{type}{file type: only \code{"png"} will be accepted for cairo - version 1.0.} + \item{type}{file type.} \item{device}{the device to save from.} } \details{ @@ -30,9 +29,9 @@ savePlot(filename = paste("Rplot", type, sep = "."), For devices with buffering this copies the buffer's image surface, so works even if \code{\link{dev.hold}} has been called. - At present the plot is saved after rendering onto the canvas (default - opaque white), so for the default \code{bg = "transparent"} the - effective background colour is the canvas colour. + The plot is saved after rendering onto the canvas (default opaque + white), so for the default \code{bg = "transparent"} the effective + background colour is the canvas colour. } \value{ Invisible \code{NULL}. @@ -40,7 +39,8 @@ savePlot(filename = paste("Rplot", type, sep = "."), \note{ There is a similar function of the same name but more types for - \code{windows} devices on Windows. + \code{windows} devices on Windows: that has an additional argument + \code{restoreConsole} which is only supported on Windows. } \seealso{ diff --git a/source/src/library/grDevices/man/unix/x11.Rd b/source/src/library/grDevices/man/unix/x11.Rd index 9bcd1bc2d..40ef155aa 100644 --- a/source/src/library/grDevices/man/unix/x11.Rd +++ b/source/src/library/grDevices/man/unix/x11.Rd @@ -216,7 +216,7 @@ X11.options(\dots, reset = FALSE) % https://bugs.launchpad.net/ubuntu/+source/fontconfig/+bug/551977 Problems with incorrect rendering of symbols (e.g., of - \code{quote(pi)} and \code{expression(10^degree))}) + \code{quote(pi)} and \code{expression(10^degree)}) have been seen on Linux systems which have the Wine symbol font installed -- \code{fontconfig} then prefers this and misinterprets its encoding. Adding the following lines diff --git a/source/src/library/grDevices/man/windows/savePlot.Rd b/source/src/library/grDevices/man/windows/savePlot.Rd index e91cc98f6..cc526a612 100644 --- a/source/src/library/grDevices/man/windows/savePlot.Rd +++ b/source/src/library/grDevices/man/windows/savePlot.Rd @@ -1,6 +1,6 @@ % File src/library/grDevices/man/windows/savePlot.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2009 R Core Team +% Copyright 1995-2018 R Core Team % Distributed under GPL 2 or later \name{savePlot} @@ -15,13 +15,14 @@ savePlot(filename = "Rplot", } \arguments{ \item{filename}{The filename under which to save the plot. - Tilde-expansion (see \code{\link{path.expand}} is supported.} + Tilde-expansion (see \code{\link{path.expand}}) is supported.} \item{type}{The type of plot, Windows metafile, PNG, JPEG, BMP (Windows bitmap format), TIFF, PostScript or PDF.} \item{device}{A device number of a \code{windows} device, by default the current device.} \item{restoreConsole}{See the \sQuote{Details} section - of \code{\link{windows}}.} + of \code{\link{windows}}. Do not use this in programming without + first checking that the platform is Windows.} } \description{ Saves the current plot on a \code{windows} device to a file. @@ -52,7 +53,8 @@ savePlot(filename = "Rplot", \note{ There is a similar function of the same name but fewer types for - cairo-based \code{X11} devices on Unix-alikes + cairo-based \code{X11} devices on Unix-alikes, and without the + \code{restoreConsole} argument. } \seealso{ diff --git a/source/src/library/grDevices/man/windows/windows.options.Rd b/source/src/library/grDevices/man/windows/windows.options.Rd index e8db00dda..cc59c79a6 100644 --- a/source/src/library/grDevices/man/windows/windows.options.Rd +++ b/source/src/library/grDevices/man/windows/windows.options.Rd @@ -33,7 +33,7 @@ windows.options(\dots, reset = FALSE) values are applied. Option \code{antialias} applies to screen devices (\code{windows}, - \code{win.graph}, \code{X11} and \code{x11})). There is a separate option, + \code{win.graph}, \code{X11} and \code{x11}). There is a separate option, \code{bitmap.aa.win}, for bitmap devices with \code{type = "windows"}. } \value{ diff --git a/source/src/library/grDevices/tests/ps-tests.Rout.save b/source/src/library/grDevices/tests/ps-tests.Rout.save index 24eefa4be..4ba6cd21e 100644 --- a/source/src/library/grDevices/tests/ps-tests.Rout.save +++ b/source/src/library/grDevices/tests/ps-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -95,4 +95,4 @@ null device > > proc.time() user system elapsed - 0.550 0.040 0.572 + 0.530 0.032 0.547 diff --git a/source/src/library/grDevices/tests/xfig-tests.Rout.save b/source/src/library/grDevices/tests/xfig-tests.Rout.save index 6e436ad28..2e97af697 100644 --- a/source/src/library/grDevices/tests/xfig-tests.Rout.save +++ b/source/src/library/grDevices/tests/xfig-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -102,4 +102,4 @@ Type 'q()' to quit R. > > proc.time() user system elapsed - 0.224 0.036 0.240 + 0.190 0.033 0.202 diff --git a/source/src/library/graphics/man/mosaicplot.Rd b/source/src/library/graphics/man/mosaicplot.Rd index 30a254400..90ab4bba4 100644 --- a/source/src/library/graphics/man/mosaicplot.Rd +++ b/source/src/library/graphics/man/mosaicplot.Rd @@ -38,7 +38,7 @@ mosaicplot(x, \dots) \item{off}{vector of offsets to determine percentage spacing at each level of the mosaic (appropriate values are between 0 and 20, and the default is 20 times the number of splits for 2-dimensional - tables, and 10 otherwise. Rescaled to maximally 50, and recycled if + tables, and 10 otherwise). Rescaled to maximally 50, and recycled if necessary.} \item{dir}{vector of split directions (\code{"v"} for vertical and \code{"h"} for horizontal) for each level of the mosaic, one diff --git a/source/src/library/graphics/man/plot.dataframe.Rd b/source/src/library/graphics/man/plot.dataframe.Rd index 87962b70e..bdc3fa5bc 100644 --- a/source/src/library/graphics/man/plot.dataframe.Rd +++ b/source/src/library/graphics/man/plot.dataframe.Rd @@ -22,7 +22,7 @@ This is intended for data frames with \emph{numeric} columns. For more than two columns it first calls \code{\link{data.matrix}} to convert the data frame to a numeric matrix and then calls \code{\link{pairs}} - to produce a scatterplot matrix). This can fail and may well be + to produce a scatterplot matrix. This can fail and may well be inappropriate: for example numerical conversion of dates will lose their special meaning and a warning will be given. diff --git a/source/src/library/graphics/man/plot.raster.Rd b/source/src/library/graphics/man/plot.raster.Rd index 9ece703ee..296212d1a 100644 --- a/source/src/library/graphics/man/plot.raster.Rd +++ b/source/src/library/graphics/man/plot.raster.Rd @@ -15,9 +15,9 @@ \arguments{ \item{x, y}{raster. \code{y} will be ignored.} \item{xlim, ylim}{Limits on the plot region (default from dimensions - of the raster.} + of the raster).} \item{xaxs, yaxs}{Axis interval calculation style (default means that - raster fills plot region.} + raster fills plot region).} \item{asp}{Aspect ratio (default retains aspect ratio of the raster).} \item{add}{Logical indicating whether to simply add raster to an existing plot.} diff --git a/source/src/library/graphics/man/rasterImage.Rd b/source/src/library/graphics/man/rasterImage.Rd index 8b6b0402d..64feb53a7 100644 --- a/source/src/library/graphics/man/rasterImage.Rd +++ b/source/src/library/graphics/man/rasterImage.Rd @@ -36,7 +36,7 @@ rasterImage(image, Plotting raster images is not supported on all devices and may have limitations where supported, for example (e.g., for \code{postscript} - and \code{X11(type = "Xlib")}) is restricted to opaque colors). + and \code{X11(type = "Xlib")} is restricted to opaque colors). Problems with the rendering of raster images have been reported by users of \code{windows()} devices under Remote Desktop, at least under its default settings. diff --git a/source/src/library/graphics/man/rect.Rd b/source/src/library/graphics/man/rect.Rd index fa024cb1a..8166e1087 100644 --- a/source/src/library/graphics/man/rect.Rd +++ b/source/src/library/graphics/man/rect.Rd @@ -74,7 +74,7 @@ j <- 10*(0:5) rect(125+j, 360+j, 141+j, 405+j/2, col = c(NA,0), border = "gold", lwd = 2) rect(125+j, 296+j/2, 141+j, 331+j/5, col = c(NA,"midnightblue")) -mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\"))") +mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\")") ## an example showing colouring and shading plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "") diff --git a/source/src/library/grid/inst/doc/displaylist.pdf b/source/src/library/grid/inst/doc/displaylist.pdf index 989c2c0cd..51909f56d 100644 Binary files a/source/src/library/grid/inst/doc/displaylist.pdf and b/source/src/library/grid/inst/doc/displaylist.pdf differ diff --git a/source/src/library/grid/inst/doc/frame.pdf b/source/src/library/grid/inst/doc/frame.pdf index 971680d73..60b524e38 100644 Binary files a/source/src/library/grid/inst/doc/frame.pdf and b/source/src/library/grid/inst/doc/frame.pdf differ diff --git a/source/src/library/grid/inst/doc/grid.pdf b/source/src/library/grid/inst/doc/grid.pdf index 8a5d2c6e3..34660d52e 100644 Binary files a/source/src/library/grid/inst/doc/grid.pdf and b/source/src/library/grid/inst/doc/grid.pdf differ diff --git a/source/src/library/grid/inst/doc/grobs.pdf b/source/src/library/grid/inst/doc/grobs.pdf index a0c033c40..e813b52bf 100644 Binary files a/source/src/library/grid/inst/doc/grobs.pdf and b/source/src/library/grid/inst/doc/grobs.pdf differ diff --git a/source/src/library/grid/inst/doc/interactive.pdf b/source/src/library/grid/inst/doc/interactive.pdf index de1efc825..219bc5e0f 100644 Binary files a/source/src/library/grid/inst/doc/interactive.pdf and b/source/src/library/grid/inst/doc/interactive.pdf differ diff --git a/source/src/library/grid/inst/doc/locndimn.pdf b/source/src/library/grid/inst/doc/locndimn.pdf index e8fcbc7a4..e377a36a4 100644 Binary files a/source/src/library/grid/inst/doc/locndimn.pdf and b/source/src/library/grid/inst/doc/locndimn.pdf differ diff --git a/source/src/library/grid/inst/doc/moveline.pdf b/source/src/library/grid/inst/doc/moveline.pdf index da233b08a..ba598218f 100644 Binary files a/source/src/library/grid/inst/doc/moveline.pdf and b/source/src/library/grid/inst/doc/moveline.pdf differ diff --git a/source/src/library/grid/inst/doc/nonfinite.pdf b/source/src/library/grid/inst/doc/nonfinite.pdf index 1087f3b27..dd9fb6421 100644 Binary files a/source/src/library/grid/inst/doc/nonfinite.pdf and b/source/src/library/grid/inst/doc/nonfinite.pdf differ diff --git a/source/src/library/grid/inst/doc/plotexample.pdf b/source/src/library/grid/inst/doc/plotexample.pdf index 94c5dc0f7..d4b4589a8 100644 Binary files a/source/src/library/grid/inst/doc/plotexample.pdf and b/source/src/library/grid/inst/doc/plotexample.pdf differ diff --git a/source/src/library/grid/inst/doc/rotated.pdf b/source/src/library/grid/inst/doc/rotated.pdf index 38aad9db8..0ac45a307 100644 Binary files a/source/src/library/grid/inst/doc/rotated.pdf and b/source/src/library/grid/inst/doc/rotated.pdf differ diff --git a/source/src/library/grid/inst/doc/saveload.pdf b/source/src/library/grid/inst/doc/saveload.pdf index ff9c0990d..54909671d 100644 Binary files a/source/src/library/grid/inst/doc/saveload.pdf and b/source/src/library/grid/inst/doc/saveload.pdf differ diff --git a/source/src/library/grid/inst/doc/sharing.pdf b/source/src/library/grid/inst/doc/sharing.pdf index a97c8aa2f..3546361b7 100644 Binary files a/source/src/library/grid/inst/doc/sharing.pdf and b/source/src/library/grid/inst/doc/sharing.pdf differ diff --git a/source/src/library/grid/inst/doc/viewports.pdf b/source/src/library/grid/inst/doc/viewports.pdf index 56cc201c8..4f1b2fe58 100644 Binary files a/source/src/library/grid/inst/doc/viewports.pdf and b/source/src/library/grid/inst/doc/viewports.pdf differ diff --git a/source/src/library/grid/man/drawDetails.Rd b/source/src/library/grid/man/drawDetails.Rd index ef06570a6..81bd33505 100644 --- a/source/src/library/grid/man/drawDetails.Rd +++ b/source/src/library/grid/man/drawDetails.Rd @@ -36,7 +36,7 @@ postDrawDetails(x) \code{drawDetails} is called next and is where any additional calculations and graphical output should occur (see, for example, - \code{grid:::drawDetails.xaxis}. Note that the default behaviour + \code{grid:::drawDetails.xaxis}). Note that the default behaviour for gTrees is to draw all grobs in the \code{children} slot so there is typically nothing to do here. diff --git a/source/src/library/grid/man/grid.convert.Rd b/source/src/library/grid/man/grid.convert.Rd index 10946ff76..ac75cf7e2 100644 --- a/source/src/library/grid/man/grid.convert.Rd +++ b/source/src/library/grid/man/grid.convert.Rd @@ -76,7 +76,7 @@ convertUnit(x, unitTo, If the device is resized then at least some conversions will become invalid. For example, suppose that I create a unit object as follows: \code{oneinch <- convertUnit(unit(1, "inches"), - "native"}. Now if I resize the device, the unit object in + "native")}. Now if I resize the device, the unit object in oneinch no longer corresponds to a physical length of 1 inch. } \seealso{ \code{\link{unit}} } diff --git a/source/src/library/grid/man/makeContent.Rd b/source/src/library/grid/man/makeContent.Rd index bd9ff85f3..b252d4d5c 100644 --- a/source/src/library/grid/man/makeContent.Rd +++ b/source/src/library/grid/man/makeContent.Rd @@ -37,7 +37,7 @@ makeContent(x) \code{makeContent} is called next and is where any additional calculations should occur and graphical content should be generated (see, for example, - \code{grid:::makeContent.xaxis}. + \code{grid:::makeContent.xaxis}). This function should be used to \emph{modify} the \code{children} of a gTree. The function \emph{must} return the modified \code{x}. diff --git a/source/src/library/grid/man/stringWidth.Rd b/source/src/library/grid/man/stringWidth.Rd index b7e9e498c..eb744151a 100644 --- a/source/src/library/grid/man/stringWidth.Rd +++ b/source/src/library/grid/man/stringWidth.Rd @@ -22,7 +22,7 @@ stringDescent(string) } \arguments{ \item{string}{A character vector or a language object (as used for - \sQuote{\link{plotmath}} calls.} + \sQuote{\link{plotmath}} calls).} } \value{ A \code{\link{unit}} object. diff --git a/source/src/library/grid/tests/testls.Rout.save b/source/src/library/grid/tests/testls.Rout.save index 6e991ac52..a55ec7fcb 100644 --- a/source/src/library/grid/tests/testls.Rout.save +++ b/source/src/library/grid/tests/testls.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -340,4 +340,4 @@ List of 6 > > proc.time() user system elapsed - 0.317 0.028 0.328 + 0.276 0.036 0.293 diff --git a/source/src/library/methods/man/MethodsList-class.Rd b/source/src/library/methods/man/MethodsList-class.Rd index 0a2a2b476..9a9848063 100644 --- a/source/src/library/methods/man/MethodsList-class.Rd +++ b/source/src/library/methods/man/MethodsList-class.Rd @@ -29,7 +29,7 @@ old-style objects. } argument has that class. See the details below.} \item{\code{allMethods}:}{A named list, contains all the directly defined methods from the \code{methods} slot, plus - any inherited methods. Ignored when methods tables are used for dispatch (see \link{Methods_Details} } + any inherited methods. Ignored when methods tables are used for dispatch (see \link{Methods_Details}). } }} \details{ diff --git a/source/src/library/methods/man/RMethodUtils.Rd b/source/src/library/methods/man/RMethodUtils.Rd index b49a24863..f89741ef7 100644 --- a/source/src/library/methods/man/RMethodUtils.Rd +++ b/source/src/library/methods/man/RMethodUtils.Rd @@ -286,7 +286,7 @@ balanceMethodsList(mlist, args, check = TRUE) # <- deprecated since R 3.2.0 A generic function that finds the next method for the signature of the method definition \code{method} and caches that method in the method definition (promoting the class to - \code{"MethodWithNext"}. Note that argument \code{mlist} is + \code{"MethodWithNext"}). Note that argument \code{mlist} is obsolete and not used. } diff --git a/source/src/library/methods/man/StructureClasses.Rd b/source/src/library/methods/man/StructureClasses.Rd index 84050aaed..87b9b1de9 100644 --- a/source/src/library/methods/man/StructureClasses.Rd +++ b/source/src/library/methods/man/StructureClasses.Rd @@ -95,7 +95,7 @@ Time-series objects, in contrast to matrices and arrays, have a valid S3 class, \code{"ts"}, registered using an S4-style definition (see the documentation for \code{\link{setOldClass}} in the examples section - for an abbreviated listing of how this is done. The S3 + for an abbreviated listing of how this is done). The S3 inheritance of \code{"mts"} in package \pkg{stats} is also registered. These classes, as well as \code{"matrix"} and \code{"array"} should diff --git a/source/src/library/methods/man/nonStructure-class.Rd b/source/src/library/methods/man/nonStructure-class.Rd index a15dae7b3..31107c62a 100644 --- a/source/src/library/methods/man/nonStructure-class.Rd +++ b/source/src/library/methods/man/nonStructure-class.Rd @@ -31,7 +31,7 @@ \section{Methods}{ Methods are defined for operators and math functions (groups - \code{\link{Ops}}, \code{\link{Math}} and \code{\link{Math2}}. In + \code{\link{Ops}}, \code{\link{Math}} and \code{\link{Math2}}). In all cases the result is an ordinary vector of the appropriate type. } \references{ diff --git a/source/src/library/methods/man/refClass.Rd b/source/src/library/methods/man/refClass.Rd index 53933c761..4b45e0692 100644 --- a/source/src/library/methods/man/refClass.Rd +++ b/source/src/library/methods/man/refClass.Rd @@ -651,7 +651,7 @@ binding of the class definition. The new methods can refer to any currently defined method by name (including other methods supplied in this call to -\code{$methods()}. %$ +\code{$methods()}). %$ Note though that previously defined methods are not re-analyzed meaning that they will not call the new method (unless it redefines an existing method of the same name). diff --git a/source/src/library/methods/man/validObject.Rd b/source/src/library/methods/man/validObject.Rd index e5b537d63..146431212 100644 --- a/source/src/library/methods/man/validObject.Rd +++ b/source/src/library/methods/man/validObject.Rd @@ -33,7 +33,7 @@ A class definition may have a validity method, set by a call to and any strings from failure will be included in the result or the error message. Any validity methods defined for superclasses (from the \code{contains=} -argument to \code{\link{setClass}}, will also be called. +argument to \code{\link{setClass}}), will also be called. } diff --git a/source/src/library/parallel/R/detectCores.R b/source/src/library/parallel/R/detectCores.R index 8b14ce813..bf6264f72 100644 --- a/source/src/library/parallel/R/detectCores.R +++ b/source/src/library/parallel/R/detectCores.R @@ -1,7 +1,7 @@ # File src/library/parallel/R/detectCores.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2016 The R Core Team +# Copyright (C) 1995-2018 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,9 +28,9 @@ detectCores <- } else { function(all.tests = FALSE, logical = TRUE) { ## Commoner OSes first + ## for Linux systems, physical id is 1 for second hyperthread systems <- - list(linux = - if(logical) "grep processor /proc/cpuinfo 2>/dev/null | wc -l" else "cat /proc/cpuinfo | grep 'cpu cores'| uniq | cut -f2 -d:", + list(linux = "grep ^processor /proc/cpuinfo 2>/dev/null | wc -l", ## hw.physicalcpu is not documented for 10.9, but works darwin = if(logical) "/usr/sbin/sysctl -n hw.logicalcpu 2>/dev/null" else "/usr/sbin/sysctl -n hw.physicalcpu 2>/dev/null", solaris = if(logical) "/usr/sbin/psrinfo -v | grep 'Status of.*processor' | wc -l" else "/bin/kstat -p -m cpu_info | grep :core_id | cut -f2 | uniq | wc -l", diff --git a/source/src/library/parallel/inst/doc/parallel.pdf b/source/src/library/parallel/inst/doc/parallel.pdf index fcdac03a1..201534b44 100644 Binary files a/source/src/library/parallel/inst/doc/parallel.pdf and b/source/src/library/parallel/inst/doc/parallel.pdf differ diff --git a/source/src/library/parallel/man/detectCores.Rd b/source/src/library/parallel/man/detectCores.Rd index a147c6145..6bfd68705 100644 --- a/source/src/library/parallel/man/detectCores.Rd +++ b/source/src/library/parallel/man/detectCores.Rd @@ -1,6 +1,6 @@ % File src/library/parallel/man/detectCores.Rd % Part of the R package, https://www.R-project.org -% Copyright 2011-2016 R Core Team +% Copyright 2011-2018 R Core Team % Distributed under GPL 2 or later \name{detectCores} @@ -16,7 +16,7 @@ detectCores(all.tests = FALSE, logical = TRUE) \item{all.tests}{Logical: if true apply all known tests.} \item{logical}{Logical: if possible, use the number of physical CPUs/cores (if \code{FALSE}) or logical CPUs (if \code{TRUE}). Currently this - is honoured only on Linux, macOS, Sparc Solaris and Windows.} + is honoured only on macOS, Solaris and Windows.} } \details{ This attempts to detect the number of available CPU cores. @@ -51,16 +51,16 @@ detectCores(all.tests = FALSE, logical = TRUE) On Sparc Solaris \code{logical = FALSE} returns the number of physical cores and \code{logical = TRUE} returns the number of available - hardware threads. (Some Sparc CPUs which do have multiple cores per - CPU, others have multiple threads per core and some have both.) For - example, the UltraSparc T2 CPU in the CRAN check server is a single + hardware threads. (Some Sparc CPUs have multiple cores per CPU, others + have multiple threads per core and some have both.) For example, the + UltraSparc T2 CPU in the former CRAN check server was a single physical CPU with 8 cores, and each core supports 8 hardware threads. So \code{detectCores(logical = FALSE)} returns 8, and \code{detectCores(logical = TRUE)} returns 64. Where virtual machines are in use, one would hope that the result - represents the number of CPUs available (or potentially available) to - that particular VM. + for \code{logical = TRUE} represents the number of CPUs available (or + potentially available) to that particular VM. } \author{ Simon Urbanek and Brian Ripley diff --git a/source/src/library/parallel/tests/multicore2.Rout.save b/source/src/library/parallel/tests/multicore2.Rout.save index fe816d73e..1cb416b4b 100644 --- a/source/src/library/parallel/tests/multicore2.Rout.save +++ b/source/src/library/parallel/tests/multicore2.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -45,4 +45,4 @@ Calculations on Transformed Scale; Intervals on Original Scale > > proc.time() user system elapsed - 0.214 0.041 0.416 + 0.173 0.036 0.347 diff --git a/source/src/library/parallel/tests/snow2.Rout.save b/source/src/library/parallel/tests/snow2.Rout.save index 0b8e5ba13..74ef9f053 100644 --- a/source/src/library/parallel/tests/snow2.Rout.save +++ b/source/src/library/parallel/tests/snow2.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -50,4 +50,4 @@ Calculations on Transformed Scale; Intervals on Original Scale > > proc.time() user system elapsed - 0.218 0.049 0.872 + 0.203 0.045 0.774 diff --git a/source/src/library/stats/R/distn.R b/source/src/library/stats/R/distn.R index e576a9541..2d49a95b0 100644 --- a/source/src/library/stats/R/distn.R +++ b/source/src/library/stats/R/distn.R @@ -1,7 +1,7 @@ # File src/library/stats/R/distn.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2016 The R Core Team +# Copyright (C) 1995-2018 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -133,8 +133,7 @@ qbeta <- function(p, shape1, shape2, ncp=0, lower.tail = TRUE, log.p = FALSE) { else .Call(C_qnbeta, p, shape1, shape2, ncp, lower.tail, log.p) } rbeta <- function(n, shape1, shape2, ncp = 0) { - if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) } - else if(ncp == 0) .Call(C_rbeta, n, shape1, shape2) + if(missing(ncp)) .Call(C_rbeta, n, shape1, shape2) else { X <- rchisq(n, 2*shape1, ncp =ncp) X/(X + rchisq(n, 2*shape2)) @@ -212,7 +211,6 @@ qf <- function(p, df1, df2, ncp, lower.tail = TRUE, log.p = FALSE) { rf <- function(n, df1, df2, ncp) { if(missing(ncp)) .Call(C_rf, n, df1, df2) - else if(is.na(ncp)) { warning("NAs produced"); rep(NaN, n) } else (rchisq(n, df1, ncp=ncp)/df1)/(rchisq(n, df2)/df2) } diff --git a/source/src/library/stats/R/nls.R b/source/src/library/stats/R/nls.R index 7b368f5cd..b601ee1b0 100644 --- a/source/src/library/stats/R/nls.R +++ b/source/src/library/stats/R/nls.R @@ -1,8 +1,8 @@ # File src/library/stats/R/nls.R # Part of the R package, https://www.R-project.org # +# Copyright (C) 2000-2017 The R Core Team # Copyright (C) 1999-1999 Saikat DebRoy, Douglas M. Bates, Jose C. Pinheiro -# Copyright (C) 2000-2016 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -55,9 +55,9 @@ nlsModel.plinear <- function(form, data, start, wts) rhs <- eval(form[[3L]], envir = env) storage.mode(rhs) <- "double" .swts <- if(!missing(wts) && length(wts)) - sqrt(wts) else rep_len(1, NROW(rhs)) + sqrt(wts) else 1 # more efficient than rep_len(1, NROW(rhs)) assign(".swts", .swts, envir = env) - p1 <- if(is.matrix(rhs)) ncol(rhs) else 1 + p1 <- NCOL(rhs) p <- p1 + p2 n <- length(lhs) fac <- (n - p)/p @@ -287,7 +287,9 @@ nlsModel <- function(form, data, start, wts, upper=NULL) attr(ans, "gradient") <- eval(gradCall) ans } - QR <- qr(.swts * attr(rhs, "gradient")) + if(length(gr <- attr(rhs, "gradient")) == 1L) + attr(rhs, "gradient") <- gr <- as.vector(gr) + QR <- qr(.swts * gr) qrDim <- min(dim(QR$qr)) if(QR$rank < qrDim) stop("singular gradient matrix at initial parameter estimates") @@ -355,9 +357,9 @@ nlsModel <- function(form, data, start, wts, upper=NULL) (lhs - assign("rhs", getRHS(), envir = thisEnv)), envir = thisEnv) assign("dev", sum(resid^2), envir = thisEnv) - assign("QR", qr(.swts * attr(rhs, "gradient")), - envir = thisEnv ) - return(QR$rank < min(dim(QR$qr))) # to catch the singular gradient matrix + if(length(gr <- attr(rhs, "gradient")) == 1L) gr <- c(gr) + assign("QR", qr(.swts * gr), envir = thisEnv ) + (QR$rank < min(dim(QR$qr))) # to catch the singular gradient matrix }, getPars = function() getPars(), getAllPars = function() getPars(), @@ -370,7 +372,6 @@ nlsModel <- function(form, data, start, wts, upper=NULL) predict = function(newdata = list(), qr = FALSE) eval(form[[3L]], as.list(newdata), env) ) - class(m) <- "nlsModel" m } @@ -467,6 +468,10 @@ nls <- names(attr(data, "parameters")) } else { ## try selfStart - like object cll <- formula[[length(formula)]] + if(is.symbol(cll)) { ## replace y ~ S by y ~ S + 0 : + ## formula[[length(formula)]] <- + cll <- substitute(S + 0, list(S = cll)) + } fn <- as.character(cll[[1L]]) if(is.null(func <- tryCatch(get(fn), error=function(e)NULL))) func <- get(fn, envir=parent.frame()) ## trying "above" @@ -490,7 +495,6 @@ nls <- ## exists(var, data) does not work (with lists or dataframes): lenVar <- function(var) tryCatch(length(eval(as.name(var), data, env)), error = function(e) -1L) - if(length(varNames)) { n <- vapply(varNames, lenVar, 0) if(any(not.there <- n == -1L)) { @@ -537,6 +541,7 @@ nls <- varIndex <- n %% respLength == 0 if(is.list(data) && diff(range(n[names(n) %in% names(data)])) > 0) { ## 'data' is a list that can not be coerced to a data.frame + ## (not using varNames, varIndex at all - inconsistency FIXME?) mf <- data if(!missing(subset)) warning("argument 'subset' will be ignored") @@ -550,12 +555,14 @@ nls <- rhs <- eval(formula[[3L]], data, startEnv) n <- NROW(rhs) ## mimic what model.frame.default does - wts <- if (mWeights) rep_len(1, n) else - eval(substitute(weights), data, environment(formula)) + wts <- if (mWeights) rep_len(1, n) + else eval(substitute(weights), data, environment(formula)) } else { + vNms <- varNames[varIndex] + if(any(nEQ <- vNms != make.names(vNms))) vNms[nEQ] <- paste0("`", vNms[nEQ], "`") mf$formula <- # replace by one-sided linear model formula - as.formula(paste("~", paste(varNames[varIndex], collapse = "+")), + as.formula(paste("~", paste(vNms, collapse = "+")), env = environment(formula)) mf$start <- mf$control <- mf$algorithm <- mf$trace <- mf$model <- NULL mf$lower <- mf$upper <- NULL diff --git a/source/src/library/stats/R/power.R b/source/src/library/stats/R/power.R index 638967e72..7a1811183 100644 --- a/source/src/library/stats/R/power.R +++ b/source/src/library/stats/R/power.R @@ -1,7 +1,7 @@ # File src/library/stats/R/power.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2015 The R Core Team +# Copyright (C) 1995-2017 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ power.t.test <- alternative <- match.arg(alternative) tsample <- switch(type, one.sample = 1, two.sample = 2, paired = 1) + force(tsample)# codetools tside <- switch(alternative, one.sided = 1, two.sided = 2) if (tside == 2 && !is.null(delta)) delta <- abs(delta) @@ -121,25 +122,30 @@ power.prop.test <- else if (is.null(n)) n <- uniroot(function(n) eval(p.body) - power, c(1,1e7), tol=tol, extendInt = "upX")$root - else if (is.null(p1)) + else if (is.null(p1)) { p1 <- uniroot(function(p1) eval(p.body) - power, c(0,p2), tol=tol, extendInt = "yes")$root - else if (is.null(p2)) + if(p1 < 0) warning("No p1 in in [0, p2] can be found to achieve the desired power") + } + else if (is.null(p2)) { p2 <- uniroot(function(p2) eval(p.body) - power, c(p1,1), tol=tol, extendInt = "yes")$root - else if (is.null(sig.level)) + if(p2 > 1) warning("No p2 in in [p1, 1] can be found to achieve the desired power") + } + else if (is.null(sig.level)) { sig.level <- uniroot(function(sig.level) eval(p.body) - power, - c(1e-10, 1-1e-10), tol=tol, extendInt = "upX")$root + c(1e-10, 1-1e-10), tol=tol, extendInt = "upX")$root + if(sig.level < 0 || sig.level > 1) + warning("No significance level [0, 1] can be found to achieve the desired power") + } else # Shouldn't happen stop("internal error", domain = NA) - NOTE <- "n is number in *each* group" - - METHOD <- "Two-sample comparison of proportions power calculation" - structure(list(n=n, p1=p1, p2=p2, sig.level=sig.level, power=power, - alternative=alternative, note=NOTE, method=METHOD), + alternative=alternative, + note = "n is number in *each* group", + method = "Two-sample comparison of proportions power calculation"), class="power.htest") } diff --git a/source/src/library/stats/man/Beta.Rd b/source/src/library/stats/man/Beta.Rd index 52d1f9d45..62980331b 100644 --- a/source/src/library/stats/man/Beta.Rd +++ b/source/src/library/stats/man/Beta.Rd @@ -91,7 +91,7 @@ rbeta(n, shape1, shape2, ncp = 0) The non-central case is based on the derivation as a Poisson mixture of betas (Johnson \emph{et al}, 1995, pp.\sspace{}502--3). - \item The central \code{pbeta} for the default \code{log_p = FALSE}) + \item The central \code{pbeta} for the default (\code{log_p = FALSE}) uses a C translation based on Didonato, A. and Morris, A., Jr, (1992) diff --git a/source/src/library/stats/man/Chisquare.Rd b/source/src/library/stats/man/Chisquare.Rd index 171f759f7..8b8adb656 100644 --- a/source/src/library/stats/man/Chisquare.Rd +++ b/source/src/library/stats/man/Chisquare.Rd @@ -73,7 +73,7 @@ rchisq(n, df, ncp = 0) non-centrality \eqn{\lambda > 0}, see Johnson \emph{et al} (1995, chapter 29). In that (noncentral, zero df) case, the distribution is a mixture of a - point mass at \eqn{x = 0} (of size \code{pchisq(0, df=0, ncp=ncp)} and + point mass at \eqn{x = 0} (of size \code{pchisq(0, df=0, ncp=ncp)}) and a continuous part, and \code{dchisq()} is \emph{not} a density with respect to that mixture measure but rather the limit of the density for \eqn{df \to 0}{df -> 0}. diff --git a/source/src/library/stats/man/Fdist.Rd b/source/src/library/stats/man/Fdist.Rd index 946a004b9..9eb41fe27 100644 --- a/source/src/library/stats/man/Fdist.Rd +++ b/source/src/library/stats/man/Fdist.Rd @@ -123,7 +123,7 @@ stopifnot(all.equal(2*pt(x,nu) - 1, pf(x^2, 1,nu)), # check this is the same as the density of F_{1,m} all.equal(df(x^2, 1, 5), dt(x, 5)/x) -## Identity: qf(2*p - 1, 1, df)) == qt(p, df)^2) for p >= 1/2 +## Identity: qf(2*p - 1, 1, df) == qt(p, df)^2 for p >= 1/2 p <- seq(1/2, .99, length = 50); df <- 10 rel.err <- function(x, y) ifelse(x == y, 0, abs(x-y)/mean(abs(c(x,y)))) \donttest{quantile(rel.err(qf(2*p - 1, df1 = 1, df2 = df), qt(p, df)^2), .90) # ~= 7e-9} diff --git a/source/src/library/stats/man/GammaDist.Rd b/source/src/library/stats/man/GammaDist.Rd index dd891a5a4..cded4e56d 100644 --- a/source/src/library/stats/man/GammaDist.Rd +++ b/source/src/library/stats/man/GammaDist.Rd @@ -88,7 +88,7 @@ rgamma(n, shape, rate = 1, scale = 1/rate) % small \code{scale}, and warns of potential unreliability for % \code{scale < 1e-10}. \note{ - The S (Becker \emph{et al} (1988) parametrization was via \code{shape} + The S (Becker \emph{et al}, 1988) parametrization was via \code{shape} and \code{rate}: S had no \code{scale} parameter. It is an error to supply and \code{scale} and \code{rate}. diff --git a/source/src/library/stats/man/KalmanLike.Rd b/source/src/library/stats/man/KalmanLike.Rd index ddd868d58..640b2f913 100644 --- a/source/src/library/stats/man/KalmanLike.Rd +++ b/source/src/library/stats/man/KalmanLike.Rd @@ -65,7 +65,7 @@ makeARIMA(phi, theta, Delta, kappa = 1e6, \item{\code{a}}{the current state estimate} \item{\code{P}}{the current estimate of the state uncertainty matrix \eqn{Q}} \item{\code{Pn}}{the estimate at time \eqn{t-1} of the state - uncertainty matrix \eqn{Q} (not updated by \code{KalmanForecast}.} + uncertainty matrix \eqn{Q} (not updated by \code{KalmanForecast}).} } \code{KalmanSmooth} is the workhorse function for \code{\link{tsSmooth}}. diff --git a/source/src/library/stats/man/NLSstAsymptotic.Rd b/source/src/library/stats/man/NLSstAsymptotic.Rd index 468111023..3e95edcb1 100644 --- a/source/src/library/stats/man/NLSstAsymptotic.Rd +++ b/source/src/library/stats/man/NLSstAsymptotic.Rd @@ -16,7 +16,7 @@ NLSstAsymptotic(xy) } \description{ Fits the asymptotic regression model, in the form \code{b0 + - b1*(1-exp(-exp(lrc) * x)} to the \code{xy} data. + b1*(1-exp(-exp(lrc) * x))} to the \code{xy} data. This can be used as a building block in determining starting estimates for more complicated models. } diff --git a/source/src/library/stats/man/anova.mlm.Rd b/source/src/library/stats/man/anova.mlm.Rd index ddbe5f28a..a11529fb4 100644 --- a/source/src/library/stats/man/anova.mlm.Rd +++ b/source/src/library/stats/man/anova.mlm.Rd @@ -45,7 +45,7 @@ \code{\link{summary.manova}} for further details. For the \code{"Spherical"} test, proportionality is usually with the - identity matrix but a different matrix can be specified using \code{Sigma}). + identity matrix but a different matrix can be specified using \code{Sigma}. Corrections for asphericity known as the Greenhouse--Geisser, respectively Huynh--Feldt, epsilons are given and adjusted \eqn{F} tests are performed. diff --git a/source/src/library/stats/man/bandwidth.Rd b/source/src/library/stats/man/bandwidth.Rd index 0a8c3797d..7094766a2 100644 --- a/source/src/library/stats/man/bandwidth.Rd +++ b/source/src/library/stats/man/bandwidth.Rd @@ -49,7 +49,7 @@ bw.SJ(x, nb = 1000, lower = 0.1 * hmax, upper = hmax, It defaults to 0.9 times the minimum of the standard deviation and the interquartile range divided by 1.34 times the sample size to the negative one-fifth power - (= Silverman's \sQuote{rule of thumb}, Silverman (1986, page 48, eqn (3.31)) + (= Silverman's \sQuote{rule of thumb}, Silverman (1986, page 48, eqn (3.31))) \emph{unless} the quartiles coincide when a positive result will be guaranteed. diff --git a/source/src/library/stats/man/box.test.Rd b/source/src/library/stats/man/box.test.Rd index d67a04eba..9077380c8 100644 --- a/source/src/library/stats/man/box.test.Rd +++ b/source/src/library/stats/man/box.test.Rd @@ -36,7 +36,7 @@ Box.test(x, lag = 1, type = c("Box-Pierce", "Ljung-Box"), fitdf = 0) A list with class \code{"htest"} containing the following components: \item{statistic}{the value of the test statistic.} \item{parameter}{the degrees of freedom of the approximate chi-squared - distribution of the test statistic (taking \code{fitdf} into account.} + distribution of the test statistic (taking \code{fitdf} into account).} \item{p.value}{the p-value of the test.} \item{method}{a character string indicating which type of test was performed.} diff --git a/source/src/library/stats/man/dendrapply.Rd b/source/src/library/stats/man/dendrapply.Rd index 013c0599e..51d2272b8 100644 --- a/source/src/library/stats/man/dendrapply.Rd +++ b/source/src/library/stats/man/dendrapply.Rd @@ -11,7 +11,7 @@ recursively. When \code{y <- dendrapply(x, fn)}, then \code{y} is a dendrogram of the same graph structure as \code{x} and for each node, \code{y.node[j] <- FUN( x.node[j], ...)} (where \code{y.node[j]} is an - (invalid!) notation for the j-th node of y. + (invalid!) notation for the j-th node of y). } \usage{ dendrapply(X, FUN, ...) diff --git a/source/src/library/stats/man/family.Rd b/source/src/library/stats/man/family.Rd index 9d9256cce..62b7765ca 100644 --- a/source/src/library/stats/man/family.Rd +++ b/source/src/library/stats/man/family.Rd @@ -136,7 +136,7 @@ quasipoisson(link = "log") \eqn{d\mu/d\eta}.} \item{initialize}{expression. This needs to set up whatever data objects are needed for the family as well as \code{n} (needed for - AIC in the binomial family) and \code{mustart} (see \code{\link{glm}}.} + AIC in the binomial family) and \code{mustart} (see \code{\link{glm}}).} \item{validmu}{logical function. Returns \code{TRUE} if a mean vector \code{mu} is within the domain of \code{variance}.} \item{valideta}{logical function. Returns \code{TRUE} if a linear diff --git a/source/src/library/stats/man/kernel.Rd b/source/src/library/stats/man/kernel.Rd index 2c0cb0f40..8dffc73a8 100644 --- a/source/src/library/stats/man/kernel.Rd +++ b/source/src/library/stats/man/kernel.Rd @@ -32,7 +32,7 @@ is.tskernel(k) \item{coef}{the upper half of the smoothing kernel coefficients (including coefficient zero) \emph{or} the name of a kernel (currently \code{"daniell"}, \code{"dirichlet"}, \code{"fejer"} or - \code{"modified.daniell"}.} + \code{"modified.daniell"}).} \item{m}{the kernel dimension(s) if \code{coef} is a name. When \code{m} has length larger than one, it means the convolution of kernels of dimension \code{m[j]}, for \code{j in 1:length(m)}. diff --git a/source/src/library/stats/man/lag.plot.Rd b/source/src/library/stats/man/lag.plot.Rd index 9e66a3c48..959206592 100644 --- a/source/src/library/stats/man/lag.plot.Rd +++ b/source/src/library/stats/man/lag.plot.Rd @@ -23,7 +23,7 @@ lag.plot(x, lags = 1, layout = NULL, set.lags = 1:lags, \item{lags}{number of lag plots desired, see arg \code{set.lags}.} \item{layout}{the layout of multiple plots, basically the \code{mfrow} \code{\link{par}()} argument. The default uses about a square - layout (see \code{\link{n2mfrow}} such that all plots are on one page.} + layout (see \code{\link{n2mfrow}}) such that all plots are on one page.} \item{set.lags}{vector of positive integers allowing specification of the set of lags used; defaults to \code{1:lags}.} \item{main}{character with a main header title to be done on the top diff --git a/source/src/library/stats/man/line.Rd b/source/src/library/stats/man/line.Rd index 3ad2ba378..3b9342e20 100644 --- a/source/src/library/stats/man/line.Rd +++ b/source/src/library/stats/man/line.Rd @@ -9,6 +9,9 @@ \title{Robust Line Fitting} \description{ Fit a line robustly as recommended in \emph{Exploratory Data Analysis}. + + Currently the initial median-median line is \emph{not} iterated (as + opposed to Tukey's \dQuote{resistant line} in the references). } \usage{ line(x, y) diff --git a/source/src/library/stats/man/lmfit.Rd b/source/src/library/stats/man/lmfit.Rd index eeeb5729a..f338781be 100644 --- a/source/src/library/stats/man/lmfit.Rd +++ b/source/src/library/stats/man/lmfit.Rd @@ -32,7 +32,7 @@ lm.wfit(x, y, w, offset = NULL, method = "qr", tol = 1e-7, \item{w}{vector of weights (length \code{n}) to be used in the fitting process for the \code{wfit} functions. Weighted least squares is used with weights \code{w}, i.e., \code{sum(w * e^2)} is minimized.} - \item{offset}{numeric of length \code{n}). This can be used to + \item{offset}{(numeric of length \code{n}). This can be used to specify an \emph{a priori} known component to be included in the linear predictor during fitting.} diff --git a/source/src/library/stats/man/monthplot.Rd b/source/src/library/stats/man/monthplot.Rd index 5e0d5720c..bacab9705 100644 --- a/source/src/library/stats/man/monthplot.Rd +++ b/source/src/library/stats/man/monthplot.Rd @@ -50,7 +50,7 @@ monthplot(x, \dots) \item{axes}{Should axes be drawn (ignored if \code{add = TRUE})?} \item{type}{Type of plot. The default is to join the points with lines, and \code{"h"} is for histogram-like vertical lines.} - \item{box}{Should a box be drawn (ignored if \code{add = TRUE}?} + \item{box}{Should a box be drawn (ignored if \code{add = TRUE})?} \item{add}{Should thus just add on an existing plot.} \item{col, lty, lwd}{Graphics parameters for the series.} \item{col.base, lty.base, lwd.base}{Graphics parameters for the diff --git a/source/src/library/stats/man/plot.lm.Rd b/source/src/library/stats/man/plot.lm.Rd index 6e47d73c2..5b5efecfa 100644 --- a/source/src/library/stats/man/plot.lm.Rd +++ b/source/src/library/stats/man/plot.lm.Rd @@ -80,7 +80,7 @@ The \sQuote{Scale-Location} plot, also called \sQuote{Spread-Location} or \sQuote{S-L} plot, takes the square root of the absolute residuals in - order to diminish skewness (\eqn{\sqrt{| E |}}{sqrt(|E|)}) is much less skewed + order to diminish skewness (\eqn{\sqrt{| E |}}{sqrt(|E|)} is much less skewed than \eqn{| E |} for Gaussian zero-mean \eqn{E}). The \sQuote{S-L}, the Q-Q, and the Residual-Leverage plot, use diff --git a/source/src/library/stats/man/plot.ppr.Rd b/source/src/library/stats/man/plot.ppr.Rd index 7e3c13817..e00b914bf 100644 --- a/source/src/library/stats/man/plot.ppr.Rd +++ b/source/src/library/stats/man/plot.ppr.Rd @@ -50,7 +50,7 @@ require(graphics) rock1 <- within(rock, { area1 <- area/10000; peri1 <- peri/10000 }) -par(mfrow = c(3,2)) # maybe: , pty = "s") +par(mfrow = c(3,2)) # maybe: , pty = "s" rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape, data = rock1, nterms = 2, max.terms = 5) plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)") diff --git a/source/src/library/stats/man/power.prop.test.Rd b/source/src/library/stats/man/power.prop.test.Rd index c4879e6d7..bdb0bb43e 100644 --- a/source/src/library/stats/man/power.prop.test.Rd +++ b/source/src/library/stats/man/power.prop.test.Rd @@ -1,6 +1,6 @@ % File src/library/stats/man/power.prop.test.Rd % Part of the R package, https://www.R-project.org -% Copyright (C) 1995-2014 R Core Team +% Copyright (C) 1995-2017 R Core Team % Distributed under GPL 2 or later \name{power.prop.test} @@ -31,14 +31,23 @@ power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05, \details{ Exactly one of the parameters \code{n}, \code{p1}, \code{p2}, \code{power}, and \code{sig.level} must be passed as NULL, and that - parameter is determined from the others. Notice that \code{sig.level} - has a non-NULL default so NULL must be explicitly passed if you want - it computed. + parameter is determined from the others. Notice that \code{sig.level} + has a non-NULL default so \code{NULL} must be explicitly passed if you + want it computed. If \code{strict = TRUE} is used, the power will include the probability of rejection in the opposite direction of the true effect, in the two-sided - case. Without this the power will be half the significance level if the + case. Without this the power will be half the significance level if the true difference is zero. + + Note that not all conditions can be satisfied, e.g., for \preformatted{power.prop.test(n=30, p1=0.90, p2=NULL, power=0.8, strict=TRUE)} + there is no proportion \code{p2} between \code{p1 = 0.9} and 1, as + you'd need a sample size of at least \eqn{n = 74} to yield the + desired power for \eqn{(p1,p2) = (0.9, 1)}. + + For these impossible conditions, currently a warning + (\code{\link{warning}}) is signalled which may become an error + (\code{\link{stop}}) in the future. } \value{ Object of class \code{"power.htest"}, a list of the arguments @@ -49,11 +58,11 @@ power.prop.test(n = NULL, p1 = NULL, p2 = NULL, sig.level = 0.05, \enc{Ekstrøm}{Ekstroem}} \note{ - \code{uniroot} is used to solve power equation for unknowns, so + \code{\link{uniroot}} is used to solve power equation for unknowns, so you may see errors from it, notably about inability to bracket the - root when invalid arguments are given. If one of them is computed - \code{p1 < p2} will hold, although this is not enforced when both are - specified. + root when invalid arguments are given. If one of \code{p1} and + \code{p2} is computed, then \eqn{p1 < p2} is assumed and will hold, + but if you specify both, \eqn{p2 \le p1}{p2 <= p1} is allowed. } \seealso{\code{\link{prop.test}}, \code{\link{uniroot}}} @@ -66,5 +75,10 @@ power.prop.test(n = 50, p1 = .5, p2 = 0.9, power = .90, sig.level=NULL) ## => sig.l = 0.00131 power.prop.test(p1 = .5, p2 = 0.501, sig.level=.001, power=0.90) ## => n = 10451937 +try( + power.prop.test(n=30, p1=0.90, p2=NULL, power=0.8) +) # a warning (which may become an error) +## Reason: +power.prop.test( p1=0.90, p2= 1.0, power=0.8) ##-> n = 73.37 } \keyword{ htest } diff --git a/source/src/library/stats/man/predict.lm.Rd b/source/src/library/stats/man/predict.lm.Rd index 16b13446e..831edc27e 100644 --- a/source/src/library/stats/man/predict.lm.Rd +++ b/source/src/library/stats/man/predict.lm.Rd @@ -42,7 +42,7 @@ \details{ \code{predict.lm} produces predicted values, obtained by evaluating the regression function in the frame \code{newdata} (which defaults to - \code{model.frame(object)}. If the logical \code{se.fit} is + \code{model.frame(object)}). If the logical \code{se.fit} is \code{TRUE}, standard errors of the predictions are calculated. If the numeric argument \code{scale} is set (with optional \code{df}), it is used as the residual standard deviation in the computation of the diff --git a/source/src/library/stats/man/reorder.dendrogram.Rd b/source/src/library/stats/man/reorder.dendrogram.Rd index 2f331efe1..41e8fbb0c 100644 --- a/source/src/library/stats/man/reorder.dendrogram.Rd +++ b/source/src/library/stats/man/reorder.dendrogram.Rd @@ -29,7 +29,7 @@ weights. At each node, the branches are ordered in increasing weights where the weight of a branch is defined as \eqn{f(w_j)} where \eqn{f} is \code{agglo.FUN} and \eqn{w_j} is the - weight of the \eqn{j}-th sub branch). + weight of the \eqn{j}-th sub branch. } \value{ A dendrogram where each node has a further attribute \code{value} with diff --git a/source/src/library/stats/man/spec.taper.Rd b/source/src/library/stats/man/spec.taper.Rd index fc0dae5e2..ff06882d8 100644 --- a/source/src/library/stats/man/spec.taper.Rd +++ b/source/src/library/stats/man/spec.taper.Rd @@ -14,7 +14,7 @@ spec.taper(x, p = 0.1) \item{p}{The proportion to be tapered at each end of the series, either a scalar (giving the proportion for all series) or a vector of the length of the number of series (giving the - proportion for each series..} + proportion for each series).} } \description{ Apply a cosine-bell taper to a time series. diff --git a/source/src/library/stats/tests/bandwidth.Rout.save b/source/src/library/stats/tests/bandwidth.Rout.save index 535da6721..79ddcede9 100644 --- a/source/src/library/stats/tests/bandwidth.Rout.save +++ b/source/src/library/stats/tests/bandwidth.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -46,4 +46,4 @@ In bw.bcv(precip) : minimum occurred at one end of the range > > proc.time() user system elapsed - 0.226 0.038 0.245 + 0.202 0.027 0.209 diff --git a/source/src/library/stats/tests/glm.Rout.save b/source/src/library/stats/tests/glm.Rout.save index fb2cffbff..ddc4c87eb 100644 --- a/source/src/library/stats/tests/glm.Rout.save +++ b/source/src/library/stats/tests/glm.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -29,4 +29,4 @@ Warning messages: > > proc.time() user system elapsed - 0.189 0.034 0.203 + 0.161 0.024 0.165 diff --git a/source/src/library/stats/tests/ks-test.Rout.save b/source/src/library/stats/tests/ks-test.Rout.save index 0e7d7d213..0c3349ad8 100644 --- a/source/src/library/stats/tests/ks-test.Rout.save +++ b/source/src/library/stats/tests/ks-test.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -362,4 +362,4 @@ difference in location 3.741417e-05 3.741417e-05 3.741417e-05 > > proc.time() user system elapsed - 0.397 0.033 0.413 + 0.357 0.033 0.372 diff --git a/source/src/library/stats/tests/nls.R b/source/src/library/stats/tests/nls.R index e823993d2..ccfcc1dbc 100644 --- a/source/src/library/stats/tests/nls.R +++ b/source/src/library/stats/tests/nls.R @@ -250,7 +250,6 @@ getExpmat <- function(theta, t) for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t) conc } - expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1)) expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100) expsum.df <-data.frame(expsumNoisy) @@ -276,8 +275,39 @@ y <- b0 + b1*x + rnorm(200, sd=0.05) fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1), algorithm ="port", upper = c(100, 100, 100)) # next did not "fail" in proposed fix: -fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101), +fiB <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101), algorithm ="port", upper = c(100, 100, 100), control = list(warnOnly=TRUE))# warning .. -with(fit$convInfo, ## start par. violates constraints +with(fiB$convInfo, ## start par. violates constraints stopifnot(isConv == FALSE, stopCode == 300)) + + +## PR#17367 -- nls() quoting non-syntactical variable names +## +op <- options(warn = 2)# no warnings allowed from here +## +dN <- data.frame('NO [µmol/l]' = c(1,3,8,17), t = 1:4, check.names=FALSE) +fnN <- `NO [µmol/l]` ~ a + k* exp(t) +## lm() works, nls() should too +lm.N <- lm(`NO [µmol/l]` ~ exp(t) , data = dN) +summary(lm.N) -> slmN +nm. <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = dN) +## In R <= 3.4.x : Error in eval(predvars, data, env) : object 'NO' not found +nmf <- nls(fnN, start=list(a=0,k=1), data = dN) +## (ditto; gave identical error) +noC <- function(L) L[-match("call", names(L))] +stopifnot(all.equal(noC (nm.), noC (nmf))) +## +## with list for which as.data.frame() does not work [-> different branch, not using model.frame!] +## list version (has been valid "forever", still doubtful, rather give error [FIXME] ?) +lsN <- c(as.list(dN), list(foo="bar")); lsN[["t"]] <- 1:8 +nmL <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = lsN) +stopifnot(all.equal(coef(nmL), c(a = 5.069866, k = 0.003699669), tol = 4e-7))# seen 4.2e-8 + +## trivial RHS -- should work even w/o 'start=' +fi1 <- nls(y ~ a, start = list(a=1)) +## -> 2 deprecation warnings "length 1 in vector-arithmetic" from nlsModel() in R 3.4.x .. +options(op) # warnings about missing 'start' ok: +f.1 <- nls(y ~ a) # failed in R 3.4.x +stopifnot(all.equal(noC(f.1), noC(fi1)), + all.equal(coef(f.1), c(a = mean(y)))) diff --git a/source/src/library/stats/tests/nls.Rout.save b/source/src/library/stats/tests/nls.Rout.save index d9a4740a5..a49437994 100644 --- a/source/src/library/stats/tests/nls.Rout.save +++ b/source/src/library/stats/tests/nls.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -637,7 +637,6 @@ Nonlinear regression model + for(i in 1:length(theta)) conc[, i] <- exp(-theta[i] * t) + conc + } -> > expsum <- as.vector(getExpmat(c(.05,.005), 1:100) %*% c(1,1)) > expsumNoisy <- expsum + max(expsum) *.001 * rnorm(100) > expsum.df <-data.frame(expsumNoisy) @@ -693,14 +692,49 @@ Algorithm "port", convergence message: both X-convergence and relative convergen > fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=1), + algorithm ="port", upper = c(100, 100, 100)) > # next did not "fail" in proposed fix: -> fit <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101), +> fiB <- nls(y~b0[fac] + b1*x, start = list(b0=c(1,1), b1=101), + algorithm ="port", upper = c(100, 100, 100), + control = list(warnOnly=TRUE))# warning .. Warning in nls(y ~ b0[fac] + b1 * x, start = list(b0 = c(1, 1), b1 = 101), : Convergence failure: initial par violates constraints -> with(fit$convInfo, ## start par. violates constraints +> with(fiB$convInfo, ## start par. violates constraints + stopifnot(isConv == FALSE, stopCode == 300)) > +> +> ## PR#17367 -- nls() quoting non-syntactical variable names +> ## +> op <- options(warn = 2)# no warnings allowed from here +> ## +> dN <- data.frame('NO [µmol/l]' = c(1,3,8,17), t = 1:4, check.names=FALSE) +> fnN <- `NO [µmol/l]` ~ a + k* exp(t) +> ## lm() works, nls() should too +> lm.N <- lm(`NO [µmol/l]` ~ exp(t) , data = dN) +> summary(lm.N) -> slmN +> nm. <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = dN) +> ## In R <= 3.4.x : Error in eval(predvars, data, env) : object 'NO' not found +> nmf <- nls(fnN, start=list(a=0,k=1), data = dN) +> ## (ditto; gave identical error) +> noC <- function(L) L[-match("call", names(L))] +> stopifnot(all.equal(noC (nm.), noC (nmf))) +> ## +> ## with list for which as.data.frame() does not work [-> different branch, not using model.frame!] +> ## list version (has been valid "forever", still doubtful, rather give error [FIXME] ?) +> lsN <- c(as.list(dN), list(foo="bar")); lsN[["t"]] <- 1:8 +> nmL <- nls(`NO [µmol/l]` ~ a + k*exp(t), start=list(a=0,k=1), data = lsN) +> stopifnot(all.equal(coef(nmL), c(a = 5.069866, k = 0.003699669), tol = 4e-7))# seen 4.2e-8 +> +> ## trivial RHS -- should work even w/o 'start=' +> fi1 <- nls(y ~ a, start = list(a=1)) +> ## -> 2 deprecation warnings "length 1 in vector-arithmetic" from nlsModel() in R 3.4.x .. +> options(op) # warnings about missing 'start' ok: +> f.1 <- nls(y ~ a) # failed in R 3.4.x +Warning in nls(y ~ a) : + No starting values specified for some parameters. +Initializing 'a' to '1.'. +Consider specifying 'start' or using a selfStart model +> stopifnot(all.equal(noC(f.1), noC(fi1)), ++ all.equal(coef(f.1), c(a = mean(y)))) +> > proc.time() user system elapsed - 1.604 0.049 1.641 + 1.615 0.052 1.654 diff --git a/source/src/library/stats/tests/simulate.Rout.save b/source/src/library/stats/tests/simulate.Rout.save index ac3dfe3f4..9620007ed 100644 --- a/source/src/library/stats/tests/simulate.Rout.save +++ b/source/src/library/stats/tests/simulate.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -408,4 +408,4 @@ log(u) 0.015569 0.00033659 46.256 5.7704e-10 > > proc.time() user system elapsed - 0.335 0.045 0.362 + 0.290 0.034 0.306 diff --git a/source/src/library/stats/tests/smooth.spline.R b/source/src/library/stats/tests/smooth.spline.R index 35d35503c..963e797cf 100644 --- a/source/src/library/stats/tests/smooth.spline.R +++ b/source/src/library/stats/tests/smooth.spline.R @@ -1,7 +1,8 @@ ## partly moved from ../man/smooth.spline.Rd , quite system-specific. ##-- artificial example y18 <- c(1:3, 5, 4, 7:3, 2*(2:5), rep(10, 4)) -(b.64 <- (Sys.info()[["machine"]] == "x86_64")) +(b.64 <- grepl("^x86.64", Sys.info()[["machine"]]) && + .Machine$sizeof.pointer == 8) ## i386-Linux: Df ~= (even! > ) 18 : interpolating -- much smaller PRESS ## It is the too low 'low = -3' which "kills" the algo; low= -2.6 still ok ## On other platforms, e.g., x64, ends quite differently (and fine) diff --git a/source/src/library/tools/R/admin.R b/source/src/library/tools/R/admin.R index dba6c6842..1b413213b 100644 --- a/source/src/library/tools/R/admin.R +++ b/source/src/library/tools/R/admin.R @@ -1,7 +1,7 @@ # File src/library/tools/R/admin.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2015 The R Core Team +# Copyright (C) 1995-2017 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -947,15 +947,16 @@ checkRdaFiles <- function(paths) res[p, "compress"] <- if(all(magic[1:2] == c(0x1f, 0x8b))) "gzip" else if(rawToChar(magic[1:3]) == "BZh") "bzip2" else if(magic[1L] == 0xFD && rawToChar(magic[2:5]) == "7zXZ") "xz" - else if(grepl("RD[ABX][12]", rawToChar(magic), useBytes = TRUE)) "none" + else if(grepl("RD[ABX][1-9]", rawToChar(magic), useBytes = TRUE)) "none" else "unknown" con <- gzfile(p) magic <- readChar(con, 5L, useBytes = TRUE) close(con) - res[p, "ASCII"] <- if (grepl("RD[ABX][12]", magic, useBytes = TRUE)) - substr(magic, 3, 3) == "A" else NA - ver <- sub("(RD[ABX])([12]*)", "\\2", magic, useBytes = TRUE) - res$version <- as.integer(ver) + if (grepl("RD[ABX][1-9]", magic, useBytes = TRUE)) { + res[p, "ASCII"] <- substr(magic, 3, 3) == "A" + ver <- sub("(RD[ABX])([1-9])", "\\2", magic, useBytes = TRUE) + res$version <- as.integer(ver) + } } res } diff --git a/source/src/library/tools/R/build.R b/source/src/library/tools/R/build.R index 3430e9c01..6ea97cad5 100644 --- a/source/src/library/tools/R/build.R +++ b/source/src/library/tools/R/build.R @@ -1,7 +1,7 @@ # File src/library/tools/R/build.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2017 The R Core Team +# Copyright (C) 1995-2018 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -238,7 +238,7 @@ inRbuildignore <- function(files, pkgdir) { printLog(Log, " -----------------------------------\n") unlink(libdir, recursive = TRUE) printLog(Log, "ERROR: package installation failed\n") - do_exit(1) + do_exit(1L) } Sys.setenv("R_BUILD_TEMPLIB" = libdir) TRUE @@ -970,9 +970,13 @@ inRbuildignore <- function(files, pkgdir) { ## This should preserve dates and permissions (subject to ## umask, if that is consulted which it seems it usually is not). ## Permissions are increased later. - cp_sw <- if(Sys.info()[["sysname"]] == "Linux") ## << need GNU cp - ## unfortunately, '-pr' does not dereference sym.links - "-Lr --preserve=timestamps" else "-pr" + ## -L is to follow (de-reference) symlinks + ## --preserve is GNU only: at least macOS, FreeBSD and Solaris + ## have non-GNU cp's. + ver <- suppressWarnings(system2("cp", "--version", stdout = TRUE, + stderr = FALSE)) + GNU_cp <- any(grepl("GNU coreutils", ver)) + cp_sw <- if(GNU_cp) "-LR --preserve=timestamps" else "-pR" if (system(paste("cp", cp_sw, shQuote(pkgname), shQuote(Tdir)))) { errorLog(Log, "copying to build directory failed") do_exit(1L) @@ -999,9 +1003,9 @@ inRbuildignore <- function(files, pkgdir) { full.names = TRUE, include.dirs = TRUE) allfiles <- substring(allfiles, 3L) # drop './' bases <- basename(allfiles) - + exclude <- inRbuildignore(allfiles, pkgdir) - + isdir <- dir.exists(allfiles) ## old (pre-2.10.0) dirnames exclude <- exclude | (isdir & (bases %in% diff --git a/source/src/library/tools/R/check.R b/source/src/library/tools/R/check.R index e09631d3c..c01e3198d 100644 --- a/source/src/library/tools/R/check.R +++ b/source/src/library/tools/R/check.R @@ -1,7 +1,7 @@ # File src/library/tools/R/check.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2017 The R Core Team +# Copyright (C) 1995-2018 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1284,9 +1284,9 @@ setRlibs <- any <- TRUE printLog(Log, "Problems with news in 'inst/NEWS.Rd':\n") printLog0(Log, - paste(" ", - unlist(strsplit(msg, "\n", fixed = TRUE)), - sep = "", collapse = "\n"), + paste0(" ", + unlist(strsplit(msg, "\n", fixed = TRUE)), + collapse = "\n"), "\n") } } @@ -2483,12 +2483,12 @@ setRlibs <- msg <- if (nBad) { if(haveObjs) c("Compiled code should not call entry points which", - "might terminate R nor write to stdout/stderr instead", - "of to the console, nor the system RNG.\n") + "might terminate R nor write to stdout/stderr instead of", + "to the console, nor use Fortran I/O nor system RNGs.\n") else c("Compiled code should not call entry points which", - "might terminate R nor write to stdout/stderr instead", - "of to the console, nor the system RNG.", + "might terminate R nor write to stdout/stderr instead of", + "to the console, nor use Fortran I/O nor system RNGs.", "The detected symbols are linked", "into the code but might come from libraries", "and not actually be called.\n") @@ -3780,7 +3780,9 @@ setRlibs <- ": warning: .* \\[-Wformat-contains-nul\\]", ": warning: .* \\[-Wformat-zero-length\\]", ": warning: .* \\[-Wpointer-to-int-cast\\]", - ": warning: .* \\[-Wsequence-point\\]") + ": warning: .* \\[-Wsequence-point\\]", + ## Fatal on clang and Solaris ODS + ": warning: .* with a value, in function returning void") ## clang warnings warn_re <- c(warn_re, @@ -3843,7 +3845,7 @@ setRlibs <- lines, invert = TRUE, value = TRUE, useBytes = TRUE) lines <- grep("warning: *ISO C forbids.*function pointer", lines, invert = TRUE, value = TRUE, useBytes = TRUE) - if (WINDOWS) + if (WINDOWS) lines <- grep("warning: *ISO C does not support.*ms_printf length modifier", lines, invert = TRUE, value = TRUE, useBytes = TRUE) } diff --git a/source/src/library/tools/R/install.R b/source/src/library/tools/R/install.R index 9a66d924b..6f1e9d75f 100644 --- a/source/src/library/tools/R/install.R +++ b/source/src/library/tools/R/install.R @@ -1808,6 +1808,8 @@ ext <- sub(paste0(base, "."), "", a, fixed = TRUE) nobj <- "" if (nzchar(ext)) { + ## This will not work if there are no source files in + ## the top-level directory if (ext %in% c("cc", "cpp")) { with_cxx <- TRUE nobj <- base @@ -1877,6 +1879,7 @@ else if (cxxstd == "CXX98") { use_cxx98 <- TRUE } + with_cxx <- TRUE } } else if (file.exists("Makevars")) { makefiles <- c("Makevars", makefiles) @@ -1899,6 +1902,7 @@ else if (cxxstd == "CXX98") { use_cxx98 <- TRUE } + with_cxx <- TRUE } } if (!use_cxx11 && !use_cxx14 && !use_cxx17 && !use_cxx98) { @@ -1933,6 +1937,7 @@ use_cxx98 <- TRUE } } + with_cxx <- TRUE } if (with_cxx) { diff --git a/source/src/library/tools/R/sotools.R b/source/src/library/tools/R/sotools.R index 71d046070..e62720393 100644 --- a/source/src/library/tools/R/sotools.R +++ b/source/src/library/tools/R/sotools.R @@ -105,6 +105,10 @@ so_symbol_names_table <- ## libcxx variants "linux, C++, gxx, std::cout, _ZNSt3__14coutE", "linux, C++, gxx, std::cerr, _ZNSt3__14cerrE", + "linux, Fortran, gfortran, open, _gfortran_st_open", + "linux, Fortran, gfortran, close, _gfortran_st_close", + "linux, Fortran, gfortran, rewind, _gfortran_st_rewind", + "linux, Fortran, gfortran, read, _gfortran_st_read", "linux, Fortran, gfortran, write, _gfortran_st_write", "linux, Fortran, gfortran, print, _gfortran_st_write", "linux, Fortran, gfortran, stop, _gfortran_stop_numeric_f08", @@ -134,6 +138,10 @@ so_symbol_names_table <- ## libcxx variants "osx, C++, gxx, std::cout, __ZNSt3__14coutE", "osx, C++, gxx, std::cerr, __ZNSt3__14cerrE", + "osx, Fortran, gfortran, open, __gfortran_st_open", + "osx, Fortran, gfortran, close, __gfortran_st_close", + "osx, Fortran, gfortran, rewind, _gfortran_st_rewind", + "osx, Fortran, gfortran, read, __gfortran_st_read", "osx, Fortran, gfortran, write, __gfortran_st_write", "osx, Fortran, gfortran, print, __gfortran_st_write", "osx, Fortran, gfortran, stop, __gfortran_stop_numeric", @@ -159,6 +167,10 @@ so_symbol_names_table <- "freebsd, C, gcc, srand, srand", "freebsd, C, gcc, srandom, srandom", "freebsd, C, gcc, srand48, srand48", + "freebsd, Fortran, gfortran, open, _gfortran_st_open", + "freebsd, Fortran, gfortran, close, _gfortran_st_close", + "freebsd, Fortran, gfortran, rewind, _gfortran_st_rewind", + "freebsd, Fortran, gfortran, read, _gfortran_st_read", "freebsd, Fortran, gfortran, write, _gfortran_st_write", "freebsd, Fortran, gfortran, print, _gfortran_st_write", "freebsd, Fortran, gfortran, stop, _gfortran_stop_numeric_f08", @@ -183,6 +195,11 @@ so_symbol_names_table <- "solaris, C, solcc, srand, srand", "solaris, C, solcc, srandom, srandom", "solaris, C, solcc, srand48, srand48", + "solaris, Fortran, solf95, open, __f90_open", + "solaris, Fortran, solf95, close, __f90_close", + "solaris, Fortran, solf95, rewind, __f90_rewind", + "solaris, Fortran, solf95, read, __f90_eifr", + "solaris, Fortran, solf95, read, __f90_esfr", "solaris, Fortran, solf95, print, __f90_eslw", "solaris, Fortran, solf95, write, __f90_eslw", "solaris, Fortran, solf95, print, __f90_esfw", @@ -198,6 +215,9 @@ so_symbol_names_table <- ## only in .o, positions hard-coded in check_so_symbols "windows, C++, g++, std::cout, _ZSt4cout", "windows, C++, g++, std::cerr, _ZSt4cerr", + "windows, Fortran, gfortran, open, _gfortran_st_open", + "windows, Fortran, gfortran, close, _gfortran_st_close", + "windows, Fortran, gfortran, rewind, _gfortran_st_rewind", "windows, Fortran, gfortran, write, _gfortran_st_write", "windows, Fortran, gfortran, print, _gfortran_st_write", ## in DLL diff --git a/source/src/library/tools/R/testing.R b/source/src/library/tools/R/testing.R index f75aa4089..07ee303e0 100644 --- a/source/src/library/tools/R/testing.R +++ b/source/src/library/tools/R/testing.R @@ -775,7 +775,7 @@ detachPackages <- function(pkgs, verbose = TRUE) R.version[["major"]], ".", R.version[["minor"]], " (r", R.version[["svn rev"]], ")\n", sep = "") cat("", - "Copyright (C) 2000-2017 The R Core Team.", + "Copyright (C) 2000-2018 The R Core Team.", "This is free software; see the GNU General Public License version 2", "or later for copying conditions. There is NO warranty.", sep = "\n") diff --git a/source/src/library/tools/R/utils.R b/source/src/library/tools/R/utils.R index 7c9182021..f52b28b31 100644 --- a/source/src/library/tools/R/utils.R +++ b/source/src/library/tools/R/utils.R @@ -1762,8 +1762,8 @@ function(x, dfile) ## content. ## Cf. tools::showNonASCII(): asc <- iconv(x, "latin1", "ASCII") - ind <- is.na(asc) | (asc != x) - if(any(ind)) { + ## fields might have been NA to start with, so use identical. + if(!identical(asc, x)) { warning(gettext("Unknown encoding with non-ASCII data: converting to ASCII"), domain = NA) x[ind] <- iconv(x[ind], "latin1", "ASCII", sub = "byte") diff --git a/source/src/library/tools/man/Rd2txt_options.Rd b/source/src/library/tools/man/Rd2txt_options.Rd index c2a8f5409..898f147e0 100644 --- a/source/src/library/tools/man/Rd2txt_options.Rd +++ b/source/src/library/tools/man/Rd2txt_options.Rd @@ -39,7 +39,7 @@ Rd2txt_options(...) expanding \verb{\href} tags.} \item{code_quote}{(default \code{TRUE}): Whether to render \verb{\code} and similar with single quotes.} - \item{underline_titles}{default \code{TRUE}): Whether to render + \item{underline_titles}{(default \code{TRUE}): Whether to render section titles with underlines (via backspacing).} } } diff --git a/source/src/library/tools/man/checkRdaFiles.Rd b/source/src/library/tools/man/checkRdaFiles.Rd index 87ddb0316..267652838 100644 --- a/source/src/library/tools/man/checkRdaFiles.Rd +++ b/source/src/library/tools/man/checkRdaFiles.Rd @@ -1,6 +1,6 @@ % File src/library/tools/man/checkRdaFiles.Rd % Part of the R package, https://www.R-project.org -% Copyright 2009-11 R Core Team +% Copyright 2009-2017 R Core Team % Distributed under GPL 2 or later \name{checkRdaFiles} @@ -28,7 +28,7 @@ resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"), this specifies a single directory, it is taken to refer to all \file{.rda} and \file{.RData} files in that directory.} - \item{compress, compression_level}{type and level of compression: see + \item{compress, compression_level}{Type and level of compression: see \code{\link{save}}. Values of \code{compress} can be abbreviated.} } @@ -52,7 +52,8 @@ resaveRdaFiles(paths, compress = c("auto", "gzip", "bzip2", "xz"), means that if this is an \R save file it is from a later version of \R).} \item{version}{integer: the version of the save -- usually \code{2} - but \code{1} for very old files, and \code{NA} for other files.} + but \code{1} for very old files, and \code{NA} for other files. + Unfortunately \code{2} means \sQuote{version 2 or later}.} } \examples{\dontrun{ ## from a package top-level source directory diff --git a/source/src/library/tools/man/vignetteDepends.Rd b/source/src/library/tools/man/vignetteDepends.Rd index 95a4e4d1b..b441599a7 100644 --- a/source/src/library/tools/man/vignetteDepends.Rd +++ b/source/src/library/tools/man/vignetteDepends.Rd @@ -36,7 +36,7 @@ vignetteDepends(vignette, recursive = TRUE, reduce = TRUE, If \code{reduce} is \code{TRUE}, the system will collapse the fields in the \code{DependsList} object such that a minimal set of dependencies are specified (for instance if there was - \samp{foo, foo (>= 1.0.0), foo (>= 1.3.0}, it would only return + \samp{foo, foo (>= 1.0.0), foo (>= 1.3.0)}, it would only return \samp{foo (>= 1.3.0)}). } \value{ diff --git a/source/src/library/tools/man/writePACKAGES.Rd b/source/src/library/tools/man/writePACKAGES.Rd index 86d34ca9f..9e7f5a6b9 100644 --- a/source/src/library/tools/man/writePACKAGES.Rd +++ b/source/src/library/tools/man/writePACKAGES.Rd @@ -49,8 +49,8 @@ write_PACKAGES(dir = ".", fields = NULL, \item{unpacked}{a logical indicating whether the package contents are available in unpacked form or not (default).} \item{subdirs}{either logical (to indicate if subdirectories should be - included, recursively) or a character vector of name of subdirectories - to include.} + included, recursively) or a character vector of names of subdirectories + to include (which are not recursed).} \item{latestOnly}{logical: if multiple versions of a package are available should only the latest version be included?} \item{addFiles}{logical: should the filenames be included as field diff --git a/source/src/library/tools/src/gramLatex.c b/source/src/library/tools/src/gramLatex.c index 634647b6e..a4066601a 100644 --- a/source/src/library/tools/src/gramLatex.c +++ b/source/src/library/tools/src/gramLatex.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -213,11 +213,11 @@ static int mkVerbEnv(); -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -230,7 +230,7 @@ static int mkVerbEnv(); #endif -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -238,21 +238,20 @@ static int mkVerbEnv(); extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - END_OF_INPUT = 258, - ERROR = 259, - MACRO = 260, - TEXT = 261, - COMMENT = 262, - BEGIN = 263, - END = 264, - VERB = 265 - }; + enum yytokentype + { + END_OF_INPUT = 258, + ERROR = 259, + MACRO = 260, + TEXT = 261, + COMMENT = 262, + BEGIN = 263, + END = 264, + VERB = 265 + }; #endif /* Tokens. */ #define END_OF_INPUT 258 @@ -264,43 +263,31 @@ extern int yydebug; #define END 264 #define VERB 265 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif + extern YYSTYPE yylval; extern YYLTYPE yylloc; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ @@ -320,11 +307,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -344,8 +328,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -367,11 +350,30 @@ typedef short int yytype_int16; # endif #endif -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif @@ -382,25 +384,26 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -418,8 +421,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -431,8 +433,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -448,7 +450,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -456,15 +458,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -474,8 +474,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -501,16 +501,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -529,7 +529,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -545,17 +545,19 @@ union yyalloc #define YYNNTS 9 /* YYNRULES -- Number of rules. */ #define YYNRULES 21 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 36 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 265 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -588,27 +590,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 6, 8, 10, 12, 14, 17, 20, - 22, 25, 27, 29, 31, 33, 35, 37, 38, 49, - 53, 57 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 15, 0, -1, 16, 3, -1, 3, -1, 1, -1, - 18, -1, 21, -1, 16, 18, -1, 16, 21, -1, - 18, -1, 17, 18, -1, 6, -1, 7, -1, 5, - -1, 10, -1, 19, -1, 22, -1, -1, 8, 11, - 6, 12, 20, 16, 9, 11, 6, 12, -1, 13, - 17, 13, -1, 11, 16, 12, -1, 11, 12, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 166, 166, 167, 168, 171, 172, 173, 174, 176, @@ -625,13 +607,13 @@ static const char *const yytname[] = "$end", "error", "$undefined", "END_OF_INPUT", "ERROR", "MACRO", "TEXT", "COMMENT", "BEGIN", "END", "VERB", "'{'", "'}'", "'$'", "$accept", "Init", "Items", "nonMath", "Item", "environment", "$@1", "math", - "block", YY_NULL + "block", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -639,25 +621,29 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 14, 15, 15, 15, 16, 16, 16, 16, 17, - 17, 18, 18, 18, 18, 18, 18, 20, 19, 21, - 22, 22 -}; +#define YYPACT_NINF -10 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-10))) + +#define YYTABLE_NINF -1 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int8 yypact[] = { - 0, 2, 2, 1, 1, 1, 1, 2, 2, 1, - 2, 1, 1, 1, 1, 1, 1, 0, 10, 3, - 3, 2 + 23, -10, -10, -10, -10, -10, -8, -10, 32, 77, + 4, 8, -10, -10, -10, -10, 0, -10, 41, 59, + -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, + 68, 50, -3, 11, 15, -10 }; -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 4, 3, 13, 11, 12, 0, 14, 0, 0, @@ -666,33 +652,21 @@ static const yytype_uint8 yydefact[] = 0, 0, 0, 0, 0, 18 }; -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 10, 11, 19, 12, 13, 30, 14, 15 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -10 -static const yytype_int8 yypact[] = + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = { - 23, -10, -10, -10, -10, -10, -8, -10, 32, 77, - 4, 8, -10, -10, -10, -10, 0, -10, 41, 59, - -10, -10, -10, -10, -10, -5, -10, -10, -10, -10, - 68, 50, -3, 11, 15, -10 + -10, -10, -7, -10, -9, -10, -10, -6, -10 }; -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { - -10, -10, -7, -10, -9, -10, -10, -6, -10 + -1, 10, 11, 19, 12, 13, 30, 14, 15 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_uint8 yytable[] = { 20, 18, 23, 16, 21, 24, 25, 29, 33, 23, @@ -706,12 +680,6 @@ static const yytype_uint8 yytable[] = 0, 9, 3, 4, 5, 6, 0, 7, 8 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-10))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int8 yycheck[] = { 9, 8, 11, 11, 0, 11, 6, 12, 11, 18, @@ -725,8 +693,8 @@ static const yytype_int8 yycheck[] = -1, 13, 5, 6, 7, 8, -1, 10, 11 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 1, 3, 5, 6, 7, 8, 10, 11, 13, @@ -735,30 +703,32 @@ static const yytype_uint8 yystos[] = 20, 16, 9, 11, 6, 12 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 14, 15, 15, 15, 16, 16, 16, 16, 17, + 17, 18, 18, 18, 18, 18, 18, 20, 19, 21, + 22, 22 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 2, 1, 1, 1, 1, 2, 2, 1, + 2, 1, 1, 1, 1, 1, 1, 0, 10, 3, + 3, 2 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -775,13 +745,13 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -791,7 +761,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -805,12 +775,27 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -820,36 +805,28 @@ while (YYID (0)) /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +YY_ATTRIBUTE_UNUSED static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) - FILE *yyo; - YYLTYPE const * const yylocp; -#endif { unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); + res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); + res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); + res += YYFPRINTF (yyo, "-%d", end_col); } return res; } @@ -863,67 +840,33 @@ yy_location_print_ (yyo, yylocp) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); + YYUSE (yylocationp); if (!yyvaluep) return; - YYUSE (yylocationp); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif YYUSE (yytype); } @@ -933,23 +876,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -962,16 +893,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -982,50 +905,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yylsp, yyrule) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1039,7 +954,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1062,15 +977,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1086,16 +994,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1125,27 +1025,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1168,11 +1068,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1180,10 +1080,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1233,7 +1129,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1300,58 +1196,53 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 5: /* MACRO */ + case 5: /* MACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 6: /* TEXT */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 6: /* TEXT */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 7: /* COMMENT */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 7: /* COMMENT */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 8: /* BEGIN */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 8: /* BEGIN */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 9: /* END */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 9: /* END */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; + default: break; } + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1360,26 +1251,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; - - /* Number of syntax errors so far. */ int yynerrs; @@ -1388,36 +1267,17 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1496,26 +1356,26 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1523,23 +1383,23 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1549,10 +1409,10 @@ yyparse () yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -1581,7 +1441,7 @@ yyparse () if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1646,7 +1506,7 @@ yyparse () yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1662,103 +1522,123 @@ yyparse () { case 2: - { xxsavevalue((yyvsp[(1) - (2)]), &(yyloc)); YYACCEPT; } + { xxsavevalue((yyvsp[-1]), &(yyloc)); YYACCEPT; } + break; case 3: { xxsavevalue(NULL, &(yyloc)); YYACCEPT; } + break; case 4: { PROTECT(parseState.Value = R_NilValue); YYABORT; } + break; case 5: - { (yyval) = xxnewlist((yyvsp[(1) - (1)])); } + { (yyval) = xxnewlist((yyvsp[0])); } + break; case 6: - { (yyval) = xxnewlist((yyvsp[(1) - (1)])); } + { (yyval) = xxnewlist((yyvsp[0])); } + break; case 7: - { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } + { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); } + break; case 8: - { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } + { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); } + break; case 9: - { (yyval) = xxnewlist((yyvsp[(1) - (1)])); } + { (yyval) = xxnewlist((yyvsp[0])); } + break; case 10: - { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } + { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); } + break; case 11: - { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); } + break; case 12: - { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); } + break; case 13: - { (yyval) = xxtag((yyvsp[(1) - (1)]), MACRO, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), MACRO, &(yyloc)); } + break; case 14: - { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), VERB, &(yyloc)); } + break; case 15: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 16: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 17: - { xxSetInVerbEnv((yyvsp[(3) - (4)])); } + { xxSetInVerbEnv((yyvsp[-1])); } + break; case 18: - { (yyval) = xxenv((yyvsp[(3) - (10)]), (yyvsp[(6) - (10)]), (yyvsp[(9) - (10)]), &(yyloc)); - UNPROTECT_PTR((yyvsp[(1) - (10)])); UNPROTECT_PTR((yyvsp[(7) - (10)])); } + { (yyval) = xxenv((yyvsp[-7]), (yyvsp[-4]), (yyvsp[-1]), &(yyloc)); + UNPROTECT_PTR((yyvsp[-9])); UNPROTECT_PTR((yyvsp[-3])); } + break; case 19: - { (yyval) = xxmath((yyvsp[(2) - (3)]), &(yyloc)); } + { (yyval) = xxmath((yyvsp[-1]), &(yyloc)); } + break; case 20: - { (yyval) = xxblock((yyvsp[(2) - (3)]), &(yyloc)); } + { (yyval) = xxblock((yyvsp[-1]), &(yyloc)); } + break; case 21: { (yyval) = xxblock(NULL, &(yyloc)); } + break; @@ -1785,7 +1665,7 @@ yyparse () *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -1800,9 +1680,9 @@ yyparse () goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -1853,20 +1733,20 @@ yyparse () if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -1886,7 +1766,7 @@ yyparse () goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -1899,29 +1779,29 @@ yyparse () | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); + yystos[yystate], yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -1977,14 +1857,14 @@ yyparse () yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); + yystos[*yyssp], yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -1995,14 +1875,11 @@ yyparse () if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - static SEXP xxnewlist(SEXP item) { SEXP ans, tmp; diff --git a/source/src/library/tools/src/gramRd.c b/source/src/library/tools/src/gramRd.c index 2f6d3df66..42b3b65ed 100644 --- a/source/src/library/tools/src/gramRd.c +++ b/source/src/library/tools/src/gramRd.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -246,11 +246,11 @@ static int mkComment(int); -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -263,7 +263,7 @@ static int mkComment(int); #endif -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -271,54 +271,53 @@ static int mkComment(int); extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - END_OF_INPUT = 258, - ERROR = 259, - SECTIONHEADER = 260, - RSECTIONHEADER = 261, - VSECTIONHEADER = 262, - SECTIONHEADER2 = 263, - RCODEMACRO = 264, - SEXPR = 265, - RDOPTS = 266, - LATEXMACRO = 267, - VERBMACRO = 268, - OPTMACRO = 269, - ESCAPE = 270, - LISTSECTION = 271, - ITEMIZE = 272, - DESCRIPTION = 273, - NOITEM = 274, - LATEXMACRO2 = 275, - VERBMACRO2 = 276, - VERBLATEX = 277, - LATEXMACRO3 = 278, - NEWCOMMAND = 279, - USERMACRO = 280, - USERMACRO1 = 281, - USERMACRO2 = 282, - USERMACRO3 = 283, - USERMACRO4 = 284, - USERMACRO5 = 285, - USERMACRO6 = 286, - USERMACRO7 = 287, - USERMACRO8 = 288, - USERMACRO9 = 289, - IFDEF = 290, - ENDIF = 291, - TEXT = 292, - RCODE = 293, - VERB = 294, - COMMENT = 295, - UNKNOWN = 296, - STARTFILE = 297, - STARTFRAGMENT = 298 - }; + enum yytokentype + { + END_OF_INPUT = 258, + ERROR = 259, + SECTIONHEADER = 260, + RSECTIONHEADER = 261, + VSECTIONHEADER = 262, + SECTIONHEADER2 = 263, + RCODEMACRO = 264, + SEXPR = 265, + RDOPTS = 266, + LATEXMACRO = 267, + VERBMACRO = 268, + OPTMACRO = 269, + ESCAPE = 270, + LISTSECTION = 271, + ITEMIZE = 272, + DESCRIPTION = 273, + NOITEM = 274, + LATEXMACRO2 = 275, + VERBMACRO2 = 276, + VERBLATEX = 277, + LATEXMACRO3 = 278, + NEWCOMMAND = 279, + USERMACRO = 280, + USERMACRO1 = 281, + USERMACRO2 = 282, + USERMACRO3 = 283, + USERMACRO4 = 284, + USERMACRO5 = 285, + USERMACRO6 = 286, + USERMACRO7 = 287, + USERMACRO8 = 288, + USERMACRO9 = 289, + IFDEF = 290, + ENDIF = 291, + TEXT = 292, + RCODE = 293, + VERB = 294, + COMMENT = 295, + UNKNOWN = 296, + STARTFILE = 297, + STARTFRAGMENT = 298 + }; #endif /* Tokens. */ #define END_OF_INPUT 258 @@ -363,43 +362,31 @@ extern int yydebug; #define STARTFILE 297 #define STARTFRAGMENT 298 - - +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif + extern YYSTYPE yylval; extern YYLTYPE yylloc; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ @@ -419,11 +406,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -443,8 +427,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -466,11 +449,30 @@ typedef short int yytype_int16; # endif #endif -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif @@ -481,25 +483,26 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -517,8 +520,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -530,8 +532,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -547,7 +549,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -555,15 +557,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -573,8 +573,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -600,16 +600,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -628,7 +628,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -644,17 +644,19 @@ union yyalloc #define YYNNTS 31 /* YYNRULES -- Number of rules. */ #define YYNRULES 89 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 194 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 298 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -690,58 +692,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 7, 11, 13, 16, 18, 20, 23, - 26, 29, 32, 35, 38, 42, 47, 52, 56, 61, - 63, 65, 67, 70, 72, 75, 77, 79, 81, 83, - 85, 87, 89, 91, 94, 97, 101, 106, 109, 112, - 116, 121, 124, 128, 133, 136, 139, 143, 145, 150, - 155, 159, 163, 165, 168, 172, 177, 183, 190, 198, - 208, 219, 231, 234, 237, 240, 243, 246, 249, 254, - 258, 261, 264, 269, 273, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 289, 292, 297, 301, 306 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 49, 0, -1, 42, 51, 3, -1, 43, 50, 3, - -1, 1, -1, 68, 54, -1, 52, -1, 53, -1, - 52, 53, -1, 7, 64, -1, 11, 64, -1, 6, - 62, -1, 5, 58, -1, 16, 61, -1, 8, 58, - 59, -1, 35, 67, 52, 36, -1, 35, 67, 52, - 1, -1, 10, 71, 63, -1, 10, 71, 78, 63, - -1, 40, -1, 37, -1, 57, -1, 1, 53, -1, - 55, -1, 54, 55, -1, 37, -1, 38, -1, 39, - -1, 40, -1, 41, -1, 77, -1, 56, -1, 57, - -1, 1, 55, -1, 12, 58, -1, 20, 58, 59, - -1, 23, 58, 59, 59, -1, 17, 60, -1, 18, - 61, -1, 14, 71, 58, -1, 14, 71, 78, 58, - -1, 9, 62, -1, 10, 71, 63, -1, 10, 71, - 78, 63, -1, 13, 64, -1, 21, 65, -1, 21, - 65, 66, -1, 15, -1, 35, 67, 54, 36, -1, - 35, 67, 54, 1, -1, 22, 64, 59, -1, 24, - 65, 64, -1, 25, -1, 26, 64, -1, 27, 64, - 64, -1, 28, 64, 64, 64, -1, 29, 64, 64, - 64, 64, -1, 30, 64, 64, 64, 64, 64, -1, - 31, 64, 64, 64, 64, 64, 64, -1, 32, 64, - 64, 64, 64, 64, 64, 64, 64, -1, 33, 64, - 64, 64, 64, 64, 64, 64, 64, 64, -1, 34, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - -1, 68, 77, -1, 68, 77, -1, 68, 37, -1, - 75, 77, -1, 76, 77, -1, 69, 77, -1, 44, - 70, 54, 45, -1, 44, 70, 45, -1, 72, 77, - -1, 73, 77, -1, 44, 74, 54, 45, -1, 44, - 74, 45, -1, 68, 37, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 44, 54, 45, -1, 44, - 45, -1, 44, 54, 1, 45, -1, 44, 1, 45, - -1, 44, 54, 1, 3, -1, 46, 55, 47, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 214, 214, 215, 216, 219, 222, 225, 226, 228, @@ -775,13 +726,13 @@ static const char *const yytname[] = "RLikeArg", "RLikeArg2", "VerbatimArg", "VerbatimArg1", "VerbatimArg2", "IfDefTarget", "goLatexLike", "goRLike", "goRLike2", "goOption", "goVerbatim", "goVerbatim1", "goVerbatim2", "goItem0", "goItem2", "Arg", - "Option", YY_NULL + "Option", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -792,73 +743,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 48, 49, 49, 49, 50, 51, 52, 52, 53, - 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, - 53, 53, 53, 54, 54, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, - 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, - 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, - 57, 57, 58, 59, 59, 60, 61, 62, 63, 63, - 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 75, 76, 77, 77, 77, 77, 77, 78 -}; +#define YYPACT_NINF -94 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 3, 3, 1, 2, 1, 1, 2, 2, - 2, 2, 2, 2, 3, 4, 4, 3, 4, 1, - 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 2, 2, 3, 4, 2, 2, 3, - 4, 2, 3, 4, 2, 2, 3, 1, 4, 4, - 3, 3, 1, 2, 3, 4, 5, 6, 7, 9, - 10, 11, 2, 2, 2, 2, 2, 2, 4, 3, - 2, 2, 4, 3, 2, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 3, 2, 4, 3, 4, 3 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-94))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 4, 0, 75, 0, 0, 75, 76, 79, 75, - 78, 79, 83, 80, 52, 79, 79, 79, 79, 79, - 79, 79, 79, 79, 75, 20, 19, 0, 0, 7, - 21, 0, 0, 1, 22, 12, 0, 11, 0, 9, - 0, 75, 0, 10, 13, 0, 79, 0, 53, 79, - 79, 79, 79, 79, 79, 79, 79, 0, 0, 2, - 8, 3, 0, 76, 78, 75, 79, 78, 47, 82, - 83, 75, 80, 79, 75, 75, 25, 26, 27, 28, - 29, 0, 0, 23, 31, 32, 30, 62, 67, 70, - 14, 0, 77, 0, 17, 0, 66, 51, 71, 54, - 79, 79, 79, 79, 79, 79, 79, 0, 74, 33, - 41, 0, 34, 44, 75, 37, 0, 38, 75, 45, - 75, 75, 0, 0, 85, 0, 24, 64, 63, 0, - 0, 18, 55, 79, 79, 79, 79, 79, 79, 0, - 15, 42, 0, 39, 75, 65, 35, 81, 46, 50, - 75, 0, 87, 0, 84, 69, 0, 89, 56, 79, - 79, 79, 79, 79, 43, 40, 0, 36, 0, 48, - 88, 86, 68, 57, 79, 79, 79, 79, 73, 0, - 58, 79, 79, 79, 72, 79, 79, 79, 59, 79, - 79, 60, 79, 61 -}; +#define YYTABLE_NINF -50 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 4, 31, 27, 28, 29, 82, 83, 84, 85, - 35, 90, 115, 44, 37, 94, 39, 46, 148, 57, - 36, 38, 129, 42, 40, 47, 166, 116, 45, 86, - 95 -}; +#define yytable_value_is_error(Yytable_value) \ + 0 -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -94 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 28, -94, 792, -94, 20, 792, -94, -94, -94, -94, @@ -883,7 +779,34 @@ static const yytype_int16 yypact[] = -94, -94, -94, -94 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 4, 0, 75, 0, 0, 75, 76, 79, 75, + 78, 79, 83, 80, 52, 79, 79, 79, 79, 79, + 79, 79, 79, 79, 75, 20, 19, 0, 0, 7, + 21, 0, 0, 1, 22, 12, 0, 11, 0, 9, + 0, 75, 0, 10, 13, 0, 79, 0, 53, 79, + 79, 79, 79, 79, 79, 79, 79, 0, 0, 2, + 8, 3, 0, 76, 78, 75, 79, 78, 47, 82, + 83, 75, 80, 79, 75, 75, 25, 26, 27, 28, + 29, 0, 0, 23, 31, 32, 30, 62, 67, 70, + 14, 0, 77, 0, 17, 0, 66, 51, 71, 54, + 79, 79, 79, 79, 79, 79, 79, 0, 74, 33, + 41, 0, 34, 44, 75, 37, 0, 38, 75, 45, + 75, 75, 0, 0, 85, 0, 24, 64, 63, 0, + 0, 18, 55, 79, 79, 79, 79, 79, 79, 0, + 15, 42, 0, 39, 75, 65, 35, 81, 46, 50, + 75, 0, 87, 0, 84, 69, 0, 89, 56, 79, + 79, 79, 79, 79, 43, 40, 0, 36, 0, 48, + 88, 86, 68, 57, 79, 79, 79, 79, 73, 0, + 58, 79, 79, 79, 72, 79, 79, 79, 59, 79, + 79, 60, 79, 61 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -94, -94, -94, -94, 3, -2, -64, -10, -94, 22, @@ -892,10 +815,18 @@ static const yytype_int8 yypgoto[] = -58 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -50 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 4, 31, 27, 28, 29, 82, 83, 84, 85, + 35, 90, 115, 44, 37, 94, 39, 46, 148, 57, + 36, 38, 129, 42, 40, 47, 166, 116, 45, 86, + 95 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 43, 41, 131, 34, 48, 49, 50, 51, 52, 53, @@ -984,12 +915,6 @@ static const yytype_int16 yytable[] = 0, 0, 26 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-94))) - -#define yytable_value_is_error(Yytable_value) \ - YYID (0) - static const yytype_int16 yycheck[] = { 11, 9, 95, 5, 15, 16, 17, 18, 19, 20, @@ -1078,8 +1003,8 @@ static const yytype_int16 yycheck[] = -1, -1, 40 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 1, 42, 43, 49, 1, 5, 6, 7, 8, @@ -1104,30 +1029,44 @@ static const yytype_uint8 yystos[] = 64, 64, 64, 64 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 48, 49, 49, 49, 50, 51, 52, 52, 53, + 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, + 53, 53, 53, 54, 54, 55, 55, 55, 55, 55, + 55, 55, 55, 55, 56, 56, 56, 56, 56, 56, + 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, + 56, 57, 57, 57, 57, 57, 57, 57, 57, 57, + 57, 57, 58, 59, 59, 60, 61, 62, 63, 63, + 64, 65, 66, 66, 67, 68, 69, 70, 71, 72, + 73, 74, 75, 76, 77, 77, 77, 77, 77, 78 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 3, 3, 1, 2, 1, 1, 2, 2, + 2, 2, 2, 2, 3, 4, 4, 3, 4, 1, + 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 2, 2, 3, 4, 2, 2, 3, + 4, 2, 3, 4, 2, 2, 3, 1, 4, 4, + 3, 3, 1, 2, 3, 4, 5, 6, 7, 9, + 10, 11, 2, 2, 2, 2, 2, 2, 4, 3, + 2, 2, 4, 3, 2, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 3, 2, 4, 3, 4, 3 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -1144,13 +1083,13 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -1160,7 +1099,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -1174,12 +1113,27 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -1189,36 +1143,28 @@ while (YYID (0)) /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +YY_ATTRIBUTE_UNUSED static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) - FILE *yyo; - YYLTYPE const * const yylocp; -#endif { unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); + res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); + res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); + res += YYFPRINTF (yyo, "-%d", end_col); } return res; } @@ -1232,67 +1178,33 @@ yy_location_print_ (yyo, yylocp) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); + YYUSE (yylocationp); if (!yyvaluep) return; - YYUSE (yylocationp); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif YYUSE (yytype); } @@ -1302,23 +1214,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -1331,16 +1231,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1351,50 +1243,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yylsp, yyrule) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1408,7 +1292,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1431,15 +1315,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1455,16 +1332,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1494,27 +1363,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1537,11 +1406,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1549,10 +1418,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1602,7 +1467,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1669,303 +1534,347 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN switch (yytype) { - case 5: /* SECTIONHEADER */ + case 5: /* SECTIONHEADER */ - { UNPROTECT_PTR((*yyvaluep)); }; + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 6: /* RSECTIONHEADER */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 6: /* RSECTIONHEADER */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 7: /* VSECTIONHEADER */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 7: /* VSECTIONHEADER */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 8: /* SECTIONHEADER2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 8: /* SECTIONHEADER2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 9: /* RCODEMACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 9: /* RCODEMACRO */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 10: /* SEXPR */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 10: /* SEXPR */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 12: /* LATEXMACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 12: /* LATEXMACRO */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 13: /* VERBMACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 13: /* VERBMACRO */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 14: /* OPTMACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 14: /* OPTMACRO */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 15: /* ESCAPE */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 15: /* ESCAPE */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 16: /* LISTSECTION */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 16: /* LISTSECTION */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 17: /* ITEMIZE */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 17: /* ITEMIZE */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 18: /* DESCRIPTION */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 18: /* DESCRIPTION */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 19: /* NOITEM */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 19: /* NOITEM */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 20: /* LATEXMACRO2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 20: /* LATEXMACRO2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 21: /* VERBMACRO2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 21: /* VERBMACRO2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 22: /* VERBLATEX */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 22: /* VERBLATEX */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 23: /* LATEXMACRO3 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 23: /* LATEXMACRO3 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 24: /* NEWCOMMAND */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 24: /* NEWCOMMAND */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 25: /* USERMACRO */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 25: /* USERMACRO */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 26: /* USERMACRO1 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 26: /* USERMACRO1 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 27: /* USERMACRO2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 27: /* USERMACRO2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 28: /* USERMACRO3 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 28: /* USERMACRO3 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 29: /* USERMACRO4 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 29: /* USERMACRO4 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 30: /* USERMACRO5 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 30: /* USERMACRO5 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 31: /* USERMACRO6 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 31: /* USERMACRO6 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 32: /* USERMACRO7 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 32: /* USERMACRO7 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 33: /* USERMACRO8 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 33: /* USERMACRO8 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 34: /* USERMACRO9 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 34: /* USERMACRO9 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 35: /* IFDEF */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 35: /* IFDEF */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 36: /* ENDIF */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 36: /* ENDIF */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 37: /* TEXT */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 37: /* TEXT */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 38: /* RCODE */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 38: /* RCODE */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 39: /* VERB */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 39: /* VERB */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 40: /* COMMENT */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 40: /* COMMENT */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 41: /* UNKNOWN */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 41: /* UNKNOWN */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 42: /* STARTFILE */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 42: /* STARTFILE */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 43: /* STARTFRAGMENT */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 43: /* STARTFRAGMENT */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 54: /* ArgItems */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 54: /* ArgItems */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 58: /* LatexArg */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 58: /* LatexArg */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 63: /* RLikeArg2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 63: /* RLikeArg2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 65: /* VerbatimArg1 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 65: /* VerbatimArg1 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 66: /* VerbatimArg2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 66: /* VerbatimArg2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 67: /* IfDefTarget */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 67: /* IfDefTarget */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 68: /* goLatexLike */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 68: /* goLatexLike */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 69: /* goRLike */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 69: /* goRLike */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 70: /* goRLike2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 70: /* goRLike2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 71: /* goOption */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 71: /* goOption */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 72: /* goVerbatim */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 72: /* goVerbatim */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 73: /* goVerbatim1 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 73: /* goVerbatim1 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 74: /* goVerbatim2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 74: /* goVerbatim2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 75: /* goItem0 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 75: /* goItem0 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 76: /* goItem2 */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 76: /* goItem2 */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; - case 78: /* Option */ - { UNPROTECT_PTR((*yyvaluep)); }; + case 78: /* Option */ + + { UNPROTECT_PTR(((*yyvaluep))); } break; + default: break; } + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1974,26 +1883,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; - - /* Number of syntax errors so far. */ int yynerrs; @@ -2002,36 +1899,17 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -2110,26 +1988,26 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -2137,23 +2015,23 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -2163,10 +2041,10 @@ yyparse () yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -2195,7 +2073,7 @@ yyparse () if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -2260,7 +2138,7 @@ yyparse () yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -2276,449 +2154,537 @@ yyparse () { case 2: - { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; } + { xxsavevalue((yyvsp[-1]), &(yyloc)); UNPROTECT_PTR((yyvsp[-2])); YYACCEPT; } + break; case 3: - { xxsavevalue((yyvsp[(2) - (3)]), &(yyloc)); UNPROTECT_PTR((yyvsp[(1) - (3)])); YYACCEPT; } + { xxsavevalue((yyvsp[-1]), &(yyloc)); UNPROTECT_PTR((yyvsp[-2])); YYACCEPT; } + break; case 4: { PROTECT(parseState.Value = R_NilValue); YYABORT; } + break; case 5: - { (yyval) = (yyvsp[(2) - (2)]); UNPROTECT_PTR((yyvsp[(1) - (2)])); } + { (yyval) = (yyvsp[0]); UNPROTECT_PTR((yyvsp[-1])); } + break; case 6: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 7: - { (yyval) = xxnewlist((yyvsp[(1) - (1)])); } + { (yyval) = xxnewlist((yyvsp[0])); } + break; case 8: - { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } + { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); } + break; case 9: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 10: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), HAS_SEXPR, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); } + break; case 11: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 12: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 13: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 14: - { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); } + break; case 15: - { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); } + { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[0])); } + break; case 16: - { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); } + break; case 17: - { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); } + { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-1])); } + break; case 18: - { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); } + { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-2])); } + break; case 19: - { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); } + break; case 20: - { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); } + break; case 21: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 22: - { (yyval) = (yyvsp[(2) - (2)]); } + { (yyval) = (yyvsp[0]); } + break; case 23: - { (yyval) = xxnewlist((yyvsp[(1) - (1)])); } + { (yyval) = xxnewlist((yyvsp[0])); } + break; case 24: - { (yyval) = xxlist((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)])); } + { (yyval) = xxlist((yyvsp[-1]), (yyvsp[0])); } + break; case 25: - { (yyval) = xxtag((yyvsp[(1) - (1)]), TEXT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), TEXT, &(yyloc)); } + break; case 26: - { (yyval) = xxtag((yyvsp[(1) - (1)]), RCODE, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), RCODE, &(yyloc)); } + break; case 27: - { (yyval) = xxtag((yyvsp[(1) - (1)]), VERB, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), VERB, &(yyloc)); } + break; case 28: - { (yyval) = xxtag((yyvsp[(1) - (1)]), COMMENT, &(yyloc)); } + { (yyval) = xxtag((yyvsp[0]), COMMENT, &(yyloc)); } + break; case 29: - { (yyval) = xxtag((yyvsp[(1) - (1)]), UNKNOWN, &(yyloc)); yyerror(yyunknown); } + { (yyval) = xxtag((yyvsp[0]), UNKNOWN, &(yyloc)); yyerror(yyunknown); } + break; case 30: - { (yyval) = xxmarkup(R_NilValue, (yyvsp[(1) - (1)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup(R_NilValue, (yyvsp[0]), STATIC, &(yyloc)); } + break; case 31: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 32: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 33: - { (yyval) = (yyvsp[(2) - (2)]); } + { (yyval) = (yyvsp[0]); } + break; case 34: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 35: - { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); } + break; case 36: - { (yyval) = xxmarkup3((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup3((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 37: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 38: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 39: - { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); } + { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), STATIC, &(yyloc)); xxpopMode((yyvsp[-1])); } + break; case 40: - { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), STATIC, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); } + { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); xxpopMode((yyvsp[-2])); } + break; case 41: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 42: - { (yyval) = xxmarkup((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (3)])); } + { (yyval) = xxmarkup((yyvsp[-2]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-1])); } + break; case 43: - { (yyval) = xxOptionmarkup((yyvsp[(1) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[(2) - (4)])); } + { (yyval) = xxOptionmarkup((yyvsp[-3]), (yyvsp[-1]), (yyvsp[0]), HAS_SEXPR, &(yyloc)); xxpopMode((yyvsp[-2])); } + break; case 44: - { (yyval) = xxmarkup((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[-1]), (yyvsp[0]), STATIC, &(yyloc)); } + break; case 45: - { (yyval) = xxmarkup2((yyvsp[(1) - (2)]), (yyvsp[(2) - (2)]), R_NilValue, 1, STATIC, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-1]), (yyvsp[0]), R_NilValue, 1, STATIC, &(yyloc)); } + break; case 46: - { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); } + break; case 47: - { (yyval) = xxmarkup((yyvsp[(1) - (1)]), R_NilValue, STATIC, &(yyloc)); } + { (yyval) = xxmarkup((yyvsp[0]), R_NilValue, STATIC, &(yyloc)); } + break; case 48: - { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[(4) - (4)])); } + { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); UNPROTECT_PTR((yyvsp[0])); } + break; case 49: - { (yyval) = xxmarkup2((yyvsp[(1) - (4)]), (yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), 2, HAS_IFDEF, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), 2, HAS_IFDEF, &(yyloc)); } + break; case 50: - { (yyval) = xxmarkup2((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), 2, STATIC, &(yyloc)); } + { (yyval) = xxmarkup2((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), 2, STATIC, &(yyloc)); } + break; case 51: - { (yyval) = xxnewcommand((yyvsp[(1) - (3)]), (yyvsp[(2) - (3)]), (yyvsp[(3) - (3)]), &(yyloc)); } + { (yyval) = xxnewcommand((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0]), &(yyloc)); } + break; case 52: - { (yyval) = xxusermacro((yyvsp[(1) - (1)]), xxnewlist(NULL), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[0]), xxnewlist(NULL), &(yyloc)); } + break; case 53: - { (yyval) = xxusermacro((yyvsp[(1) - (2)]), xxnewlist((yyvsp[(2) - (2)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-1]), xxnewlist((yyvsp[0])), &(yyloc)); } + break; case 54: - { (yyval) = xxusermacro((yyvsp[(1) - (3)]), xxnewlist2((yyvsp[(2) - (3)]), (yyvsp[(3) - (3)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-2]), xxnewlist2((yyvsp[-1]), (yyvsp[0])), &(yyloc)); } + break; case 55: - { (yyval) = xxusermacro((yyvsp[(1) - (4)]), xxnewlist3((yyvsp[(2) - (4)]), (yyvsp[(3) - (4)]), (yyvsp[(4) - (4)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-3]), xxnewlist3((yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); } + break; case 56: - { (yyval) = xxusermacro((yyvsp[(1) - (5)]), xxnewlist4((yyvsp[(2) - (5)]), (yyvsp[(3) - (5)]), (yyvsp[(4) - (5)]), (yyvsp[(5) - (5)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-4]), xxnewlist4((yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); } + break; case 57: - { (yyval) = xxusermacro((yyvsp[(1) - (6)]), xxnewlist5((yyvsp[(2) - (6)]), (yyvsp[(3) - (6)]), (yyvsp[(4) - (6)]), (yyvsp[(5) - (6)]), (yyvsp[(6) - (6)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-5]), xxnewlist5((yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); } + break; case 58: - { (yyval) = xxusermacro((yyvsp[(1) - (7)]), xxnewlist6((yyvsp[(2) - (7)]), (yyvsp[(3) - (7)]), (yyvsp[(4) - (7)]), (yyvsp[(5) - (7)]), (yyvsp[(6) - (7)]), (yyvsp[(7) - (7)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-6]), xxnewlist6((yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1]), (yyvsp[0])), &(yyloc)); } + break; case 59: - { (yyval) = xxusermacro((yyvsp[(1) - (9)]), xxnewlist7((yyvsp[(2) - (9)]), (yyvsp[(3) - (9)]), (yyvsp[(4) - (9)]), (yyvsp[(5) - (9)]), (yyvsp[(6) - (9)]), (yyvsp[(7) - (9)]), (yyvsp[(8) - (9)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-8]), xxnewlist7((yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); } + break; case 60: - { (yyval) = xxusermacro((yyvsp[(1) - (10)]), xxnewlist8((yyvsp[(2) - (10)]), (yyvsp[(3) - (10)]), (yyvsp[(4) - (10)]), (yyvsp[(5) - (10)]), (yyvsp[(6) - (10)]), (yyvsp[(7) - (10)]), (yyvsp[(8) - (10)]), (yyvsp[(9) - (10)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-9]), xxnewlist8((yyvsp[-8]), (yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); } + break; case 61: - { (yyval) = xxusermacro((yyvsp[(1) - (11)]), xxnewlist9((yyvsp[(2) - (11)]), (yyvsp[(3) - (11)]), (yyvsp[(4) - (11)]), (yyvsp[(5) - (11)]), (yyvsp[(6) - (11)]), (yyvsp[(7) - (11)]), (yyvsp[(8) - (11)]), (yyvsp[(9) - (11)]), (yyvsp[(10) - (11)])), &(yyloc)); } + { (yyval) = xxusermacro((yyvsp[-10]), xxnewlist9((yyvsp[-9]), (yyvsp[-8]), (yyvsp[-7]), (yyvsp[-6]), (yyvsp[-5]), (yyvsp[-4]), (yyvsp[-3]), (yyvsp[-2]), (yyvsp[-1])), &(yyloc)); } + break; case 62: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 63: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 64: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist((yyvsp[(2) - (2)])); + { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist((yyvsp[0])); if(wCalls) warning(_("bad markup (extra space?) at %s:%d:%d"), - parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column); + parseState.xxBasename, (yylsp[0]).first_line, (yylsp[0]).first_column); else warningcall(R_NilValue, _("bad markup (extra space?) at %s:%d:%d"), - parseState.xxBasename, (yylsp[(2) - (2)]).first_line, (yylsp[(2) - (2)]).first_column); + parseState.xxBasename, (yylsp[0]).first_line, (yylsp[0]).first_column); } + break; case 65: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 66: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 67: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 68: - { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); } + { xxpopMode((yyvsp[-2])); (yyval) = (yyvsp[-1]); } + break; case 69: - { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); } + { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(NULL); } + break; case 70: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 71: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = (yyvsp[(2) - (2)]); } + { xxpopMode((yyvsp[-1])); (yyval) = (yyvsp[0]); } + break; case 72: - { xxpopMode((yyvsp[(2) - (4)])); (yyval) = (yyvsp[(3) - (4)]); } + { xxpopMode((yyvsp[-2])); (yyval) = (yyvsp[-1]); } + break; case 73: - { xxpopMode((yyvsp[(2) - (3)])); (yyval) = xxnewlist(NULL); } + { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(NULL); } + break; case 74: - { xxpopMode((yyvsp[(1) - (2)])); (yyval) = xxnewlist(xxtag((yyvsp[(2) - (2)]), TEXT, &(yyloc))); } + { xxpopMode((yyvsp[-1])); (yyval) = xxnewlist(xxtag((yyvsp[0]), TEXT, &(yyloc))); } + break; case 75: { (yyval) = xxpushMode(LATEXLIKE, UNKNOWN, FALSE); } + break; case 76: { (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); } + break; case 77: { parseState.xxbraceDepth--; (yyval) = xxpushMode(RLIKE, UNKNOWN, FALSE); parseState.xxbraceDepth++; } + break; case 78: { (yyval) = xxpushMode(INOPTION, UNKNOWN, FALSE); } + break; case 79: { (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); } + break; case 80: { (yyval) = xxpushMode(VERBATIM, UNKNOWN, TRUE); } + break; case 81: { parseState.xxbraceDepth--; (yyval) = xxpushMode(VERBATIM, UNKNOWN, FALSE); parseState.xxbraceDepth++; } + break; case 82: { (yyval) = xxpushMode(LATEXLIKE, ESCAPE, FALSE); } + break; case 83: { (yyval) = xxpushMode(LATEXLIKE, LATEXMACRO2, FALSE); } + break; case 84: - { (yyval) = (yyvsp[(2) - (3)]); } + { (yyval) = (yyvsp[-1]); } + break; case 85: { (yyval) = xxnewlist(NULL); } + break; case 86: - { (yyval) = (yyvsp[(2) - (4)]); } + { (yyval) = (yyvsp[-2]); } + break; case 87: { (yyval) = xxnewlist(NULL); } + break; case 88: - { (yyval) = (yyvsp[(2) - (4)]); } + { (yyval) = (yyvsp[-2]); } + break; case 89: - { (yyval) = (yyvsp[(2) - (3)]); } + { (yyval) = (yyvsp[-1]); } + break; @@ -2745,7 +2711,7 @@ yyparse () *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2760,9 +2726,9 @@ yyparse () goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2813,20 +2779,20 @@ yyparse () if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2846,7 +2812,7 @@ yyparse () goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2859,29 +2825,29 @@ yyparse () | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); + yystos[yystate], yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2937,14 +2903,14 @@ yyparse () yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); + yystos[*yyssp], yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2955,14 +2921,11 @@ yyparse () if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - static SEXP xxpushMode(int newmode, int newitem, int neweqn) { SEXP ans; diff --git a/source/src/library/utils/R/sourceutils.R b/source/src/library/utils/R/sourceutils.R index 18d4cb4c6..f71da35ff 100644 --- a/source/src/library/utils/R/sourceutils.R +++ b/source/src/library/utils/R/sourceutils.R @@ -1,7 +1,7 @@ # File src/library/utils/R/sourceutils.R # Part of the R package, https://www.R-project.org # -# Copyright (C) 1995-2016 The R Core Team +# Copyright (C) 1995-2017 The R Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,10 +28,10 @@ removeSource <- function(fn) { attr(part, "srcref") <- NULL attr(part, "wholeSrcref") <- NULL attr(part, "srcfile") <- NULL - if (is.language(part) && is.recursive(part)) { - for (i in seq_along(part)) - part[[i]] <- recurse(part[[i]]) - } + if (is.language(part) && is.recursive(part)) { + for (i in seq_along(part)) + part[i] <- list(recurse(part[[i]])) # recurse(*) may be NULL + } part } body(fn) <- recurse(body(fn)) @@ -62,9 +62,9 @@ getSrcDirectory <- function(x, unique=TRUE) { getSrcref <- function(x) { if (inherits(x, "srcref")) return(x) if (!is.null(srcref <- attr(x, "srcref"))) return(srcref) - if (is.function(x) && !is.null(srcref <- getSrcref(body(x)))) + if (is.function(x) && !is.null(srcref <- getSrcref(body(x)))) return(srcref) - if (methods::is(x, "MethodDefinition")) + if (methods::is(x, "MethodDefinition")) return(getSrcref(unclass(methods::unRematchDefinition(x)))) NULL } @@ -116,9 +116,9 @@ substr_with_tabs <- function(x, start, stop, tabsize = 8) { } getParseData <- function(x, includeText = NA) { - if (inherits(x, "srcfile")) + if (inherits(x, "srcfile")) srcfile <- x - else + else srcfile <- getSrcfile(x) if (is.null(srcfile)) @@ -149,7 +149,7 @@ getParseData <- function(x, includeText = NA) { if (length(gettext)) data$text[gettext] <- getParseText(data, data$id[gettext]) } - data + data } getParseText <- function(parseData, id) { diff --git a/source/src/library/utils/inst/doc/Sweave.pdf b/source/src/library/utils/inst/doc/Sweave.pdf index 1b3ff8b98..5daa6f1af 100644 Binary files a/source/src/library/utils/inst/doc/Sweave.pdf and b/source/src/library/utils/inst/doc/Sweave.pdf differ diff --git a/source/src/library/utils/man/INSTALL.Rd b/source/src/library/utils/man/INSTALL.Rd index 3ef19184f..a5f6875e4 100644 --- a/source/src/library/utils/man/INSTALL.Rd +++ b/source/src/library/utils/man/INSTALL.Rd @@ -177,6 +177,6 @@ (on the Help menu in \code{RGui}), #endif \code{\link{RShowDoc}} and the \file{doc/manual} subdirectory of the - \R source tree). + \R source tree. } \keyword{utilities} diff --git a/source/src/library/utils/man/Question.Rd b/source/src/library/utils/man/Question.Rd index ce9448968..c5da166de 100644 --- a/source/src/library/utils/man/Question.Rd +++ b/source/src/library/utils/man/Question.Rd @@ -45,7 +45,7 @@ appear on their own such as unary and binary operators, \code{function} and control-flow \link{reserved} words (including \code{if}, \code{else} \code{for}, \code{in}, \code{repeat}, - \code{while}, \code{break} and \code{next}. The other \code{reserved} + \code{while}, \code{break} and \code{next}). The other \code{reserved} words can be used as if they were names, for example \code{TRUE}, \code{NA} and \code{Inf}. } diff --git a/source/src/library/utils/man/adist.Rd b/source/src/library/utils/man/adist.Rd index c7229a8a8..b392c632b 100644 --- a/source/src/library/utils/man/adist.Rd +++ b/source/src/library/utils/man/adist.Rd @@ -33,7 +33,7 @@ adist(x, y = NULL, costs = NULL, counts = FALSE, fixed = TRUE, elements are used as string literals. Otherwise, they are taken as regular expressions and \code{partial = TRUE} is implied (corresponding to the approximate string distance used by - \code{\link{agrep}} with \code{fixed = FALSE}.} + \code{\link{agrep}} with \code{fixed = FALSE}).} \item{partial}{a logical indicating whether the transformed \code{x} elements must exactly match the complete \code{y} elements, or only substrings of these. The latter corresponds to the approximate diff --git a/source/src/library/utils/man/format.Rd b/source/src/library/utils/man/format.Rd index 19cb57d55..286739cb2 100644 --- a/source/src/library/utils/man/format.Rd +++ b/source/src/library/utils/man/format.Rd @@ -27,7 +27,7 @@ formatOL(x, type = "arabic", offset = 0, start = 1, labels in the ordered list. If \code{"arabic"} (default), arabic numerals are used. For \code{"Alph"} or \code{"alph"}, single upper or lower case letters are employed (in this case, the number of the - last item must not exceed 26. Finally, for \code{"Roman"} or + last item must not exceed 26). Finally, for \code{"Roman"} or \code{"roman"}, the labels are given as upper or lower case roman numerals (with the number of the last item maximally 3899). \code{type} can be given as a unique abbreviation of the above, or diff --git a/source/src/library/utils/man/help.Rd b/source/src/library/utils/man/help.Rd index fc97d670b..b3a577b60 100644 --- a/source/src/library/utils/man/help.Rd +++ b/source/src/library/utils/man/help.Rd @@ -35,7 +35,7 @@ help(topic, package = NULL, lib.loc = NULL, or \code{NULL}. The default value of \code{NULL} corresponds to all libraries currently known. If the default is used, the loaded packages are searched before the libraries. This is not used for - HTML help (see \sQuote{Details}.} + HTML help (see \sQuote{Details}).} \item{verbose}{logical; if \code{TRUE}, the file name is reported.} \item{try.all.packages}{logical; see \code{Note}.} \item{help_type}{character string: the type of help required. diff --git a/source/src/library/utils/man/news.Rd b/source/src/library/utils/man/news.Rd index 0f5f9bf63..20d751270 100644 --- a/source/src/library/utils/man/news.Rd +++ b/source/src/library/utils/man/news.Rd @@ -50,7 +50,7 @@ news(query, package = "R", lib.loc = NULL, format = NULL, File \file{inst/NEWS.Rd} should be an Rd file given the entries as Rd \verb{\itemize} lists, grouped according to version using \verb{section} elements with names starting with a suitable prefix - (e.g.\sspace{}\dQuote{Changes in version} followed by a space and the version + (e.g.\sspace{}\dQuote{Changes in version}) followed by a space and the version number, and optionally followed by a space and a parenthesized ISO 8601 (\%Y-\%m-\%d, see \code{\link{strptime}}) format date, and possibly further grouped according to categories using diff --git a/source/src/library/utils/man/rcompgen.Rd b/source/src/library/utils/man/rcompgen.Rd index 5661e04c2..7503fbaf0 100644 --- a/source/src/library/utils/man/rcompgen.Rd +++ b/source/src/library/utils/man/rcompgen.Rd @@ -100,11 +100,11 @@ rc.options(\dots) \item{\code{quotes}:}{ Enables completion in \R code when inside quotes. This normally leads to filename completion, but can be otherwise depending on context (for example, when the open quote - is preceded by \code{?}, help completion is invoked. Setting + is preceded by \code{?}), help completion is invoked. Setting this to \code{FALSE} relegates completion to the underlying completion front-end, which may do its own processing (for example, \code{readline} on Unix-alikes will do filename - completion. } + completion). } \item{\code{files}:}{ Deprecated. Use \code{quotes} instead. } diff --git a/source/src/library/utils/man/relist.Rd b/source/src/library/utils/man/relist.Rd index 7911cb052..1661ef70f 100644 --- a/source/src/library/utils/man/relist.Rd +++ b/source/src/library/utils/man/relist.Rd @@ -67,7 +67,7 @@ is.relistable(x) ll <- function(param.vector) { - param <- relist(param.vector, skeleton = ipar)) + param <- relist(param.vector, skeleton = ipar) -sum(mvdnorm(x, mean = param$mean, vcov = param$vcov, log = TRUE)) } diff --git a/source/src/main/character.c b/source/src/main/character.c index fcbfed6f2..4240a0ead 100644 --- a/source/src/main/character.c +++ b/source/src/main/character.c @@ -1,7 +1,7 @@ /* * R : A Computer Language for Statistical Data Analysis * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka - * Copyright (C) 1997--2016 The R Core Team + * Copyright (C) 1997--2018 The R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Pulic License as published by @@ -254,7 +254,7 @@ SEXP attribute_hidden do_nchar(SEXP call, SEXP op, SEXP args, SEXP env) int *s_ = INTEGER(s); for (R_xlen_t i = 0; i < len; i++) { SEXP sxi = STRING_ELT(x, i); - char msg_i[20]; sprintf(msg_i, "element %ld", (long)i+1); + char msg_i[30]; sprintf(msg_i, "element %ld", (long)i+1); s_[i] = R_nchar(sxi, type_, allowNA, keepNA, msg_i); } R_FreeStringBufferL(&cbuff); diff --git a/source/src/main/connections.c b/source/src/main/connections.c index f54c27c15..9ebfd4b6a 100644 --- a/source/src/main/connections.c +++ b/source/src/main/connections.c @@ -576,7 +576,13 @@ static Rboolean file_open(Rconnection con) fp = R_fopen(name, con->mode); } else { /* use file("stdin") to refer to the file and not the console */ #ifdef HAVE_FDOPEN - fp = fdopen(dup(0), con->mode); + int dstdin = dup(0); +# ifdef Win32 + if (strchr(con->mode, 'b')) + /* fdopen won't set dstdin to binary mode */ + setmode(dstdin, _O_BINARY); +# endif + fp = fdopen(dstdin, con->mode); #else warning(_("cannot open file '%s': %s"), name, "fdopen is not supported on this platform"); diff --git a/source/src/main/deparse.c b/source/src/main/deparse.c index a5a95dd05..a2d7529b0 100644 --- a/source/src/main/deparse.c +++ b/source/src/main/deparse.c @@ -1308,6 +1308,7 @@ static void print2buff(const char *strng, LocalParseData *d) */ #define NB 1000 /* Same as printutils.c */ +#define NB2 2*NB+25 static const char *EncodeNonFiniteComplexElement(Rcomplex x, char* buff) { int w, d, e, wi, di, ei; @@ -1321,8 +1322,8 @@ static const char *EncodeNonFiniteComplexElement(Rcomplex x, char* buff) strcpy(Re, EncodeReal0(x.r, w, d, e, ".")); strcpy(Im, EncodeReal0(x.i, wi, di, ei, ".")); - snprintf(buff, NB, "complex(real=%s, imaginary=%s)", Re, Im); - buff[NB-1] = '\0'; + snprintf(buff, NB2, "complex(real=%s, imaginary=%s)", Re, Im); + buff[NB2-1] = '\0'; return buff; } @@ -1451,7 +1452,7 @@ static void vector2buff(SEXP vector, LocalParseData *d) } else if(TYPEOF(vector) == CPLXSXP && (ISNAN(COMPLEX(vector)[i].r) || !R_FINITE(COMPLEX(vector)[i].i)) ) { if (!buff) - buff = alloca(NB); + buff = alloca(NB2); strp = EncodeNonFiniteComplexElement(COMPLEX(vector)[i], buff); } else if (allNA && TYPEOF(vector) == STRSXP && STRING_ELT(vector, i) == NA_STRING) { diff --git a/source/src/main/errors.c b/source/src/main/errors.c index 01ceb53d1..250e9e74b 100644 --- a/source/src/main/errors.c +++ b/source/src/main/errors.c @@ -605,6 +605,8 @@ static SEXP GetSrcLoc(SEXP srcref) static char errbuf[BUFSIZE]; +#define ERRBUFCAT(txt) strncat(errbuf, txt, BUFSIZE - 1 - strlen(errbuf)) + const char *R_curErrorBuf() { return (const char *)errbuf; } @@ -707,18 +709,18 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap) *p = '\n'; } else msgline1 = wd(tmp); if (14 + wd(dcall) + msgline1 > LONGWARN) - strcat(errbuf, tail); + ERRBUFCAT(tail); } else { size_t msgline1 = strlen(tmp); char *p = strchr(tmp, '\n'); if (p) msgline1 = (int)(p - tmp); if (14 + strlen(dcall) + msgline1 > LONGWARN) - strcat(errbuf, tail); + ERRBUFCAT(tail); } - strcat(errbuf, tmp); + ERRBUFCAT(tmp); } else { snprintf(errbuf, BUFSIZE, _("Error: ")); - strcat(errbuf, tmp); // FIXME + ERRBUFCAT(tmp); // FIXME } UNPROTECT(protected); } @@ -728,17 +730,26 @@ verrorcall_dflt(SEXP call, const char *format, va_list ap) Rvsnprintf(p, min(BUFSIZE, R_WarnLength) - strlen(errbuf), format, ap); } - p = errbuf + strlen(errbuf) - 1; - if(*p != '\n') strcat(errbuf, "\n"); + size_t nc = strlen(errbuf); + if (nc == BUFSIZE - 1) { + errbuf[BUFSIZE - 4] = '.'; + errbuf[BUFSIZE - 3] = '.'; + errbuf[BUFSIZE - 2] = '.'; + errbuf[BUFSIZE - 1] = '\n'; + } + else { + p = errbuf + nc - 1; + if(*p != '\n') ERRBUFCAT("\n"); + } if(R_ShowErrorCalls && call != R_NilValue) { /* assume we want to avoid deparse */ tr = R_ConciseTraceback(call, 0); size_t nc = strlen(tr); if (nc && nc + strlen(errbuf) + 8 < BUFSIZE) { - strcat(errbuf, _("Calls:")); - strcat(errbuf, " "); - strcat(errbuf, tr); - strcat(errbuf, "\n"); + ERRBUFCAT(_("Calls:")); + ERRBUFCAT(" "); + ERRBUFCAT(tr); + ERRBUFCAT("\n"); } } if (R_ShowErrorMessages) REprintf("%s", errbuf); @@ -1641,7 +1652,17 @@ static void vsignalError(SEXP call, const char *format, va_list ap) UNPROTECT(4); } } - else gotoExitingHandler(R_NilValue, call, entry); + else { + /* Allocating the string here before the jump is not ideal + but allows use of tryCatch expressions in on.exit + calls. The altarnative would be to allocate a buffer + for each tryCatch, but that seems excessive. */ + PROTECT(entry); + SEXP msg = mkString(errbuf); + UNPROTECT(1); + gotoExitingHandler(msg, call, entry); + + } } R_HandlerStack = oldstack; } diff --git a/source/src/main/eval.c b/source/src/main/eval.c index e46985a1c..8cf7413b2 100644 --- a/source/src/main/eval.c +++ b/source/src/main/eval.c @@ -262,19 +262,19 @@ static void doprof(int sig) /* sig is ignored in Windows */ real. */ SEXP arg1 = CADR(fun); SEXP arg2 = CADDR(fun); - char arg2buf[PROFITEMMAX]; + char arg2buf[PROFITEMMAX-5]; if (TYPEOF(arg2) == SYMSXP) { - snprintf(arg2buf, PROFITEMMAX-1, "%s", CHAR(PRINTNAME(arg2))); + snprintf(arg2buf, PROFITEMMAX-6, "%s", CHAR(PRINTNAME(arg2))); } else if (TYPEOF(arg2) == STRSXP) { - snprintf(arg2buf, PROFITEMMAX-1, "\"%s\"", CHAR(STRING_ELT(arg2, 0))); + snprintf(arg2buf, PROFITEMMAX-6, "\"%s\"", CHAR(STRING_ELT(arg2, 0))); } else if (TYPEOF(arg2) == INTSXP) { - snprintf(arg2buf, PROFITEMMAX-1, "%d", INTEGER(arg2)[0]); + snprintf(arg2buf, PROFITEMMAX-6, "%d", INTEGER(arg2)[0]); } else if (TYPEOF(arg2) == REALSXP) { - snprintf(arg2buf, PROFITEMMAX-1, "%.0f", REAL(arg2)[0]); + snprintf(arg2buf, PROFITEMMAX-6, "%.0f", REAL(arg2)[0]); } else { /* Shouldn't get here, but just in case. */ diff --git a/source/src/main/gram.c b/source/src/main/gram.c index fdacc65d2..510358074 100644 --- a/source/src/main/gram.c +++ b/source/src/main/gram.c @@ -1,19 +1,19 @@ -/* A Bison parser, made by GNU Bison 2.7.12-4996. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - + + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -26,7 +26,7 @@ special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. - + This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.7.12-4996" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -354,11 +354,11 @@ static int xxvalue(SEXP, int, YYLTYPE *); -# ifndef YY_NULL +# ifndef YY_NULLPTR # if defined __cplusplus && 201103L <= __cplusplus -# define YY_NULL nullptr +# define YY_NULLPTR nullptr # else -# define YY_NULL 0 +# define YY_NULLPTR 0 # endif # endif @@ -371,7 +371,7 @@ static int xxvalue(SEXP, int, YYLTYPE *); #endif -/* Enabling traces. */ +/* Debug traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif @@ -379,62 +379,61 @@ static int xxvalue(SEXP, int, YYLTYPE *); extern int yydebug; #endif -/* Tokens. */ +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - END_OF_INPUT = 258, - ERROR = 259, - STR_CONST = 260, - NUM_CONST = 261, - NULL_CONST = 262, - SYMBOL = 263, - FUNCTION = 264, - INCOMPLETE_STRING = 265, - LEFT_ASSIGN = 266, - EQ_ASSIGN = 267, - RIGHT_ASSIGN = 268, - LBB = 269, - FOR = 270, - IN = 271, - IF = 272, - ELSE = 273, - WHILE = 274, - NEXT = 275, - BREAK = 276, - REPEAT = 277, - GT = 278, - GE = 279, - LT = 280, - LE = 281, - EQ = 282, - NE = 283, - AND = 284, - OR = 285, - AND2 = 286, - OR2 = 287, - NS_GET = 288, - NS_GET_INT = 289, - COMMENT = 290, - LINE_DIRECTIVE = 291, - SYMBOL_FORMALS = 292, - EQ_FORMALS = 293, - EQ_SUB = 294, - SYMBOL_SUB = 295, - SYMBOL_FUNCTION_CALL = 296, - SYMBOL_PACKAGE = 297, - COLON_ASSIGN = 298, - SLOT = 299, - LOW = 300, - TILDE = 301, - NOT = 302, - UNOT = 303, - SPECIAL = 304, - UPLUS = 305, - UMINUS = 306 - }; + enum yytokentype + { + END_OF_INPUT = 258, + ERROR = 259, + STR_CONST = 260, + NUM_CONST = 261, + NULL_CONST = 262, + SYMBOL = 263, + FUNCTION = 264, + INCOMPLETE_STRING = 265, + LEFT_ASSIGN = 266, + EQ_ASSIGN = 267, + RIGHT_ASSIGN = 268, + LBB = 269, + FOR = 270, + IN = 271, + IF = 272, + ELSE = 273, + WHILE = 274, + NEXT = 275, + BREAK = 276, + REPEAT = 277, + GT = 278, + GE = 279, + LT = 280, + LE = 281, + EQ = 282, + NE = 283, + AND = 284, + OR = 285, + AND2 = 286, + OR2 = 287, + NS_GET = 288, + NS_GET_INT = 289, + COMMENT = 290, + LINE_DIRECTIVE = 291, + SYMBOL_FORMALS = 292, + EQ_FORMALS = 293, + EQ_SUB = 294, + SYMBOL_SUB = 295, + SYMBOL_FUNCTION_CALL = 296, + SYMBOL_PACKAGE = 297, + COLON_ASSIGN = 298, + SLOT = 299, + LOW = 300, + TILDE = 301, + UNOT = 302, + NOT = 303, + SPECIAL = 304, + UMINUS = 305, + UPLUS = 306 + }; #endif /* Tokens. */ #define END_OF_INPUT 258 @@ -481,49 +480,37 @@ extern int yydebug; #define SLOT 299 #define LOW 300 #define TILDE 301 -#define NOT 302 -#define UNOT 303 +#define UNOT 302 +#define NOT 303 #define SPECIAL 304 -#define UPLUS 305 -#define UMINUS 306 - - +#define UMINUS 305 +#define UPLUS 306 +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif +/* Location type. */ #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE +typedef struct YYLTYPE YYLTYPE; +struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ +}; # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif + extern YYSTYPE yylval; extern YYLTYPE yylloc; -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ @@ -543,11 +530,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -567,8 +551,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -590,11 +573,30 @@ typedef short int yytype_int16; # endif #endif -#ifndef __attribute__ -/* This feature is available in gcc versions 2.5 and later. */ -# if (! defined __GNUC__ || __GNUC__ < 2 \ - || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) -# define __attribute__(Spec) /* empty */ +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif @@ -605,25 +607,26 @@ typedef short int yytype_int16; # define YYUSE(E) /* empty */ #endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(N) (N) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (yyi) - int yyi; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return yyi; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -641,8 +644,7 @@ YYID (yyi) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ # ifndef EXIT_SUCCESS @@ -654,8 +656,8 @@ YYID (yyi) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -671,7 +673,7 @@ YYID (yyi) # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 @@ -679,15 +681,13 @@ YYID (yyi) # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -697,8 +697,8 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ + && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc @@ -724,16 +724,16 @@ union yyalloc elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif @@ -752,7 +752,7 @@ union yyalloc for (yyi = 0; yyi < (Count); yyi++) \ (Dst)[yyi] = (Src)[yyi]; \ } \ - while (YYID (0)) + while (0) # endif # endif #endif /* !YYCOPY_NEEDED */ @@ -768,17 +768,19 @@ union yyalloc #define YYNNTS 13 /* YYNRULES -- Number of rules. */ #define YYNRULES 90 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 163 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 306 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -815,60 +817,7 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 5, 7, 10, 13, 15, 17, 19, - 23, 25, 27, 29, 31, 35, 39, 42, 45, 48, - 51, 54, 58, 62, 66, 70, 74, 78, 82, 86, - 90, 94, 98, 102, 106, 110, 114, 118, 122, 126, - 130, 134, 138, 142, 149, 154, 158, 164, 168, 172, - 175, 181, 186, 190, 194, 198, 202, 206, 210, 214, - 218, 222, 226, 230, 234, 236, 238, 242, 246, 252, - 253, 255, 259, 262, 266, 269, 271, 276, 277, 279, - 282, 286, 289, 293, 296, 300, 301, 303, 307, 311, - 317 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 74, 0, -1, 3, -1, 64, -1, 75, 64, -1, - 75, 65, -1, 1, -1, 77, -1, 76, -1, 77, - 12, 75, -1, 6, -1, 5, -1, 7, -1, 8, - -1, 66, 81, 67, -1, 62, 75, 68, -1, 52, - 77, -1, 51, 77, -1, 69, 77, -1, 47, 77, - -1, 45, 77, -1, 77, 56, 77, -1, 77, 51, - 77, -1, 77, 52, 77, -1, 77, 53, 77, -1, - 77, 54, 77, -1, 77, 59, 77, -1, 77, 55, - 77, -1, 77, 70, 77, -1, 77, 47, 77, -1, - 77, 45, 77, -1, 77, 25, 77, -1, 77, 26, - 77, -1, 77, 27, 77, -1, 77, 28, 77, -1, - 77, 24, 77, -1, 77, 23, 77, -1, 77, 29, - 77, -1, 77, 30, 77, -1, 77, 31, 77, -1, - 77, 32, 77, -1, 77, 11, 77, -1, 77, 13, - 77, -1, 9, 62, 84, 68, 85, 75, -1, 77, - 62, 82, 68, -1, 17, 79, 75, -1, 17, 79, - 75, 18, 75, -1, 15, 80, 75, -1, 19, 78, - 75, -1, 22, 75, -1, 77, 14, 82, 71, 71, - -1, 77, 63, 82, 71, -1, 8, 33, 8, -1, - 8, 33, 5, -1, 5, 33, 8, -1, 5, 33, - 5, -1, 8, 34, 8, -1, 8, 34, 5, -1, - 5, 34, 8, -1, 5, 34, 5, -1, 77, 60, - 8, -1, 77, 60, 5, -1, 77, 61, 8, -1, - 77, 61, 5, -1, 20, -1, 21, -1, 62, 77, - 68, -1, 62, 77, 68, -1, 62, 8, 16, 77, - 68, -1, -1, 75, -1, 81, 65, 75, -1, 81, - 65, -1, 81, 64, 75, -1, 81, 64, -1, 83, - -1, 82, 85, 72, 83, -1, -1, 77, -1, 8, - 12, -1, 8, 12, 77, -1, 5, 12, -1, 5, - 12, 77, -1, 7, 12, -1, 7, 12, 77, -1, - -1, 8, -1, 8, 12, 77, -1, 84, 72, 8, - -1, 84, 72, 8, 12, 77, -1, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 334, 334, 335, 336, 337, 338, 341, 342, 345, @@ -896,17 +845,17 @@ static const char *const yytname[] = "NE", "AND", "OR", "AND2", "OR2", "NS_GET", "NS_GET_INT", "COMMENT", "LINE_DIRECTIVE", "SYMBOL_FORMALS", "EQ_FORMALS", "EQ_SUB", "SYMBOL_SUB", "SYMBOL_FUNCTION_CALL", "SYMBOL_PACKAGE", "COLON_ASSIGN", "SLOT", "'?'", - "LOW", "'~'", "TILDE", "NOT", "UNOT", "'+'", "'-'", "'*'", "'/'", - "SPECIAL", "':'", "UPLUS", "UMINUS", "'^'", "'$'", "'@'", "'('", "'['", + "LOW", "'~'", "TILDE", "UNOT", "NOT", "'+'", "'-'", "'*'", "'/'", + "SPECIAL", "':'", "UMINUS", "UPLUS", "'^'", "'$'", "'@'", "'('", "'['", "'\\n'", "';'", "'{'", "'}'", "')'", "'!'", "'%'", "']'", "','", "$accept", "prog", "expr_or_assign", "equal_assign", "expr", "cond", - "ifcond", "forcond", "exprlist", "sublist", "sub", "formlist", "cr", YY_NULL + "ifcond", "forcond", "exprlist", "sublist", "sub", "formlist", "cr", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -920,70 +869,18 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 73, 74, 74, 74, 74, 74, 75, 75, 76, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, - 77, 77, 77, 77, 77, 77, 78, 79, 80, 81, - 81, 81, 81, 81, 81, 82, 82, 83, 83, 83, - 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, - 85 -}; +#define YYPACT_NINF -64 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 1, 1, 2, 2, 1, 1, 1, 3, - 1, 1, 1, 1, 3, 3, 2, 2, 2, 2, - 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 6, 4, 3, 5, 3, 3, 2, - 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 1, 1, 3, 3, 5, 0, - 1, 3, 2, 3, 2, 1, 4, 0, 1, 2, - 3, 2, 3, 2, 3, 0, 1, 3, 3, 5, - 0 -}; +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-64))) -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 6, 2, 11, 10, 12, 13, 0, 0, 0, - 0, 64, 65, 0, 0, 0, 0, 0, 0, 3, - 69, 0, 0, 0, 8, 7, 0, 0, 0, 0, - 85, 0, 0, 0, 0, 0, 0, 49, 20, 19, - 17, 16, 0, 70, 0, 18, 1, 4, 5, 0, - 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 77, 77, 0, 55, 54, 59, - 58, 53, 52, 57, 56, 86, 0, 0, 47, 0, - 45, 0, 48, 15, 74, 72, 14, 41, 9, 42, - 11, 12, 13, 78, 90, 75, 36, 35, 31, 32, - 33, 34, 37, 38, 39, 40, 30, 29, 22, 23, - 24, 25, 27, 21, 26, 61, 60, 63, 62, 90, - 90, 28, 0, 90, 0, 0, 67, 0, 66, 73, - 71, 81, 83, 79, 0, 0, 44, 51, 87, 0, - 88, 0, 46, 82, 84, 80, 50, 77, 43, 0, - 68, 76, 89 -}; +#define YYTABLE_NINF -1 -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int16 yydefgoto[] = -{ - -1, 22, 23, 24, 25, 36, 34, 32, 44, 104, - 105, 86, 145 -}; +#define yytable_value_is_error(Yytable_value) \ + (!!((Yytable_value) == (-1))) -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -64 + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ static const yytype_int16 yypact[] = { 85, -64, -64, 37, -64, -64, 63, -56, -46, -44, @@ -1005,17 +902,47 @@ static const yytype_int16 yypact[] = -64, -64, 429 }; -/* YYPGOTO[NTERM-NUM]. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 6, 2, 11, 10, 12, 13, 0, 0, 0, + 0, 64, 65, 0, 0, 0, 0, 0, 0, 3, + 69, 0, 0, 0, 8, 7, 0, 0, 0, 0, + 85, 0, 0, 0, 0, 0, 0, 49, 20, 19, + 17, 16, 0, 70, 0, 18, 1, 4, 5, 0, + 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 77, 77, 0, 55, 54, 59, + 58, 53, 52, 57, 56, 86, 0, 0, 47, 0, + 45, 0, 48, 15, 74, 72, 14, 41, 9, 42, + 11, 12, 13, 78, 90, 75, 36, 35, 31, 32, + 33, 34, 37, 38, 39, 40, 30, 29, 22, 23, + 24, 25, 27, 21, 26, 61, 60, 63, 62, 90, + 90, 28, 0, 90, 0, 0, 67, 0, 66, 73, + 71, 81, 83, 79, 0, 0, 44, 51, 87, 0, + 88, 0, 46, 82, 84, 80, 50, 77, 43, 0, + 68, 76, 89 +}; + + /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -64, -64, 45, -64, -14, -64, -64, -64, -64, 40, -35, -64, -10 }; -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 + /* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int16 yydefgoto[] = +{ + -1, 22, 23, 24, 25, 36, 34, 32, 44, 104, + 105, 86, 145 +}; + + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { 38, 39, 40, 41, 141, 133, 30, 45, 143, 134, @@ -1098,12 +1025,6 @@ static const yytype_int16 yytable[] = 0, 0, 76 }; -#define yypact_value_is_default(Yystate) \ - (!!((Yystate) == (-64))) - -#define yytable_value_is_error(Yytable_value) \ - (!!((Yytable_value) == (-1))) - static const yytype_int16 yycheck[] = { 14, 15, 16, 17, 12, 68, 62, 21, 12, 72, @@ -1186,8 +1107,8 @@ static const yytype_int16 yycheck[] = -1, -1, 70 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 1, 3, 5, 6, 7, 8, 9, 15, 17, @@ -1209,30 +1130,46 @@ static const yytype_uint8 yystos[] = 68, 83, 77 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 73, 74, 74, 74, 74, 74, 75, 75, 76, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, + 77, 77, 77, 77, 77, 77, 78, 79, 80, 81, + 81, 81, 81, 81, 81, 82, 82, 83, 83, 83, + 83, 83, 83, 83, 83, 84, 84, 84, 84, 84, + 85 +}; + + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 1, 1, 2, 2, 1, 1, 1, 3, + 1, 1, 1, 1, 3, 3, 2, 2, 2, 2, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 6, 4, 3, 5, 3, 3, 2, + 5, 4, 3, 3, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 3, 1, 1, 3, 3, 5, 0, + 1, 3, 2, 3, 2, 1, 4, 0, 1, 2, + 3, 2, 3, 2, 3, 0, 1, 3, 3, 5, + 0 +}; + + +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 + +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + #define YYRECOVERING() (!!yyerrstatus) @@ -1249,13 +1186,13 @@ do \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) + YYERROR; \ + } \ +while (0) /* Error token number */ -#define YYTERROR 1 -#define YYERRCODE 256 +#define YYTERROR 1 +#define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. @@ -1265,7 +1202,7 @@ while (YYID (0)) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ - if (YYID (N)) \ + if (N) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ @@ -1279,12 +1216,27 @@ while (YYID (0)) (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ - while (YYID (0)) + while (0) #endif #define YYRHSLOC(Rhs, K) ((Rhs)[K]) +/* Enable debugging if requested. */ +#if YYDEBUG + +# ifndef YYFPRINTF +# include /* INFRINGES ON USER NAME SPACE */ +# define YYFPRINTF fprintf +# endif + +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + + /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ @@ -1294,36 +1246,28 @@ while (YYID (0)) /* Print *YYLOCP on YYO. Private, do not rely on its existence. */ -__attribute__((__unused__)) -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +YY_ATTRIBUTE_UNUSED static unsigned yy_location_print_ (FILE *yyo, YYLTYPE const * const yylocp) -#else -static unsigned -yy_location_print_ (yyo, yylocp) - FILE *yyo; - YYLTYPE const * const yylocp; -#endif { unsigned res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { - res += fprintf (yyo, "%d", yylocp->first_line); + res += YYFPRINTF (yyo, "%d", yylocp->first_line); if (0 <= yylocp->first_column) - res += fprintf (yyo, ".%d", yylocp->first_column); + res += YYFPRINTF (yyo, ".%d", yylocp->first_column); } if (0 <= yylocp->last_line) { if (yylocp->first_line < yylocp->last_line) { - res += fprintf (yyo, "-%d", yylocp->last_line); + res += YYFPRINTF (yyo, "-%d", yylocp->last_line); if (0 <= end_col) - res += fprintf (yyo, ".%d", end_col); + res += YYFPRINTF (yyo, ".%d", end_col); } else if (0 <= end_col && yylocp->first_column < end_col) - res += fprintf (yyo, "-%d", end_col); + res += YYFPRINTF (yyo, "-%d", end_col); } return res; } @@ -1337,67 +1281,33 @@ yy_location_print_ (yyo, yylocp) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value, Location); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/* Enable debugging if requested. */ -#if YYDEBUG -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { FILE *yyo = yyoutput; YYUSE (yyo); + YYUSE (yylocationp); if (!yyvaluep) return; - YYUSE (yylocationp); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif YYUSE (yytype); } @@ -1407,23 +1317,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); @@ -1436,16 +1334,8 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) @@ -1456,50 +1346,42 @@ yy_stack_print (yybottom, yytop) YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) -#else static void -yy_reduce_print (yyvsp, yylsp, yyrule) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) ); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + , &(yylsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, yylsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1513,7 +1395,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1536,15 +1418,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1560,16 +1435,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1599,27 +1466,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1642,11 +1509,11 @@ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); YYSIZE_T yysize = yysize0; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ - const char *yyformat = YY_NULL; + const char *yyformat = YY_NULLPTR; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per @@ -1654,10 +1521,6 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, int yycount = 0; /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected @@ -1707,7 +1570,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, } yyarg[yycount++] = yytname[yyx]; { - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; @@ -1774,28 +1637,18 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; -#endif { YYUSE (yyvaluep); YYUSE (yylocationp); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } @@ -1804,26 +1657,14 @@ yydestruct (yymsg, yytype, yyvaluep, yylocationp) /* The lookahead symbol. */ int yychar; - -#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN -# define YY_IGNORE_MAYBE_UNINITIALIZED_END -#endif -#ifndef YY_INITIAL_VALUE -# define YY_INITIAL_VALUE(Value) /* Nothing. */ -#endif - /* The semantic value of the lookahead symbol. */ -YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); - +YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL = { 1, 1, 1, 1 } # endif ; - - /* Number of syntax errors so far. */ int yynerrs; @@ -1832,36 +1673,17 @@ int yynerrs; | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. + 'yyss': related to states. + 'yyvs': related to semantic values. + 'yyls': related to locations. Refer to the stacks through separate pointers, to allow yyoverflow to reallocate them elsewhere. */ @@ -1940,26 +1762,26 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + YYLTYPE *yyls1 = yyls; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yyls1, yysize * sizeof (*yylsp), + &yystacksize); + + yyls = yyls1; + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1967,23 +1789,23 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); + YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1993,10 +1815,10 @@ yyparse () yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); @@ -2025,7 +1847,7 @@ yyparse () if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -2090,7 +1912,7 @@ yyparse () yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -2107,446 +1929,535 @@ yyparse () case 2: { YYACCEPT; } + break; case 3: { yyresult = xxvalue(NULL,2,NULL); goto yyreturn; } + break; case 4: - { yyresult = xxvalue((yyvsp[(1) - (2)]),3,&(yylsp[(1) - (2)])); goto yyreturn; } + { yyresult = xxvalue((yyvsp[-1]),3,&(yylsp[-1])); goto yyreturn; } + break; case 5: - { yyresult = xxvalue((yyvsp[(1) - (2)]),4,&(yylsp[(1) - (2)])); goto yyreturn; } + { yyresult = xxvalue((yyvsp[-1]),4,&(yylsp[-1])); goto yyreturn; } + break; case 6: { YYABORT; } + break; case 7: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 8: - { (yyval) = (yyvsp[(1) - (1)]); } + { (yyval) = (yyvsp[0]); } + break; case 9: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); } + break; case 10: - { (yyval) = (yyvsp[(1) - (1)]); setId( (yyval), (yyloc)); } + { (yyval) = (yyvsp[0]); setId( (yyval), (yyloc)); } + break; case 11: - { (yyval) = (yyvsp[(1) - (1)]); setId( (yyval), (yyloc)); } + { (yyval) = (yyvsp[0]); setId( (yyval), (yyloc)); } + break; case 12: - { (yyval) = (yyvsp[(1) - (1)]); setId( (yyval), (yyloc)); } + { (yyval) = (yyvsp[0]); setId( (yyval), (yyloc)); } + break; case 13: - { (yyval) = (yyvsp[(1) - (1)]); setId( (yyval), (yyloc)); } + { (yyval) = (yyvsp[0]); setId( (yyval), (yyloc)); } + break; case 14: - { (yyval) = xxexprlist((yyvsp[(1) - (3)]),&(yylsp[(1) - (3)]),(yyvsp[(2) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxexprlist((yyvsp[-2]),&(yylsp[-2]),(yyvsp[-1])); setId( (yyval), (yyloc)); } + break; case 15: - { (yyval) = xxparen((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxparen((yyvsp[-2]),(yyvsp[-1])); setId( (yyval), (yyloc)); } + break; case 16: - { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 17: - { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 18: - { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 19: - { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 20: - { (yyval) = xxunary((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxunary((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 21: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 22: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 23: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 24: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 25: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 26: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 27: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 28: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 29: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 30: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 31: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 32: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 33: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 34: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 35: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 36: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 37: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 38: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 39: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 40: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 41: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 42: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(3) - (3)]),(yyvsp[(1) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[0]),(yyvsp[-2])); setId( (yyval), (yyloc)); } + break; case 43: - { (yyval) = xxdefun((yyvsp[(1) - (6)]),(yyvsp[(3) - (6)]),(yyvsp[(6) - (6)]),&(yyloc)); setId( (yyval), (yyloc)); } + { (yyval) = xxdefun((yyvsp[-5]),(yyvsp[-3]),(yyvsp[0]),&(yyloc)); setId( (yyval), (yyloc)); } + break; case 44: - { (yyval) = xxfuncall((yyvsp[(1) - (4)]),(yyvsp[(3) - (4)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(1) - (4)]), SYMBOL_FUNCTION_CALL ) ; } + { (yyval) = xxfuncall((yyvsp[-3]),(yyvsp[-1])); setId( (yyval), (yyloc)); modif_token( &(yylsp[-3]), SYMBOL_FUNCTION_CALL ) ; } + break; case 45: - { (yyval) = xxif((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxif((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 46: - { (yyval) = xxifelse((yyvsp[(1) - (5)]),(yyvsp[(2) - (5)]),(yyvsp[(3) - (5)]),(yyvsp[(5) - (5)])); setId( (yyval), (yyloc)); } + { (yyval) = xxifelse((yyvsp[-4]),(yyvsp[-3]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 47: - { (yyval) = xxfor((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxfor((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 48: - { (yyval) = xxwhile((yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxwhile((yyvsp[-2]),(yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 49: - { (yyval) = xxrepeat((yyvsp[(1) - (2)]),(yyvsp[(2) - (2)])); setId( (yyval), (yyloc)); } + { (yyval) = xxrepeat((yyvsp[-1]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 50: - { (yyval) = xxsubscript((yyvsp[(1) - (5)]),(yyvsp[(2) - (5)]),(yyvsp[(3) - (5)])); setId( (yyval), (yyloc)); } + { (yyval) = xxsubscript((yyvsp[-4]),(yyvsp[-3]),(yyvsp[-2])); setId( (yyval), (yyloc)); } + break; case 51: - { (yyval) = xxsubscript((yyvsp[(1) - (4)]),(yyvsp[(2) - (4)]),(yyvsp[(3) - (4)])); setId( (yyval), (yyloc)); } + { (yyval) = xxsubscript((yyvsp[-3]),(yyvsp[-2]),(yyvsp[-1])); setId( (yyval), (yyloc)); } + break; case 52: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ; } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ; } + break; case 53: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ; } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ; } + break; case 54: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 55: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 56: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ;} + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ;} + break; case 57: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(1) - (3)]), SYMBOL_PACKAGE ) ;} + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); modif_token( &(yylsp[-2]), SYMBOL_PACKAGE ) ;} + break; case 58: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 59: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 60: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 61: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 62: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); modif_token( &(yylsp[(3) - (3)]), SLOT ) ; } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); modif_token( &(yylsp[0]), SLOT ) ; } + break; case 63: - { (yyval) = xxbinary((yyvsp[(2) - (3)]),(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); setId( (yyval), (yyloc)); } + { (yyval) = xxbinary((yyvsp[-1]),(yyvsp[-2]),(yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 64: - { (yyval) = xxnxtbrk((yyvsp[(1) - (1)])); setId( (yyval), (yyloc)); } + { (yyval) = xxnxtbrk((yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 65: - { (yyval) = xxnxtbrk((yyvsp[(1) - (1)])); setId( (yyval), (yyloc)); } + { (yyval) = xxnxtbrk((yyvsp[0])); setId( (yyval), (yyloc)); } + break; case 66: - { (yyval) = xxcond((yyvsp[(2) - (3)])); } + { (yyval) = xxcond((yyvsp[-1])); } + break; case 67: - { (yyval) = xxifcond((yyvsp[(2) - (3)])); } + { (yyval) = xxifcond((yyvsp[-1])); } + break; case 68: - { (yyval) = xxforcond((yyvsp[(2) - (5)]),(yyvsp[(4) - (5)])); setId( (yyval), (yyloc)); } + { (yyval) = xxforcond((yyvsp[-3]),(yyvsp[-1])); setId( (yyval), (yyloc)); } + break; case 69: { (yyval) = xxexprlist0(); setId( (yyval), (yyloc)); } + break; case 70: - { (yyval) = xxexprlist1((yyvsp[(1) - (1)]), &(yylsp[(1) - (1)])); } + { (yyval) = xxexprlist1((yyvsp[0]), &(yylsp[0])); } + break; case 71: - { (yyval) = xxexprlist2((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); } + { (yyval) = xxexprlist2((yyvsp[-2]), (yyvsp[0]), &(yylsp[0])); } + break; case 72: - { (yyval) = (yyvsp[(1) - (2)]); setId( (yyval), (yyloc)); } + { (yyval) = (yyvsp[-1]); setId( (yyval), (yyloc)); } + break; case 73: - { (yyval) = xxexprlist2((yyvsp[(1) - (3)]), (yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); } + { (yyval) = xxexprlist2((yyvsp[-2]), (yyvsp[0]), &(yylsp[0])); } + break; case 74: - { (yyval) = (yyvsp[(1) - (2)]);} + { (yyval) = (yyvsp[-1]);} + break; case 75: - { (yyval) = xxsublist1((yyvsp[(1) - (1)])); } + { (yyval) = xxsublist1((yyvsp[0])); } + break; case 76: - { (yyval) = xxsublist2((yyvsp[(1) - (4)]),(yyvsp[(4) - (4)])); } + { (yyval) = xxsublist2((yyvsp[-3]),(yyvsp[0])); } + break; case 77: { (yyval) = xxsub0(); } + break; case 78: - { (yyval) = xxsub1((yyvsp[(1) - (1)]), &(yylsp[(1) - (1)])); } + { (yyval) = xxsub1((yyvsp[0]), &(yylsp[0])); } + break; case 79: - { (yyval) = xxsymsub0((yyvsp[(1) - (2)]), &(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; modif_token( &(yylsp[(1) - (2)]), SYMBOL_SUB ) ; } + { (yyval) = xxsymsub0((yyvsp[-1]), &(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; modif_token( &(yylsp[-1]), SYMBOL_SUB ) ; } + break; case 80: - { (yyval) = xxsymsub1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; modif_token( &(yylsp[(1) - (3)]), SYMBOL_SUB ) ; } + { (yyval) = xxsymsub1((yyvsp[-2]),(yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; modif_token( &(yylsp[-2]), SYMBOL_SUB ) ; } + break; case 81: - { (yyval) = xxsymsub0((yyvsp[(1) - (2)]), &(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; } + { (yyval) = xxsymsub0((yyvsp[-1]), &(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; } + break; case 82: - { (yyval) = xxsymsub1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; } + { (yyval) = xxsymsub1((yyvsp[-2]),(yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; } + break; case 83: - { (yyval) = xxnullsub0(&(yylsp[(1) - (2)])); modif_token( &(yylsp[(2) - (2)]), EQ_SUB ) ; } + { (yyval) = xxnullsub0(&(yylsp[-1])); modif_token( &(yylsp[0]), EQ_SUB ) ; } + break; case 84: - { (yyval) = xxnullsub1((yyvsp[(3) - (3)]), &(yylsp[(1) - (3)])); modif_token( &(yylsp[(2) - (3)]), EQ_SUB ) ; } + { (yyval) = xxnullsub1((yyvsp[0]), &(yylsp[-2])); modif_token( &(yylsp[-1]), EQ_SUB ) ; } + break; case 85: { (yyval) = xxnullformal(); } + break; case 86: - { (yyval) = xxfirstformal0((yyvsp[(1) - (1)])); modif_token( &(yylsp[(1) - (1)]), SYMBOL_FORMALS ) ; } + { (yyval) = xxfirstformal0((yyvsp[0])); modif_token( &(yylsp[0]), SYMBOL_FORMALS ) ; } + break; case 87: - { (yyval) = xxfirstformal1((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)])); modif_token( &(yylsp[(1) - (3)]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[(2) - (3)]), EQ_FORMALS ) ; } + { (yyval) = xxfirstformal1((yyvsp[-2]),(yyvsp[0])); modif_token( &(yylsp[-2]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[-1]), EQ_FORMALS ) ; } + break; case 88: - { (yyval) = xxaddformal0((yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]), &(yylsp[(3) - (3)])); modif_token( &(yylsp[(3) - (3)]), SYMBOL_FORMALS ) ; } + { (yyval) = xxaddformal0((yyvsp[-2]),(yyvsp[0]), &(yylsp[0])); modif_token( &(yylsp[0]), SYMBOL_FORMALS ) ; } + break; case 89: - { (yyval) = xxaddformal1((yyvsp[(1) - (5)]),(yyvsp[(3) - (5)]),(yyvsp[(5) - (5)]),&(yylsp[(3) - (5)])); modif_token( &(yylsp[(3) - (5)]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[(4) - (5)]), EQ_FORMALS ) ;} + { (yyval) = xxaddformal1((yyvsp[-4]),(yyvsp[-2]),(yyvsp[0]),&(yylsp[-2])); modif_token( &(yylsp[-2]), SYMBOL_FORMALS ) ; modif_token( &(yylsp[-1]), EQ_FORMALS ) ;} + break; case 90: { EatLines = 1; } + break; @@ -2573,7 +2484,7 @@ yyparse () *++yyvsp = yyval; *++yylsp = yyloc; - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2588,9 +2499,9 @@ yyparse () goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ @@ -2641,20 +2552,20 @@ yyparse () if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an - error, discard it. */ + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval, &yylloc); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error @@ -2674,7 +2585,7 @@ yyparse () goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2687,29 +2598,29 @@ yyparse () | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp); + yystos[yystate], yyvsp, yylsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); @@ -2765,14 +2676,14 @@ yyparse () yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc); } - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp); + yystos[*yyssp], yyvsp, yylsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2783,15 +2694,12 @@ yyparse () if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - /*----------------------------------------------------------------------------*/ static int (*ptr_getc)(void); diff --git a/source/src/main/print.c b/source/src/main/print.c index 209aa7931..71ad076f8 100644 --- a/source/src/main/print.c +++ b/source/src/main/print.c @@ -1,6 +1,6 @@ /* * R : A Computer Language for Statistical Data Analysis - * Copyright (C) 2000-2017 The R Core Team. + * Copyright (C) 2000-2018 The R Core Team. * Copyright (C) 1995-1998 Robert Gentleman and Ross Ihaka. * * This program is free software; you can redistribute it and/or modify @@ -195,13 +195,7 @@ static void PrintLanguageEtc(SEXP s, Rboolean useSource, Rboolean isClosure) } PROTECT(t); for (i = 0; i < LENGTH(t); i++) { -#ifdef rev72839__not_ok_eg_for_escaped_chars - // did solve PR#16732 - const char *ctmp = EncodeString(STRING_ELT(t, i), 0, 0, Rprt_adj_none); - Rprintf("%s\n", ctmp); /* translated */ -#else - Rprintf("%s\n", CHAR(STRING_ELT(t, i))); /* translated */ -#endif + Rprintf("%s\n", translateChar(STRING_ELT(t, i))); // translate: for srcref part (PR#16732) } UNPROTECT(1); if (isClosure) { diff --git a/source/src/main/printutils.c b/source/src/main/printutils.c index d58583f63..b2a213261 100644 --- a/source/src/main/printutils.c +++ b/source/src/main/printutils.c @@ -316,11 +316,12 @@ const char *EncodeReal2(double x, int w, int d, int e) void z_prec_r(Rcomplex *r, Rcomplex *x, double digits); +#define NB3 NB+3 const char *EncodeComplex(Rcomplex x, int wr, int dr, int er, int wi, int di, int ei, const char *dec) { - static char buff[NB]; + static char buff[NB3]; /* IEEE allows signed zeros; strip these here */ if (x.r == 0.0) x.r = 0.0; @@ -346,9 +347,9 @@ const char strcpy(Re, tmp); if ( (flagNegIm = (x.i < 0)) ) x.i = -x.i; Im = EncodeReal0(y.i == 0. ? y.i : x.i, wi, di, ei, dec); - snprintf(buff, NB, "%s%s%si", Re, flagNegIm ? "-" : "+", Im); + snprintf(buff, NB3, "%s%s%si", Re, flagNegIm ? "-" : "+", Im); } - buff[NB-1] = '\0'; + buff[NB3-1] = '\0'; return buff; } diff --git a/source/src/main/seq.c b/source/src/main/seq.c index 4abd2985b..3cd85ea3d 100644 --- a/source/src/main/seq.c +++ b/source/src/main/seq.c @@ -118,14 +118,14 @@ static SEXP seq_colon(double n1, double n2, SEXP call) int in1 = (int)(n1); ans = allocVector(INTSXP, n); if (n1 <= n2) - for (int i = 0; i < n; i++) { + for (R_xlen_t i = 0; i < n; i++) { // if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt(); - INTEGER(ans)[i] = in1 + i; + INTEGER(ans)[i] = (int)(in1 + i); } else - for (int i = 0; i < n; i++) { + for (R_xlen_t i = 0; i < n; i++) { // if ((i+1) % NINTERRUPT == 0) R_CheckUserInterrupt(); - INTEGER(ans)[i] = in1 - i; + INTEGER(ans)[i] = (int)(in1 - i); } } else { ans = allocVector(REALSXP, n); diff --git a/source/src/main/summary.c b/source/src/main/summary.c index 9543d5bf7..f85c436e6 100644 --- a/source/src/main/summary.c +++ b/source/src/main/summary.c @@ -1,7 +1,7 @@ /* * R : A Computer Language for Statistical Data Analysis + * Copyright (C) 1997--2018 The R Core Team * Copyright (C) 1995, 1996 Robert Gentleman and Ross Ihaka - * Copyright (C) 1997--2016 The R Core Team * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -396,18 +396,8 @@ SEXP fixup_NaRm(SEXP args) SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) { - SEXP ans, a, stmp = NA_STRING /* -Wall */, scum = NA_STRING, call2; - double tmp = 0.0, s; - Rcomplex z, ztmp, zcum={0.0, 0.0} /* -Wall */; - int itmp = 0, icum = 0, int_a, real_a, empty, warn = 0 /* dummy */; - SEXPTYPE ans_type;/* only INTEGER, REAL, COMPLEX or STRSXP here */ - - Rboolean narm; - int updated; - /* updated := 1 , as soon as (i)tmp (do_summary), - or *value ([ir]min / max) is assigned */ - checkArity(op, args); + SEXP ans; if(PRIMVAL(op) == 1) { /* mean */ LDOUBLE s = 0., si = 0., t = 0., ti = 0.; R_xlen_t i, n = XLENGTH(CAR(args)); @@ -461,6 +451,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) return ans; } + SEXP call2; /* match to foo(..., na.rm=FALSE) */ PROTECT(args = fixup_NaRm(args)); PROTECT(call2 = shallow_duplicate(call)); @@ -477,9 +468,17 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) #endif ans = matchArgExact(R_NaRmSymbol, &args); - narm = asLogical(ans); - updated = 0; - empty = 1;/*- =1: only zero-length arguments, or NA with na.rm=T */ + Rboolean int_a, real_a, complex_a, + narm = asLogical(ans), + empty = TRUE;// <==> only zero-length arguments, or NA with na.rm=T + int updated = 0; + /* updated := 1 , as soon as (i)tmp (do_summary), + or *value ([ir]min / max) is assigned */ + SEXP a; + double tmp = 0.0, s; + Rcomplex ztmp, zcum={0.0, 0.0} /* -Wall */; + int itmp = 0, icum = 0, warn = 0 /* dummy */; + SEXPTYPE ans_type;/* only INTEGER, REAL, COMPLEX or STRSXP here */ int iop = PRIMVAL(op); switch(iop) { @@ -489,15 +488,31 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) documented to be the same as integer(0). */ a = args; - int_a = 1; + complex_a = real_a = FALSE; while (a != R_NilValue) { - if(!isInteger(CAR(a)) && !isLogical(CAR(a)) && !isNull(CAR(a))) { - int_a = 0; + switch(TYPEOF(CAR(a))) { + case INTSXP: + case LGLSXP: + case NILSXP: break; - } + case REALSXP: + real_a = TRUE; + break; + case CPLXSXP: + complex_a = TRUE; + break; + default: + a = CAR(a); goto invalid_type; + } a = CDR(a); } - ans_type = int_a ? INTSXP: REALSXP; /* try to keep if possible.. */ + if(complex_a) { + ans_type = CPLXSXP; + } else if(real_a) { + ans_type = REALSXP; + } else { + ans_type = INTSXP; + } zcum.r = zcum.i = 0.; icum = 0; break; @@ -528,12 +543,13 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) return R_NilValue;/*-Wall */ } + SEXP stmp = NA_STRING, + scum = PROTECT(NA_STRING); /*-- now loop over all arguments. Do the 'op' switch INSIDE : */ - PROTECT(scum); while (args != R_NilValue) { a = CAR(args); - int_a = 0;/* int_a = 1 <--> a is INTEGER */ - real_a = 0; + int_a = FALSE;// int_a = TRUE <--> a is INTEGER + real_a = FALSE; if(xlength(a) > 0) { updated = 0;/*- GLOBAL -*/ @@ -545,12 +561,12 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) switch(TYPEOF(a)) { case LGLSXP: case INTSXP: - int_a = 1; + int_a = TRUE; if (iop == 2) updated = imin(INTEGER(a), XLENGTH(a), &itmp, narm); else updated = imax(INTEGER(a), XLENGTH(a), &itmp, narm); break; case REALSXP: - real_a = 1; + real_a = TRUE; if(ans_type == INTSXP) {/* change to REAL */ ans_type = REALSXP; if(!empty) zcum.r = Int2Real(icum); @@ -618,7 +634,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) /*-- in what cases does this happen here at all? -- if there are no non-missing elements. */ - DbgP2(" NOT updated [!! RARE !!]: int_a=%d\n", int_a); + DbgP2(" NOT updated [!! RARE !!]: int_a=%s\n", int_a ? "TRUE" : "FALSE"); } break;/*--- end of min() / max() ---*/ @@ -691,6 +707,7 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) ans_type = CPLXSXP; updated = cprod(COMPLEX(a), XLENGTH(a), &ztmp, narm); if(updated) { + Rcomplex z; z.r = zcum.r; z.i = zcum.i; zcum.r = z.r * ztmp.r - z.i * ztmp.i; @@ -740,9 +757,9 @@ SEXP attribute_hidden do_summary(SEXP call, SEXP op, SEXP args, SEXP env) ans_type = TYPEOF(a); } } - DbgP3(" .. upd.=%d, empty: old=%d", updated, empty); - if(empty && updated) empty=0; - DbgP2(", new=%d\n", empty); + DbgP3(" .. upd.=%d, empty: old=%d", updated, (int)empty); + if(empty && updated) empty=FALSE; + DbgP2(", new=%d\n", (int)empty); args = CDR(args); } /*-- while(..) loop over args */ diff --git a/source/src/main/util.c b/source/src/main/util.c index c69723873..4fb26027e 100644 --- a/source/src/main/util.c +++ b/source/src/main/util.c @@ -1030,18 +1030,21 @@ const char *getTZinfo(void) { const char *p = getenv("TZ"); if(p) return p; -#ifdef HAVE_REALPATH +#ifdef HAVE_READLINK // This works on Linux, macOS and *BSD: other known OSes set TZ. + // However, some Linux document /etc/localtime as a symlink + // but do not follow their own documentation! static char def_tz[PATH_MAX+1] = ""; if(def_tz[0]) return def_tz; char abspath[PATH_MAX + 1]; - const char* lt = realpath("/etc/localtime", abspath); + memset(abspath, 0, PATH_MAX + 1); // ensure nul-terminated + ssize_t cnt = readlink("/etc/localtime", abspath, PATH_MAX); # ifdef __APPLE__ // macOS <= 10.12 expands to /usr/share/zoneinfo/ // macOS 10.13 expands to /usr/share/zoneinfo.default/ - // but 10.13.1 expands to /private/var/db/timezone/tz/2017c.1.0/zoneinfo/ - if(lt) { + // but 10.13.[12] expand to /var/db/timezone/zoneinfo/ + if(cnt > 0) { // -1 is error condition if(strstr(abspath, ".default/")) strncpy(def_tz, abspath + 28, PATH_MAX); else { @@ -1058,7 +1061,7 @@ const char *getTZinfo(void) return def_tz; } # else - if(lt) { + if(cnt > 0) { strncpy(def_tz, abspath + 20, PATH_MAX); // strip "/usr/share/zoneinfo/" return def_tz; } diff --git a/source/src/modules/X11/dataentry.c b/source/src/modules/X11/dataentry.c index b43a0c038..c1ea1d17d 100644 --- a/source/src/modules/X11/dataentry.c +++ b/source/src/modules/X11/dataentry.c @@ -105,7 +105,7 @@ typedef struct { int text_offset; int nboxchars; int xmaxused, ymaxused; - char labform[6]; + char labform[15]; // increased from 6 to pacify gcc 8 Rboolean isEditor; Atom prot; } destruct, *DEstruct; diff --git a/source/src/modules/lapack/Lapack.c b/source/src/modules/lapack/Lapack.c index 373abc9c7..39fcd5c38 100644 --- a/source/src/modules/lapack/Lapack.c +++ b/source/src/modules/lapack/Lapack.c @@ -1375,7 +1375,7 @@ static SEXP mod_do_lapack(SEXP call, SEXP op, SEXP args, SEXP env) { #if defined(HAVE_DLADDR) && defined(HAVE_REALPATH) Dl_info dl_info; - if (dladdr(F77_NAME(ilaver), &dl_info)) { + if (dladdr((const void *) F77_NAME(ilaver), &dl_info)) { char buf[PATH_MAX+1]; char *res = realpath(dl_info.dli_fname, buf); if (res) { diff --git a/source/src/modules/lapack/README b/source/src/modules/lapack/README index 9bf18dc47..a3de5c79c 100644 --- a/source/src/modules/lapack/README +++ b/source/src/modules/lapack/README @@ -1,5 +1,5 @@ The Fortran routines here were extracted from LAPACK 3.1.0, then -3.1.1, 3.4.1, 3.4.2, 3.5.0, 3.6.0, 3.6.1, 3.7.0, 3.7.1. +3.1.1, 3.4.1, 3.4.2, 3.5.0, 3.6.0, 3.6.1, 3.7.0, 3.7.1, 3.8.0 (Sources from http://www.netlib.org/lapack and mirrors). dlapack.f contains support routines for `real' LAPACK calls. @@ -15,7 +15,7 @@ Preparation ----------- dlapack.f and cmplx.f were created at the top level in the LAPACK -3.7.1 sources by copying {dble,cmplx}.txt there and running +3.8.0 sources by copying {dble,cmplx}.txt there and running in R dir.create('dble') foo <- scan('dble.txt', "") diff --git a/source/src/modules/lapack/cmplx.f b/source/src/modules/lapack/cmplx.f index 47dbeaf24..9ae8d03b3 100644 --- a/source/src/modules/lapack/cmplx.f +++ b/source/src/modules/lapack/cmplx.f @@ -2684,7 +2684,7 @@ SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date June 2017 +*> \date November 2017 * *> \ingroup complex16GEcomputational * @@ -2742,10 +2742,10 @@ SUBROUTINE ZGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.1) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2017 +* November 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N @@ -2764,8 +2764,7 @@ SUBROUTINE ZGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, * .. Local Scalars .. LOGICAL LQUERY INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB, - $ NBMIN, NX - DOUBLE PRECISION WS + $ NBMIN, NX, WS * .. * .. External Subroutines .. EXTERNAL XERBLA, ZGEBD2, ZGEMM, ZLABRD @@ -7996,7 +7995,7 @@ SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup complex16GEauxiliary * @@ -8009,10 +8008,10 @@ SUBROUTINE ZGERFS( TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, B, LDB, * ===================================================================== SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER LDA, N @@ -8035,7 +8034,7 @@ SUBROUTINE ZGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) COMPLEX*16 TEMP * .. * .. External Subroutines .. - EXTERNAL ZLASWP, ZSCAL + EXTERNAL ZLASWP, ZSCAL, DLABAD * .. * .. External Functions .. INTEGER IZAMAX @@ -14916,7 +14915,7 @@ SUBROUTINE ZGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, * ===================================================================== SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -14940,7 +14939,7 @@ SUBROUTINE ZGETC2( N, A, LDA, IPIV, JPIV, INFO ) DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX * .. * .. External Subroutines .. - EXTERNAL ZGERU, ZSWAP + EXTERNAL ZGERU, ZSWAP, DLABAD * .. * .. External Functions .. DOUBLE PRECISION DLAMCH @@ -33956,17 +33955,17 @@ SUBROUTINE ZLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup complex16OTHERauxiliary * * ===================================================================== SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INCX, N @@ -34032,7 +34031,7 @@ SUBROUTINE ZLARFG( N, ALPHA, X, INCX, TAU ) BETA = BETA*RSAFMN ALPHI = ALPHI*RSAFMN ALPHR = ALPHR*RSAFMN - IF( ABS( BETA ).LT.SAFMIN ) + IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) ) $ GO TO 10 * * New BETA is at most 1, at least SAFMIN @@ -38359,7 +38358,7 @@ SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup complex16OTHERauxiliary * @@ -38439,10 +38438,10 @@ SUBROUTINE ZLATRD( UPLO, N, NB, A, LDA, E, TAU, W, LDW ) SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, $ CNORM, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER DIAG, NORMIN, TRANS, UPLO @@ -38477,7 +38476,7 @@ SUBROUTINE ZLATRS( UPLO, TRANS, DIAG, NORMIN, N, A, LDA, X, SCALE, $ ZDOTU, ZLADIV * .. * .. External Subroutines .. - EXTERNAL DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV + EXTERNAL DSCAL, XERBLA, ZAXPY, ZDSCAL, ZTRSV, DLABAD * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX, MIN @@ -47511,7 +47510,7 @@ SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup complex16OTHERcomputational * @@ -47533,10 +47532,10 @@ SUBROUTINE ZTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, $ LDVR, MM, M, WORK, RWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, SIDE @@ -47571,7 +47570,7 @@ SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, EXTERNAL LSAME, IZAMAX, DLAMCH, DZASUM * .. * .. External Subroutines .. - EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS + EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS, DLABAD * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, DCMPLX, DCONJG, DIMAG, MAX @@ -48023,7 +48022,7 @@ SUBROUTINE ZTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date June 2017 +*> \date November 2017 * * @precisions fortran z -> c * @@ -48048,10 +48047,10 @@ SUBROUTINE ZTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, $ LDVR, MM, M, WORK, LWORK, RWORK, LRWORK, INFO) IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.1) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2017 +* November 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, SIDE @@ -48089,7 +48088,7 @@ SUBROUTINE ZTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, * .. * .. External Subroutines .. EXTERNAL XERBLA, ZCOPY, ZDSCAL, ZGEMV, ZLATRS, - $ ZGEMM, DLABAD, ZLASET + $ ZGEMM, DLABAD, ZLASET, ZLACPY * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, DCMPLX, CONJG, AIMAG, MAX diff --git a/source/src/modules/lapack/dlapack.f b/source/src/modules/lapack/dlapack.f index 4b63c819c..af30c019e 100644 --- a/source/src/modules/lapack/dlapack.f +++ b/source/src/modules/lapack/dlapack.f @@ -7762,7 +7762,7 @@ SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date June 2017 +*> \date November 2017 * *> \ingroup doubleGEcomputational * @@ -7820,10 +7820,10 @@ SUBROUTINE DGEBD2( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, INFO ) SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.1) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* June 2017 +* November 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LWORK, M, N @@ -7842,8 +7842,7 @@ SUBROUTINE DGEBRD( M, N, A, LDA, D, E, TAUQ, TAUP, WORK, LWORK, * .. Local Scalars .. LOGICAL LQUERY INTEGER I, IINFO, J, LDWRKX, LDWRKY, LWKOPT, MINMN, NB, - $ NBMIN, NX - DOUBLE PRECISION WS + $ NBMIN, NX, WS * .. * .. External Subroutines .. EXTERNAL DGEBD2, DGEMM, DLABRD, XERBLA @@ -22279,7 +22278,7 @@ SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleGEauxiliary * @@ -22292,10 +22291,10 @@ SUBROUTINE DGERQF( M, N, A, LDA, TAU, WORK, LWORK, INFO ) * ===================================================================== SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER LDA, N @@ -22317,7 +22316,7 @@ SUBROUTINE DGESC2( N, A, LDA, RHS, IPIV, JPIV, SCALE ) DOUBLE PRECISION BIGNUM, EPS, SMLNUM, TEMP * .. * .. External Subroutines .. - EXTERNAL DLASWP, DSCAL + EXTERNAL DLASWP, DSCAL, DLABAD * .. * .. External Functions .. INTEGER IDAMAX @@ -29938,7 +29937,7 @@ SUBROUTINE DGESVX( FACT, TRANS, N, NRHS, A, LDA, AF, LDAF, IPIV, * ===================================================================== SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -29962,7 +29961,7 @@ SUBROUTINE DGETC2( N, A, LDA, IPIV, JPIV, INFO ) DOUBLE PRECISION BIGNUM, EPS, SMIN, SMLNUM, XMAX * .. * .. External Subroutines .. - EXTERNAL DGER, DSWAP + EXTERNAL DGER, DSWAP, DLABAD * .. * .. External Functions .. DOUBLE PRECISION DLAMCH @@ -37924,7 +37923,7 @@ SUBROUTINE DGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERcomputational * @@ -37949,10 +37948,10 @@ SUBROUTINE DGGSVP( JOBU, JOBV, JOBQ, M, P, N, A, LDA, B, LDB, SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, $ SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, LDV, LWORK, M, MV, N, NSWEEP @@ -37993,7 +37992,8 @@ SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, EXTERNAL IDAMAX, LSAME, DDOT, DNRM2 * .. * .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP + EXTERNAL DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP, + $ XERBLA * .. * .. Executable Statements .. * @@ -39045,7 +39045,7 @@ SUBROUTINE DGSVJ0( JOBV, M, N, A, LDA, D, SVA, MV, V, LDV, EPS, SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV, $ EPS, SFMIN, TOL, NSWEEP, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -39089,7 +39089,8 @@ SUBROUTINE DGSVJ1( JOBV, M, N, N1, A, LDA, D, SVA, MV, V, LDV, EXTERNAL IDAMAX, LSAME, DDOT, DNRM2 * .. * .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP + EXTERNAL DAXPY, DCOPY, DLASCL, DLASSQ, DROTM, DSWAP, + $ XERBLA * .. * .. Executable Statements .. * @@ -71864,17 +71865,17 @@ SUBROUTINE DLARFB( SIDE, TRANS, DIRECT, STOREV, M, N, K, V, LDV, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERauxiliary * * ===================================================================== SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INCX, N @@ -71935,7 +71936,7 @@ SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU ) CALL DSCAL( N-1, RSAFMN, X, INCX ) BETA = BETA*RSAFMN ALPHA = ALPHA*RSAFMN - IF( ABS( BETA ).LT.SAFMIN ) + IF( (ABS( BETA ).LT.SAFMIN) .AND. (KNT .LT. 20) ) $ GO TO 10 * * New BETA is at most 1, at least SAFMIN @@ -72058,17 +72059,17 @@ SUBROUTINE DLARFG( N, ALPHA, X, INCX, TAU ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERauxiliary * * ===================================================================== SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INCX, N @@ -72142,7 +72143,7 @@ SUBROUTINE DLARFGP( N, ALPHA, X, INCX, TAU ) CALL DSCAL( N-1, BIGNUM, X, INCX ) BETA = BETA*BIGNUM ALPHA = ALPHA*BIGNUM - IF( ABS( BETA ).LT.SMLNUM ) + IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) ) $ GO TO 10 * * New BETA is at most 1, at least SMLNUM @@ -75613,7 +75614,7 @@ SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2, $ W, WERR, WGAP, IBLOCK, INDEXW, GERS, PIVMIN, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.1) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -75668,7 +75669,7 @@ SUBROUTINE DLARRE( RANGE, N, VL, VU, IL, IU, D, E, E2, * .. * .. External Subroutines .. EXTERNAL DCOPY, DLARNV, DLARRA, DLARRB, DLARRC, DLARRD, - $ DLASQ2 + $ DLASQ2, DLARRK * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, MIN @@ -77622,7 +77623,7 @@ SUBROUTINE DLARRR( N, D, E, INFO ) *> VU is DOUBLE PRECISION *> Upper bound of the interval that contains the desired *> eigenvalues. VL < VU. -*> Note: VU is currently not used by this implmentation of DLARRV, VU is +*> Note: VU is currently not used by this implementation of DLARRV, VU is *> passed to DLARRV because it could be used compute gaps on the right end *> of the extremal eigenvalues. However, with not much initial accuracy in *> LAMBDA and VU, the formula can lead to an overestimation of the right gap @@ -77845,7 +77846,7 @@ SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN, $ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ, $ WORK, IWORK, INFO ) * -* -- LAPACK auxiliary routine (version 3.7.1) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 @@ -79206,17 +79207,17 @@ SUBROUTINE DLARTGP( F, G, CS, SN, R ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup auxOTHERcomputational * * ===================================================================== SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. DOUBLE PRECISION CS, SIGMA, SN, X, Y @@ -79231,6 +79232,9 @@ SUBROUTINE DLARTGS( X, Y, SIGMA, CS, SN ) * .. Local Scalars .. DOUBLE PRECISION R, S, THRESH, W, Z * .. +* .. External Subroutines .. + EXTERNAL DLARTGP +* .. * .. External Functions .. DOUBLE PRECISION DLAMCH EXTERNAL DLAMCH @@ -116875,17 +116879,17 @@ SUBROUTINE DPTTS2( N, NRHS, D, E, B, LDB ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERauxiliary * * ===================================================================== SUBROUTINE DRSCL( N, SA, SX, INCX ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INCX, N @@ -116910,7 +116914,7 @@ SUBROUTINE DRSCL( N, SA, SX, INCX ) EXTERNAL DLAMCH * .. * .. External Subroutines .. - EXTERNAL DSCAL + EXTERNAL DSCAL, DLABAD * .. * .. Intrinsic Functions .. INTRINSIC ABS @@ -133521,7 +133525,7 @@ SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleSYcomputational * @@ -133536,10 +133540,10 @@ SUBROUTINE DSYCONV( UPLO, WAY, N, A, LDA, IPIV, E, INFO ) * ===================================================================== SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. INTEGER INFO, LDA, N @@ -133570,7 +133574,7 @@ SUBROUTINE DSYEQUB( UPLO, N, A, LDA, S, SCOND, AMAX, WORK, INFO ) EXTERNAL DLAMCH, LSAME * .. * .. External Subroutines .. - EXTERNAL DLASSQ + EXTERNAL DLASSQ, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS, INT, LOG, MAX, MIN, SQRT @@ -140874,17 +140878,17 @@ SUBROUTINE DSYTRI( UPLO, N, A, LDA, IPIV, WORK, INFO ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleSYcomputational * * ===================================================================== SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER UPLO @@ -140907,7 +140911,7 @@ SUBROUTINE DSYTRI2( UPLO, N, A, LDA, IPIV, WORK, LWORK, INFO ) EXTERNAL LSAME, ILAENV * .. * .. External Subroutines .. - EXTERNAL DSYTRI, DSYTRI2X + EXTERNAL DSYTRI, DSYTRI2X, XERBLA * .. * .. Executable Statements .. * @@ -152730,7 +152734,7 @@ SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERcomputational * @@ -152771,10 +152775,10 @@ SUBROUTINE DTPCON( NORM, UPLO, DIAG, N, AP, RCOND, WORK, IWORK, SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT, $ A, LDA, B, LDB, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER SIDE, TRANS @@ -152797,7 +152801,7 @@ SUBROUTINE DTPMQRT( SIDE, TRANS, M, N, K, L, NB, V, LDV, T, LDT, EXTERNAL LSAME * .. * .. External Subroutines .. - EXTERNAL XERBLA + EXTERNAL DTPRFB, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN @@ -156402,7 +156406,7 @@ SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERcomputational * @@ -156424,10 +156428,10 @@ SUBROUTINE DTRCON( NORM, UPLO, DIAG, N, A, LDA, RCOND, WORK, SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, $ LDVR, MM, M, WORK, INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, SIDE @@ -156459,7 +156463,8 @@ SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, EXTERNAL LSAME, IDAMAX, DDOT, DLAMCH * .. * .. External Subroutines .. - EXTERNAL DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA + EXTERNAL DLABAD, DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, + $ XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, SQRT @@ -157493,7 +157498,7 @@ SUBROUTINE DTREVC( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * * @precisions fortran d -> s * @@ -157518,10 +157523,10 @@ SUBROUTINE DTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, $ VR, LDVR, MM, M, WORK, LWORK, INFO ) IMPLICIT NONE * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, SIDE @@ -157558,7 +157563,7 @@ SUBROUTINE DTREVC3( SIDE, HOWMNY, SELECT, N, T, LDT, VL, LDVL, * .. * .. External Subroutines .. EXTERNAL DAXPY, DCOPY, DGEMV, DLALN2, DSCAL, XERBLA, - $ DGEMM, DLASET, DLABAD + $ DGEMM, DLASET, DLABAD, DLACPY * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, SQRT @@ -160265,7 +160270,7 @@ SUBROUTINE DTRSEN( JOB, COMPQ, SELECT, N, T, LDT, Q, LDQ, WR, WI, *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup doubleOTHERcomputational * @@ -160317,10 +160322,10 @@ SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, $ LDVR, S, SEP, MM, M, WORK, LDWORK, IWORK, $ INFO ) * -* -- LAPACK computational routine (version 3.7.0) -- +* -- LAPACK computational routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER HOWMNY, JOB @@ -160355,7 +160360,7 @@ SUBROUTINE DTRSNA( JOB, HOWMNY, SELECT, N, T, LDT, VL, LDVL, VR, EXTERNAL LSAME, DDOT, DLAMCH, DLAPY2, DNRM2 * .. * .. External Subroutines .. - EXTERNAL DLACN2, DLACPY, DLAQTR, DTREXC, XERBLA + EXTERNAL DLABAD, DLACN2, DLACPY, DLAQTR, DTREXC, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, SQRT @@ -164124,7 +164129,7 @@ INTEGER FUNCTION ILADLR( M, N, A, LDA ) *> \author Univ. of Colorado Denver *> \author NAG Ltd. * -*> \date December 2016 +*> \date November 2017 * *> \ingroup OTHERauxiliary * @@ -164154,10 +164159,10 @@ INTEGER FUNCTION ILADLR( M, N, A, LDA ) * ===================================================================== INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- -* December 2016 +* November 2017 * * .. Scalar Arguments .. CHARACTER*( * ) NAME, OPTS @@ -164168,8 +164173,8 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) * * .. Local Scalars .. INTEGER I, IC, IZ, NB, NBMIN, NX - LOGICAL CNAME, SNAME - CHARACTER C1*1, C2*2, C4*2, C3*3, SUBNAM*6 + LOGICAL CNAME, SNAME, TWOSTAGE + CHARACTER C1*1, C2*2, C4*2, C3*3, SUBNAM*16 * .. * .. Intrinsic Functions .. INTRINSIC CHAR, ICHAR, INT, MIN, REAL @@ -164181,8 +164186,7 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) * .. Executable Statements .. * GO TO ( 10, 10, 10, 80, 90, 100, 110, 120, - $ 130, 140, 150, 160, 160, 160, 160, 160, - $ 170, 170, 170, 170, 170 )ISPEC + $ 130, 140, 150, 160, 160, 160, 160, 160)ISPEC * * Invalid value for ISPEC * @@ -164249,6 +164253,8 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) C2 = SUBNAM( 2: 3 ) C3 = SUBNAM( 4: 6 ) C4 = C3( 2: 3 ) + TWOSTAGE = LEN( SUBNAM ).GE.11 + $ .AND. SUBNAM( 11: 11 ).EQ.'2' * GO TO ( 50, 60, 70 )ISPEC * @@ -164352,9 +164358,17 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) ELSE IF( C2.EQ.'SY' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN - NB = 64 + IF( TWOSTAGE ) THEN + NB = 192 + ELSE + NB = 64 + END IF ELSE - NB = 64 + IF( TWOSTAGE ) THEN + NB = 192 + ELSE + NB = 64 + END IF END IF ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN NB = 32 @@ -164363,7 +164377,11 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) END IF ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN IF( C3.EQ.'TRF' ) THEN - NB = 64 + IF( TWOSTAGE ) THEN + NB = 192 + ELSE + NB = 64 + END IF ELSE IF( C3.EQ.'TRD' ) THEN NB = 32 ELSE IF( C3.EQ.'GST' ) THEN @@ -164682,13 +164700,6 @@ INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) * ILAENV = IPARMQ( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) RETURN -* - 170 CONTINUE -* -* 17 <= ISPEC <= 21: 2stage eigenvalues and SVD or related subroutines. -* - ILAENV = IPARAM2STAGE( ISPEC, NAME, OPTS, N1, N2, N3, N4 ) - RETURN * * End of ILAENV * @@ -164946,8 +164957,8 @@ SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) INTEGER VERS_MAJOR, VERS_MINOR, VERS_PATCH * ===================================================================== VERS_MAJOR = 3 - VERS_MINOR = 7 - VERS_PATCH = 1 + VERS_MINOR = 8 + VERS_PATCH = 0 * ===================================================================== * RETURN @@ -164955,7 +164966,7 @@ SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) # 1 "SRC/iparam2stage.F" # 1 "" 1 # 1 "" 3 -# 329 "" 3 +# 330 "" 3 # 1 "" 1 # 1 "" 2 # 1 "SRC/iparam2stage.F" 2 @@ -164999,7 +165010,9 @@ SUBROUTINE ILAVER( VERS_MAJOR, VERS_MINOR, VERS_PATCH ) *> useful for xHETRD_2STAGE, xHETRD_H@2HB, xHETRD_HB2ST, *> xGEBRD_2STAGE, xGEBRD_GE2GB, xGEBRD_GB2BD *> and related subroutines for eigenvalue problems. -*> It is called whenever ILAENV is called with 17 <= ISPEC <= 21 +*> It is called whenever ILAENV is called with 17 <= ISPEC <= 21. +*> It is called whenever ILAENV2STAGE is called with 1 <= ISPEC <= 5 +*> with a direct conversion ISPEC + 16. *> \endverbatim * * Arguments: @@ -165118,7 +165131,7 @@ INTEGER FUNCTION IPARAM2STAGE( ISPEC, NAME, OPTS, IMPLICIT NONE * -* -- LAPACK auxiliary routine (version 3.7.0) -- +* -- LAPACK auxiliary routine (version 3.8.0) -- * -- LAPACK is a software package provided by Univ. of Tennessee, -- * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- * June 2016 diff --git a/source/src/scripts/BATCH b/source/src/scripts/BATCH index f13a3d540..b42882cd6 100644 --- a/source/src/scripts/BATCH +++ b/source/src/scripts/BATCH @@ -1,11 +1,11 @@ # # ${R_HOME}/bin/BATCH -revision='$Rev: 71736 $' +revision='$Rev: 74001 $' version=`set - ${revision}; echo ${2}` version="R batch front end: ${R_VERSION} (r${version}) -Copyright (C) 2000--2006 The R Core Team. +Copyright (C) 2000--2018 The R Core Team. This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty." diff --git a/source/src/scripts/COMPILE b/source/src/scripts/COMPILE index 6ce90590e..c23192dca 100644 --- a/source/src/scripts/COMPILE +++ b/source/src/scripts/COMPILE @@ -3,11 +3,11 @@ # @configure_input@ -revision='$Rev: 71736 $' +revision='$Rev: 74001 $' version=`set - ${revision}; echo ${2}` version="R compilation front end: ${R_VERSION} (r${version}) -Copyright (C) 2000-2013 The R Core Team. +Copyright (C) 2000-2018 The R Core Team. This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty." diff --git a/source/src/scripts/LINK b/source/src/scripts/LINK index 213ede961..4b098aca7 100644 --- a/source/src/scripts/LINK +++ b/source/src/scripts/LINK @@ -1,11 +1,11 @@ ## ## ${R_HOME}/bin/LINK -revision='$Rev: 71736 $' +revision='$Rev: 74001 $' version=`set - ${revision}; echo ${2}` version="R linker front end: ${R_VERSION} (r${version}) -Copyright (C) 2000-2013 The R Core Team. +Copyright (C) 2000-2018 The R Core Team. This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty." diff --git a/source/src/scripts/config b/source/src/scripts/config index 9c02bb82d..f1d1277fb 100644 --- a/source/src/scripts/config +++ b/source/src/scripts/config @@ -5,7 +5,7 @@ ## Usage: ## R CMD config [options] [VAR] -## Copyright (C) 2002-2017 The R Core Team +## Copyright (C) 2002-2018 The R Core Team ## ## This document is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -20,11 +20,11 @@ ## A copy of the GNU General Public License is available at ## https://www.R-project.org/Licenses/ -revision='$Revision: 72376 $' +revision='$Revision: 74001 $' version=`set - ${revision}; echo ${2}` version="R configuration information retrieval script: ${R_VERSION} (r${version}) -Copyright (C) 2002-2015 The R Core Team. +Copyright (C) 2002-2018 The R Core Team. This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty." diff --git a/source/src/scripts/javareconf.in b/source/src/scripts/javareconf.in index 1a4d0b252..04fd62482 100644 --- a/source/src/scripts/javareconf.in +++ b/source/src/scripts/javareconf.in @@ -9,11 +9,11 @@ fi DYLIB_EXT=`${R_HOME}/bin/R CMD config DYLIB_EXT` tools_classpath=${R_SHARE_DIR}/java -revision='$Rev: 73535 $' +revision='$Rev: 74001 $' version=`set - ${revision}; echo ${2}` version="R Java configurator: ${R_VERSION} (r${version}) -Copyright (C) 2002-2015 The R Core Team. +Copyright (C) 2002-2018 The R Core Team. This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty." diff --git a/source/tests/Examples/datasets-Ex.Rout.save b/source/tests/Examples/datasets-Ex.Rout.save index 6d1a55bbf..5b432b5ff 100644 --- a/source/tests/Examples/datasets-Ex.Rout.save +++ b/source/tests/Examples/datasets-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -3488,7 +3488,7 @@ c0 -5.14 > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 2.07 0.04 2.121 0 0 +Time elapsed: 1.908 0.05 1.969 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/grDevices-Ex.Rout.save b/source/tests/Examples/grDevices-Ex.Rout.save index 29a03231c..09325012f 100644 --- a/source/tests/Examples/grDevices-Ex.Rout.save +++ b/source/tests/Examples/grDevices-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -3791,7 +3791,7 @@ $zlab > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 11.701 0.26 12.013 0 0 +Time elapsed: 10.758 0.336 11.144 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/graphics-Ex.Rout.save b/source/tests/Examples/graphics-Ex.Rout.save index 4197ed842..b95a93db9 100644 --- a/source/tests/Examples/graphics-Ex.Rout.save +++ b/source/tests/Examples/graphics-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -2074,7 +2074,7 @@ N > points.default # to see how it calls "plot.xy(xy.coords(x, y), ...)" function (x, y = NULL, type = "p", ...) plot.xy(xy.coords(x, y), type = type, ...) - + > > @@ -2355,7 +2355,7 @@ Warning in matrix(0:1, ncol = 5, nrow = 3) : > rect(125+j, 360+j, 141+j, 405+j/2, col = c(NA,0), + border = "gold", lwd = 2) > rect(125+j, 296+j/2, 141+j, 331+j/5, col = c(NA,"midnightblue")) -> mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\"))") +> mtext("+ 2 x 6 rect(*, col = c(NA,0)) and col = c(NA,\"m..blue\")") > > ## an example showing colouring and shading > plot(c(100, 200), c(300, 450), type= "n", xlab = "", ylab = "") @@ -2944,7 +2944,7 @@ function (xy = 1, warn.log = TRUE) u <- par("usr") xy * c(u[2L] - u[1L], u[4L] - u[3L])/par("pin") } - + > > ## plot labels offset 0.12 inches to the right @@ -3024,7 +3024,7 @@ function (xy = 1, warn.log = TRUE) > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 2.929 0.069 3.014 0 0 +Time elapsed: 2.669 0.049 2.733 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/grid-Ex.Rout.save b/source/tests/Examples/grid-Ex.Rout.save index ffcbcd83d..31d41cf2f 100644 --- a/source/tests/Examples/grid-Ex.Rout.save +++ b/source/tests/Examples/grid-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -2069,7 +2069,7 @@ vp1::vp2 > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 1.76 0.025 1.793 0 0 +Time elapsed: 1.602 0.029 1.642 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/splines-Ex.Rout.save b/source/tests/Examples/splines-Ex.Rout.save index 0c43bd469..e5b3a8cd6 100644 --- a/source/tests/Examples/splines-Ex.Rout.save +++ b/source/tests/Examples/splines-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -582,7 +582,7 @@ attr(,"class") > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 0.213 0.008 0.222 0 0 +Time elapsed: 0.201 0.007 0.209 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/stats-Ex.Rout.save b/source/tests/Examples/stats-Ex.Rout.save index d1bd2aad2..74c359dba 100644 --- a/source/tests/Examples/stats-Ex.Rout.save +++ b/source/tests/Examples/stats-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -341,7 +341,7 @@ lm2 6 336.3417 > all.equal(df(x^2, 1, 5), dt(x, 5)/x) [1] TRUE > -> ## Identity: qf(2*p - 1, 1, df)) == qt(p, df)^2) for p >= 1/2 +> ## Identity: qf(2*p - 1, 1, df) == qt(p, df)^2 for p >= 1/2 > p <- seq(1/2, .99, length = 50); df <- 10 > rel.err <- function(x, y) ifelse(x == y, 0, abs(x-y)/mean(abs(c(x,y)))) > @@ -3804,7 +3804,7 @@ sigma^2 estimated as 0.4566: log likelihood = -101.2, aic = 212.4 > > asOneSidedFormula("age") ~age - + > asOneSidedFormula(~ age) ~age > @@ -4789,7 +4789,7 @@ function (V) r[cbind(1L:p, 1L:p)] <- 1 r } - + > stopifnot(all.equal(Cl, cov2cor(cov(longley))), + all.equal(cor(longley, method = "kendall"), @@ -7345,7 +7345,7 @@ attr(,".Environment") > environment(as.formula("y ~ x")) > environment(as.formula("y ~ x", env = new.env())) - + > > > ## Create a formula for a model with a large number of variables: @@ -11642,7 +11642,7 @@ Warning in xy.coords(x, y, xlabel, ylabel, log) : > require(graphics) > > rock1 <- within(rock, { area1 <- area/10000; peri1 <- peri/10000 }) -> par(mfrow = c(3,2)) # maybe: , pty = "s") +> par(mfrow = c(3,2)) # maybe: , pty = "s" > rock.ppr <- ppr(log(perm) ~ area1 + peri1 + shape, + data = rock1, nterms = 2, max.terms = 5) > plot(rock.ppr, main = "ppr(log(perm)~ ., nterms=2, max.terms=5)") @@ -11955,14 +11955,14 @@ attr(,"class") $linkfun function (mu) mu^lambda - - + + $linkinv function (eta) pmax(eta^(1/lambda), .Machine$double.eps) - - + + > > @@ -12112,6 +12112,37 @@ NOTE: n is number in *each* group NOTE: n is number in *each* group > ## => n = 10451937 +> try( ++ power.prop.test(n=30, p1=0.90, p2=NULL, power=0.8) ++ ) # a warning (which may become an error) +Warning in power.prop.test(n = 30, p1 = 0.9, p2 = NULL, power = 0.8) : + No p2 in in [p1, 1] can be found to achieve the desired power + + Two-sample comparison of proportions power calculation + + n = 30 + p1 = 0.9 + p2 = 1.030182 + sig.level = 0.05 + power = 0.8 + alternative = two.sided + +NOTE: n is number in *each* group + +> ## Reason: +> power.prop.test( p1=0.90, p2= 1.0, power=0.8) ##-> n = 73.37 + + Two-sample comparison of proportions power calculation + + n = 73.37427 + p1 = 0.9 + p2 = 1 + sig.level = 0.05 + power = 0.8 + alternative = two.sided + +NOTE: n is number in *each* group + > > > @@ -16042,8 +16073,8 @@ Step function with continuity 'f'= 0.2 , 3 knots at > unclass(sfun0) function (v) .approxfun(x, y, v, method, yleft, yright, f) - - + + attr(,"call") stepfun(1:3, y0, f = 0) > ls(envir = environment(sfun0)) @@ -18367,7 +18398,7 @@ Number of Fisher Scoring iterations: 6 > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 6.89 0.187 7.11 0 0 +Time elapsed: 6.49 0.178 6.726 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/stats4-Ex.Rout.save b/source/tests/Examples/stats4-Ex.Rout.save index 460f74a54..bd12a8508 100644 --- a/source/tests/Examples/stats4-Ex.Rout.save +++ b/source/tests/Examples/stats4-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -184,7 +184,7 @@ Coefficients: > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 0.609 0.018 0.638 0 0 +Time elapsed: 0.55 0.01 0.563 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/Examples/tools-Ex.Rout.save b/source/tests/Examples/tools-Ex.Rout.save index 845ab0538..1faf0deb3 100644 --- a/source/tests/Examples/tools-Ex.Rout.save +++ b/source/tests/Examples/tools-Ex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -202,7 +202,7 @@ Error in assertWarning(ff()) : > bibstyle("unsorted", sortKeys = function(refs) seq_along(refs), + fmtPrefix = function(paper) paste0("[", paper$.index, "]"), + .init = TRUE) - + > print(refs, .bibstyle = "unsorted") [1] R Core Team (2013). _R: A Language and Environment for Statistical Computing_. R Foundation for Statistical Computing, Vienna, Austria. @@ -997,7 +997,7 @@ List of 6 > ### > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 0.39 0.014 0.405 0 0 +Time elapsed: 0.344 0.01 0.356 0 0 > grDevices::dev.off() null device 1 diff --git a/source/tests/R-intro.Rout.save b/source/tests/R-intro.Rout.save index 95b435f21..baa447db4 100644 --- a/source/tests/R-intro.Rout.save +++ b/source/tests/R-intro.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/any-all.Rout.save b/source/tests/any-all.Rout.save index 8c6fbc425..e700f3550 100644 --- a/source/tests/any-all.Rout.save +++ b/source/tests/any-all.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/arith-true.Rout.save b/source/tests/arith-true.Rout.save index 62e5ddfe9..958e41cae 100644 --- a/source/tests/arith-true.Rout.save +++ b/source/tests/arith-true.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -323,5 +323,5 @@ Warning messages: > > ## Last Line: > cat('Time elapsed: ', proc.time() - .proctime00,'\n') -Time elapsed: 0.329 0.002 0.332 0 0 +Time elapsed: 0.282 0.007 0.291 0 0 > diff --git a/source/tests/arith.Rout.save b/source/tests/arith.Rout.save index 14e7413cf..d7b6d9534 100644 --- a/source/tests/arith.Rout.save +++ b/source/tests/arith.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/complex.Rout.save b/source/tests/complex.Rout.save index 2194c711c..03445f078 100644 --- a/source/tests/complex.Rout.save +++ b/source/tests/complex.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/d-p-q-r-tests.R b/source/tests/d-p-q-r-tests.R index ace834bb4..271134dfe 100644 --- a/source/tests/d-p-q-r-tests.R +++ b/source/tests/d-p-q-r-tests.R @@ -1036,5 +1036,15 @@ stopifnot(all.equal(qbet[[1]], 0.047206901483498, tol=1e-12), ## had discontinuity (from wrong jump out of Newton) in R <= 3.3.2 +## rt() [PR#17306]; rf() and rbeta() [PR#17375] with non-scalar 'ncp' +nc <- c(NA, 1); iN <- is.na(rep_len(nc, 3)) +## each gives warning "NAs produced": +assertWarning(T <- rt (3, 4, ncp = nc)) +assertWarning(F <- rf (3, 4,5, ncp = nc)) +assertWarning(B <- rbeta(3, 4,5, ncp = nc)) +stopifnot(identical(iN, is.na(T)), identical(iN, is.na(F)), identical(iN, is.na(B))) +## was not handled correctly, notably with NA's in ncp, in R <= 3.4.(2|3) + + cat("Time elapsed: ", proc.time() - .ptime,"\n") diff --git a/source/tests/d-p-q-r-tests.Rout.save b/source/tests/d-p-q-r-tests.Rout.save index 798d3f1e8..75689e670 100644 --- a/source/tests/d-p-q-r-tests.Rout.save +++ b/source/tests/d-p-q-r-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -1465,7 +1465,17 @@ rweibull (4, ..): 1 2 [Ok] > ## had discontinuity (from wrong jump out of Newton) in R <= 3.3.2 > > +> ## rt() [PR#17306]; rf() and rbeta() [PR#17375] with non-scalar 'ncp' +> nc <- c(NA, 1); iN <- is.na(rep_len(nc, 3)) +> ## each gives warning "NAs produced": +> assertWarning(T <- rt (3, 4, ncp = nc)) +> assertWarning(F <- rf (3, 4,5, ncp = nc)) +> assertWarning(B <- rbeta(3, 4,5, ncp = nc)) +> stopifnot(identical(iN, is.na(T)), identical(iN, is.na(F)), identical(iN, is.na(B))) +> ## was not handled correctly, notably with NA's in ncp, in R <= 3.4.(2|3) +> +> > > cat("Time elapsed: ", proc.time() - .ptime,"\n") -Time elapsed: 1.676 0.012 1.695 0 0 +Time elapsed: 1.602 0.021 1.631 0 0 > diff --git a/source/tests/datasets.Rout.save b/source/tests/datasets.Rout.save index cbc4e08ca..57e35bac4 100644 --- a/source/tests/datasets.Rout.save +++ b/source/tests/datasets.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/datetime.Rout.save b/source/tests/datetime.Rout.save index 9fe3ef0ce..676bf40ec 100644 --- a/source/tests/datetime.Rout.save +++ b/source/tests/datetime.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/datetime2.Rout.save b/source/tests/datetime2.Rout.save index 7298196e5..1bdff52ef 100644 --- a/source/tests/datetime2.Rout.save +++ b/source/tests/datetime2.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/demos.Rout.save b/source/tests/demos.Rout.save index 5efec9681..19ee03a93 100644 --- a/source/tests/demos.Rout.save +++ b/source/tests/demos.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -1510,5 +1510,5 @@ sm 3 3 3 3 4 4 4 4 2 2 2 > par(op) > > cat("Time elapsed: ", proc.time() - .ptime, "\n") -Time elapsed: 1.516 0.04 1.561 0 0 +Time elapsed: 1.478 0.039 1.524 0 0 > diff --git a/source/tests/eval-etc.Rout.save b/source/tests/eval-etc.Rout.save index 422d0eae0..9fc60c568 100644 --- a/source/tests/eval-etc.Rout.save +++ b/source/tests/eval-etc.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/iec60559.Rout.save b/source/tests/iec60559.Rout.save index eb67c5b09..1591c4868 100644 --- a/source/tests/iec60559.Rout.save +++ b/source/tests/iec60559.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/internet.Rout.save b/source/tests/internet.Rout.save index 55321ee0b..570068342 100644 --- a/source/tests/internet.Rout.save +++ b/source/tests/internet.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -25,7 +25,7 @@ Type 'q()' to quit R. > ap <- available.packages(contrib.url("http://cran.r-project.org")) > ## IGNORE_RDIFF_BEGIN > nrow(ap) -[1] 11840 +[1] 12236 > ## IGNORE_RDIFF_END > > # test url connections on http diff --git a/source/tests/isas-tests.Rout.save b/source/tests/isas-tests.Rout.save index 57240747b..92f22e47e 100644 --- a/source/tests/isas-tests.Rout.save +++ b/source/tests/isas-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -2568,6 +2568,6 @@ In as.dist.default(x) : non-square matrix > f <- try(as.ts( x ), silent = TRUE) > if(!inherits(f, 'try-error')) report(identical(f, as.ts( f ))) > cat('Time elapsed: ', proc.time() - .proctime00,'\n') -Time elapsed: 0.223 0.015 0.239 0 0 +Time elapsed: 0.228 0.024 0.254 0 0 > > diff --git a/source/tests/lapack.Rout.save b/source/tests/lapack.Rout.save index f767c523b..ae06d36d7 100644 --- a/source/tests/lapack.Rout.save +++ b/source/tests/lapack.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/lm-tests.Rout.save b/source/tests/lm-tests.Rout.save index 4bb9f8763..4143f0b1e 100644 --- a/source/tests/lm-tests.Rout.save +++ b/source/tests/lm-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/method-dispatch.Rout.save b/source/tests/method-dispatch.Rout.save index 30959c015..d5f77d2f0 100644 --- a/source/tests/method-dispatch.Rout.save +++ b/source/tests/method-dispatch.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/ok-errors.Rout.save b/source/tests/ok-errors.Rout.save index d9dc2b5a0..2eb86da4a 100644 --- a/source/tests/ok-errors.Rout.save +++ b/source/tests/ok-errors.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/p-r-random-tests.Rout.save b/source/tests/p-r-random-tests.Rout.save index ae0331938..8698cedec 100644 --- a/source/tests/p-r-random-tests.Rout.save +++ b/source/tests/p-r-random-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -278,6 +278,6 @@ f(df1 = 10, df2 = 2, ncp = 3) PASSED > > > cat('Time elapsed: ', proc.time() - .proctime00,'\n') -Time elapsed: 1.526 0.006 1.536 0 0 +Time elapsed: 1.526 0.005 1.536 0 0 > > diff --git a/source/tests/print-tests.Rout.save b/source/tests/print-tests.Rout.save index 2d15be2ca..af9881be4 100644 --- a/source/tests/print-tests.Rout.save +++ b/source/tests/print-tests.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/reg-IO.Rout.save b/source/tests/reg-IO.Rout.save index f754f14de..20d60239b 100644 --- a/source/tests/reg-IO.Rout.save +++ b/source/tests/reg-IO.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/reg-IO2.Rout.save b/source/tests/reg-IO2.Rout.save index 634acf231..e0d02d68b 100644 --- a/source/tests/reg-IO2.Rout.save +++ b/source/tests/reg-IO2.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/reg-S4.Rout.save b/source/tests/reg-S4.Rout.save index 453e82f55..43521c77e 100644 --- a/source/tests/reg-S4.Rout.save +++ b/source/tests/reg-S4.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/reg-examples3.Rout.save b/source/tests/reg-examples3.Rout.save index 10779b2d4..7520e24e2 100644 --- a/source/tests/reg-examples3.Rout.save +++ b/source/tests/reg-examples3.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/reg-tests-1d.R b/source/tests/reg-tests-1d.R index 65e6db778..7490c268e 100644 --- a/source/tests/reg-tests-1d.R +++ b/source/tests/reg-tests-1d.R @@ -445,12 +445,6 @@ stopifnot( ## length 0 and seg.faulted in R <= 3.3.2 -## PR#17186 - Sys.timezone() on some Debian-derived platforms -(S.t <- Sys.timezone()) -if(is.na(S.t) || !nzchar(S.t)) stop("could not get timezone") -## has been NA_character_ in Ubuntu 14.04.5 LTS - - ## format()ing invalid hand-constructed POSIXlt objects d <- as.POSIXlt("2016-12-06"); d$zone <- 1 tools::assertError(format(d)) diff --git a/source/tests/reg-tests-2.Rout.save b/source/tests/reg-tests-2.Rout.save index 7efe5ebcf..4ed0faf75 100644 --- a/source/tests/reg-tests-2.Rout.save +++ b/source/tests/reg-tests-2.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. @@ -6371,7 +6371,7 @@ function(given = NULL) { if (is.null(given)) callObj$default <- TRUE callObj } - + > print(foo, useSource = FALSE) function (given = NULL) { @@ -6382,7 +6382,7 @@ function (given = NULL) callObj$default <- TRUE callObj } - + > attr(foo, "srcref") <- NULL > foo function (given = NULL) @@ -6394,7 +6394,7 @@ function (given = NULL) callObj$default <- TRUE callObj } - + > (f <- structure(function(){}, note = "just a note", + yada = function() "not the same")) function(){} @@ -6416,15 +6416,15 @@ function () > print.function function (x, ...) - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 19 1 63 19 63 1 1 - .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' + .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' > f function () - attr(*, "srcref")=Class 'srcref' atomic [1:8] 1 17 1 28 17 28 1 1 - .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' + .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' - attr(*, "note")= chr "just a note" - attr(*, "yada")=function () ..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 2 24 2 48 24 48 2 2 - .. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' + .. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' > rm(print.function) > ## auto-printing and printing differed up to R 2.9.x > diff --git a/source/tests/reg-tests-3.Rout.save b/source/tests/reg-tests-3.Rout.save index eebd48e33..7cee9fe53 100644 --- a/source/tests/reg-tests-3.Rout.save +++ b/source/tests/reg-tests-3.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. diff --git a/source/tests/simple-true.Rout.save b/source/tests/simple-true.Rout.save index 424b59fd0..25c29cddb 100644 --- a/source/tests/simple-true.Rout.save +++ b/source/tests/simple-true.Rout.save @@ -1,6 +1,6 @@ -R version 3.4.2 Patched (2017-11-17 r73741) -- "Short Summer" -Copyright (C) 2017 The R Foundation for Statistical Computing +R version 3.4.4 RC (2018-03-08 r74371) -- "Someone to Lean On" +Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY.