\chapter{BNF Grammar of Selected Functions}

Here, I will present the full grammar of selected functions using the Backus-Naur Form
(BNF), a widely-used and systematic method of representing syntax (grammar) of computer 
languages. \\

\section{\mono{sprintf()}/\mono{printf()}}

\begin{lstlisting}[prebreak={},numbers=none,literate={:epsilon}{{$\varepsilon$}}{1}{:visiblespace}{\textvisiblespace}{1}]
<placeholder> ::= % <more_attr> <conv_type>
<conv_type> ::= % | c | s | d | u | o | x | X | e | E | f | g | G | b | p | n | :epsilon
<more_attr> ::= <param_idx> <flags> <vector> <min_width> <max_width> <size> <format_idx>
<param_idx> ::= <num> | :epsilon
<flags> ::= <flag_base> <flag_signprefix> <flag_padding> 
<flag_base> ::= # | :epsilon
<flag_signprefix> ::= [ :visiblespace | + ] | :epsilon
<flag_padding> ::= [ 0 | - ] | :epsilon
<min_width> ::= <num> | <arg> | :epsilon
<max_width> ::= . [ <num> | * ] | :epsilon
<arg> ::= * [ <num> $ | :epsilon ]
<size> ::= l | h | q | L | ll | :epsilon

\end{lstlisting}
%<max_width> ::= . [ <num> | <arg> ] | \textepsilon

