Compiler/lexical analyzer: Difference between revisions

Content added Content deleted
(Add a new test case)
m (/ in strings)
Line 131: Line 131:


* For char and string literals, the <code>\n</code> escape sequence is supported to represent a new-line character.
* For char and string literals, the <code>\n</code> escape sequence is supported to represent a new-line character.
* For char literals, to represent a backslash, use <code>\\</code>.
* For char and string literals, to represent a backslash, use <code>\\</code>.
* No other special sequences are supported. This means that:
* No other special sequences are supported. This means that:
** Char literals cannot represent a single quote character (value 39).
** Char literals cannot represent a single quote character (value 39).