Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stringLiteral parser of JavaTokenParsers does not accept escaped double quotes. #4138

Closed
scabug opened this issue Jan 8, 2011 · 5 comments
Closed
Assignees

Comments

@scabug
Copy link

scabug commented Jan 8, 2011

Should not stringLiteral parser be like this:

("\""+"""([^"\p{Cntrl}\\]|\\[\\/bfnrt"]|\\u[a-fA-F0-9]{4})*"""+"\"").r
@scabug
Copy link
Author

scabug commented Jan 8, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4138?orig=1
Reporter: Martins (martins)

@scabug
Copy link
Author

scabug commented Jan 31, 2011

@lindydonna said:
Lukas, can you verify the proposed change is correct?

@scabug
Copy link
Author

scabug commented Feb 1, 2011

@lindydonna said:
What is the difference here? What parses and doesn't parse? We need to a way to verify the proposed fix.

@scabug
Copy link
Author

scabug commented Jul 6, 2011

Eric Bowman (ebowman) said:
I ran into this trying to parse a string like:

"for all good "men" to come to the aid of their country"

I ended up overriding stringLiteral and doing exactly what the original report suggested; I concur, this is a bug, and the fix is quite safe.

@scabug scabug closed this as completed May 18, 2012
@scabug
Copy link
Author

scabug commented May 18, 2012

@lrytz said:
fixed in [https://github.com/scala/scala/commit/800bdf81228cf10e6c93ae39030f9edfae96c679]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants