Bug 15621 - Parsing/deparsing for ``-delimited names does not escape "`"
Summary: Parsing/deparsing for ``-delimited names does not escape "`"
Alias: None
Product: R
Classification: Unclassified
Component: Language (show other bugs)
Version: R 3.0.2
Hardware: All All
: P5 minor
Assignee: R-core
Depends on:
Reported: 2013-12-30 07:45 UTC by Peter Meilstrup
Modified: 2014-01-01 21:29 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter Meilstrup 2013-12-30 07:45:20 UTC
Names containing "`" are allowed, but the parser and deparser do not handle this case:

> as.name("`")
> assign("`", TRUE)
> ```
Error: attempt to use zero-length variable name
> `\``
Error: '\`' is an unrecognized escape in character string starting "`\`"
> get("`")
[1] TRUE
Comment 1 Duncan Murdoch 2014-01-01 21:29:42 UTC
The parser is behaving as documented, but it seems reasonable to add \` as an allowable escape, and use it in printing.  I'll put this change into R-devel and R-patched.