\documentclass[a4paper]{paper}
\usepackage[margin=2.5cm]{geometry}
\usepackage{enumitem}

\def\threedigits#1{%
\ifnum#1<100 0\fi
\ifnum#1<10 0\fi
\number#1}

\begin{document}
    \begin{center}
    \begin{tabular}{|lcl|}
        \hline
        \textit{program} & $\rightarrow$ & \texttt{hello} \texttt{|} \textit{statements}  \texttt{goodbye} \texttt{|} \\ \hline \hline
        \textit{statements} & $\rightarrow$ & \\ \hline
        \textit{statements} & $\rightarrow$ & \textit{statement} \texttt{|} \textit{statements} \\ \hline\hline
        \textit{statement} & $\rightarrow$ & \\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{maybe} \textit{statement}\\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{do} \textit{command}\\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{[} \textit{statements} \texttt{]}\\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{set} \textit{expression} \texttt{->} \textbf{id} \\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{define} \textbf{function} \texttt{<} \textbf{int} \texttt{>} \texttt{as} \textit{statement} \\ \hline
        \textit{statement} & $\rightarrow$ & \texttt{return} \textit{expression} \\ \hline\hline
        \textit{command} & $\rightarrow$ & \textit{statement} \texttt{if} \textit{expression} \\ \hline
        \textit{command} & $\rightarrow$ & \textit{statement} \texttt{because} \textit{expression} \\ \hline
        \textit{command} & $\rightarrow$ & \textit{statement} \texttt{until} \textit{expression} \\ \hline
        \textit{command} & $\rightarrow$ & \textbf{builtin} \texttt{<} \textit{expressions} \texttt{>} \\ \hline
        \textit{command} & $\rightarrow$ & \texttt{"} \textbf{function} \texttt{" <} \textit{expressions} \texttt{>} \\ \hline\hline
        \textit{expressions} & $\rightarrow$ & \\ \hline
        \textit{expressions} & $\rightarrow$ & \textit{expression} \texttt{;} \textit{expressions} \\ \hline\hline
        \textit{expression} & $\rightarrow$ & \textbf{string} \\ \hline
        \textit{expression} & $\rightarrow$ & \textbf{int} \\ \hline
        \textit{expression} & $\rightarrow$ & \textbf{float} \\ \hline
        \textit{expression} & $\rightarrow$ & \textbf{boolean} \\ \hline
        \textit{expression} & $\rightarrow$ & \texttt{\{} \textit{expressions} \texttt{\}} \\ \hline
        \textit{expression} & $\rightarrow$ & \textit{expression} \texttt{\{} \textit{expression} \texttt{\}} \\ \hline
        \textit{expression} & $\rightarrow$ & \texttt{(} \textit{expression} \texttt{)} \\ \hline
        \textit{expression} & $\rightarrow$ & \textit{expression} \textbf{binop} \textit{expression} \\ \hline
        \textit{expression} & $\rightarrow$ & \texttt{variable} \textbf{id}\\ \hline
        \textit{expression} & $\rightarrow$ & \textit{statement} \\ \hline
    \end{tabular}
    \end{center}

    \section{Errors}
    \begin{enumerate}[label={\textbf{E\protect\threedigits{\theenumi}:}}, leftmargin = *]
        \item No greeting
        \item No valediction
        \item Unexpected token
        \item Random compiler error
        \item Wrong number of arguments for builtin
    \end{enumerate}
    \begin{enumerate}[label={\textbf{C\protect\threedigits{\theenumi}:}}, leftmargin = *]
        \item Because assertion incorrect
    \end{enumerate}
\end{document}