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

Contradictory definition of 'STRING_LITERAL' #1252

Closed
EvgenHi opened this issue Aug 16, 2022 · 2 comments · Fixed by #1459
Closed

Contradictory definition of 'STRING_LITERAL' #1252

EvgenHi opened this issue Aug 16, 2022 · 2 comments · Fixed by #1459
Labels
A-grammar Area: Syntax and parsing Easy We believe this would not be difficult to actually fix

Comments

@EvgenHi
Copy link

EvgenHi commented Aug 16, 2022

STRING_LITERAL definition says:
Screenshot from 2022-08-16 22-34-51
Where IsolatedCR is:
Screenshot from 2022-08-16 22-43-45
And ASCII_ESCAPE is:
Screenshot from 2022-08-16 22-50-17

But look, there is no compile time error:
Screenshot from 2022-08-16 23-16-45

My question:
Is this a human error or some feature of the lexer implementation which I don't know about?

@bjorn3
Copy link
Member

bjorn3 commented Aug 16, 2022

The ASCII_ESCAPE \r and IsolatedCR are not the same. The former is literally writing the two characters \ and r while the later is the single character called cariage return.

@EvgenHi EvgenHi closed this as completed Aug 16, 2022
@EvgenHi
Copy link
Author

EvgenHi commented Aug 16, 2022

Understood thanks. But still there is an inconsistency. If IsolatedCR is a single character, it should be mentioned, because, refereing to this:
Screenshot from 2022-08-17 00-14-15
and the IsolatedCR definition:
Screenshot from 2022-08-16 22-43-45
I deduce that IsolatedCR is exactly two characters.

@EvgenHi EvgenHi reopened this Aug 16, 2022
@ehuss ehuss added Easy We believe this would not be difficult to actually fix A-grammar Area: Syntax and parsing labels Aug 16, 2022
@mattheww mattheww mentioned this issue Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-grammar Area: Syntax and parsing Easy We believe this would not be difficult to actually fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants