Displaying 2 results from an estimated 2 matches for "gregexec".
Did you mean:
regexec
2024 Jul 15
1
Minor inconsistencies in tools:::funAPI()
...) # macro call
| \(\w+\) # in parentheses
| \w+ # a plain name
)
# arguments: non-greedy match inside parentheses
\s* \( (.*?) \) \s* # using dotall here
# will include R_PRINTF_FORMAT(1,2 but we don't care
# finally terminated by semicolon
;
}"
regmatches(lines, gregexec(rx, lines, perl = TRUE))[[1]][3,]
}
# Preprocess then extract remapped function names like getFunsHdr
getdecl2 <- function(file)
file |>
readLines() |>
grep('^\\s*#\\s*error', x = _, value = TRUE, invert = TRUE) |>
tools:::ccE() |>
getdecl(lines = _)
--
Best regards,...
2024 Jul 29
1
Minor inconsistencies in tools:::funAPI()
...? I tried a few files in r-svn/src/include and one of
them gave me an error.
> getdecl("~/R/r-svn/src/include/R.h")
[1] "R_FlushConsole" "R_ProcessEvents" "R_WaitEvent"
> getdecl("~/R/r-svn/src/include/Rdefines.h")
Error in regmatches(lines, gregexec(rx, lines, perl = TRUE))[[1]][3, ] :
incorrect number of dimensions
On Mon, Jul 15, 2024 at 10:32?AM Ivan Krylov via R-devel
<r-devel at r-project.org> wrote:
>
> Hi all,
>
> I've noticed some peculiarities in the tools:::funAPI output that
> complicate its programmatic...