reference icon indicating copy to clipboard operation
reference copied to clipboard

Contradictory definition of 'STRING_LITERAL'

Open EvgenHi opened this issue 3 years ago • 2 comments

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?

EvgenHi avatar Aug 16 '22 20:08 EvgenHi

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.

bjorn3 avatar Aug 16 '22 20:08 bjorn3

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 avatar Aug 16 '22 21:08 EvgenHi