Parse escape sequences in strings

This commit is contained in:
2026-05-31 01:41:39 +02:00
parent 7401038971
commit 9634ad51a2
4 changed files with 253 additions and 166 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
<hex-character> = `\\x' <hex-digit> \{<hex-digit>\}.
<escaped-character> = `\\' \\
(`n' | `a' | `b' | `t' | `f' | `r' | `v' | `\\' | `\textquotesingle' | `\textquotedbl' | `0').
(`n' | `t' | `f' | `r' | `v' | `\\' | `\textquotesingle' | `\textquotedbl' | `0').
<printable-character> = \enspace? a printable ASCII character\space?.
+1 -5
View File
@@ -84,7 +84,7 @@ called the \textit{the length} of the string.
\begin{grammar}
<escaped-character> = `\\' \\
(`n' | `a' | `b' | `t' | `f' | `r' | `v' | `\\' | `\textquotesingle' | `\textquotedbl' | `0').
(`n' | `t' | `f' | `r' | `v' | `\\' | `\textquotesingle' | `\textquotedbl' | `0').
<hex-character> = `\\x' <hex-digit> \{<hex-digit>\}.
@@ -106,10 +106,6 @@ beginning with a backslash (\textbackslash).
\toprule
\verb|\n| & Newline \\
\midrule
\verb|\a| & Bell \\
\midrule
\verb|\b| & Backspace \\
\midrule
\verb|\t| & Horizontal tab \\
\midrule
\verb|\f| & Form feed \\