Bug 15621 - Parsing/deparsing for ``-delimited names does not escape "`"
Parsing/deparsing for ``-delimited names does not escape "`"
Status: CLOSED FIXED
Product: R
Classification: Unclassified
Component: Language
R 3.0.2
All All
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-30 07:45 UTC by Peter Meilstrup
Modified: 2014-01-01 21:29 UTC (History)
1 user (show)

See Also:


Attachments

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.