do not decode escape characters in string literals
This commit is contained in:
parent
27c65b0998
commit
2dd7ff8560
@ -132,13 +132,6 @@ __extension__ return EXTENSION;
|
||||
|
||||
L?'[^\\]' return CHAR_CONST;
|
||||
L?'\\.' return CHAR_CONST;
|
||||
L?'\\a' (void)'\a'; return CHAR_CONST;
|
||||
L?'\\b' (void)'\b'; return CHAR_CONST;
|
||||
L?'\\f' (void)'\f'; return CHAR_CONST;
|
||||
L?'\\n' (void)'\n'; return CHAR_CONST;
|
||||
L?'\\r' (void)'\r'; return CHAR_CONST;
|
||||
L?'\\t' (void)'\t'; return CHAR_CONST;
|
||||
L?'\\v' (void)'\v'; return CHAR_CONST;
|
||||
L?'\\x[0-9A-Fa-f]{2}' return CHAR_CONST;
|
||||
L?'\\[0-7]{1,3}' return CHAR_CONST;
|
||||
[0-9]+[uU]?[lL]?[lL]? return INT_CONST;
|
||||
@ -173,15 +166,7 @@ L?\" {
|
||||
(void)sscanf(yytext + 1, "%o", &val);
|
||||
*build_string += (char)val;
|
||||
}
|
||||
\\a *build_string += '\a';
|
||||
\\b *build_string += '\b';
|
||||
\\f *build_string += '\f';
|
||||
\\n *build_string += '\n';
|
||||
\\r *build_string += '\r';
|
||||
\\t *build_string += '\t';
|
||||
\\v *build_string += '\v';
|
||||
\\. *build_string += (char)yytext[1];
|
||||
[^\\\"]+ *build_string += yytext;
|
||||
[^"]+ *build_string += yytext;
|
||||
}
|
||||
|
||||
[a-zA-Z_][a-zA-Z_0-9]* {
|
||||
|
Loading…
x
Reference in New Issue
Block a user