r-lib / xmlparsedata

R code parse data as an XML tree
https://r-lib.github.io/xmlparsedata/
Other
23 stars 6 forks source link

clarify octal escapes NEWS item #33

Closed MichaelChirico closed 11 months ago

MichaelChirico commented 1 year ago

r82185 was Apr 15, 2022, and R4.2.0 was Apr 22, 2022, I am guessing that the bug is still present in 4.2.0 but fixed for 4.2.1 (I don't have/know of an easy way to confirm this).

gaborcsardi commented 1 year ago

R 4.2.3 is still buggy:

root@5e8861f22f09:~# R-4.2.3 -q
> utils::getParseData(parse(text = '"\\01"'))
  line1 col1 line2 col2 id parent     token terminal  text
1     1    1     1    5  1      3 STR_CONST     TRUE "\\0"
3     1    1     1    5  3      0      expr    FALSE
>
root@5e8861f22f09:~# R-4.3.0 -q
> utils::getParseData(parse(text = '"\\01"'))
  line1 col1 line2 col2 id parent     token terminal   text
1     1    1     1    5  1      3 STR_CONST     TRUE "\\01"
3     1    1     1    5  3      0      expr    FALSE
>
MichaelChirico commented 1 year ago

Thanks for checking!

gaborcsardi commented 11 months ago

Thank you!