\section{Syntax}
\label{sec:syntax}

The RTSP syntax is described in an augmented Backus-Naur form (BNF) as
used in RFC 2068 \cite{rfc2068}. 

\subsection{Base Syntax}

\begin{syntax}
OCTET          &=& $<$any 8-bit sequence of data$>$\\
CHAR           &=& $<$any US-ASCII character (octets 0 - 127)$>$\\
UPALPHA        &=& $<$any US-ASCII uppercase letter "A".."Z"$>$\\
LOALPHA        &=& $<$any US-ASCII lowercase letter "a".."z"$>$\\
ALPHA          &=& UPALPHA $|$ LOALPHA\\
DIGIT          &=& $<$any US-ASCII digit "0".."9"$>$\\
CTL            &=& $<$any US-ASCII control character\\
               & &  (octets 0 - 31) and DEL (127)$>$\\
CR             &=& $<$US-ASCII CR, carriage return (13)$>$\\
LF             &=& $<$US-ASCII LF, linefeed (10)$>$\\
SP             &=& $<$US-ASCII SP, space (32)$>$\\
HT             &=& $<$US-ASCII HT, horizontal-tab (9)$>$\\
$<$"$>$        &=& $<$US-ASCII double-quote mark (34)$>$\\
CRLF           &=& CR LF\\
LWS            &=& [CRLF] 1*( SP $|$ HT )\\
TEXT           &=& $<$any OCTET except CTLs$>$\\
tspecials      &=& "(" $|$ ")" $|$ "$<$" $|$ "$>$" $|$ "@"\\
               &$|$& "," $|$ ";" $|$ ":" $|$ "\verb|\|" $|$ $<$"$>$\\
               &$|$& "/" $|$ "[" $|$ "]" $|$ "?" $|$ "="\\
               &$|$& "\{" $|$ "\}" $|$ SP $|$ HT\\
token          &=& 1*$<$any CHAR except CTLs or tspecials$>$\\
quoted-string  &=& ( $<$"$>$ *(qdtext) $<$"$>$ )\\
qdtext         &=& $<$any TEXT except $<$"$>$$>$\\
quoted-pair    &=& "\verb|\|" CHAR\\
\\
message-header &=& field-name ":" [ field-value ] CRLF\\
field-name     &=& token\\
field-value    &=& *( field-content $|$ LWS )\\
field-content  &=& $<$the OCTETs making up the field-value and\\
               &&consisting\\
               &&of either *TEXT or combinations of token, tspecials,\\
               &&and quoted-string$>$\\
\\
safe           &=& "\$" $|$ "-" $|$ "\_" $|$ "." $|$ "+"\\
extra          &=& "!" $|$ "*" $|$ "$'$" $|$ "(" $|$ ")" $|$ ","\\
\\
hex            &=& DIGIT $|$ "A" $|$ "B" $|$ "C" $|$ "D" $|$ "E" $|$ "F" $|$\\
               && "a" $|$ "b" $|$ "c" $|$ "d" $|$ "e" $|$ "f"\\
escape         &=& "\%" hex hex\\
reserved       &=& ";" $|$ "/" $|$ "?" $|$ ":" $|$ "@" $|$ "\&" $|$ "="\\
\\
unreserved     &=& alpha $|$ digit $|$ safe $|$ extra\\
xchar          &=& unreserved $|$ reserved $|$ escape\\
\end{syntax}



