\[ \newcommand{\tr}{\Rightarrow} \newcommand{\trs}{\tr^{\!\ast}} \newcommand{\rlnm}[1]{\mathsf{(#1)}} \newcommand{\rred}[1]{\xrightarrow{#1}} \newcommand{\rreds}[1]{\mathrel{\xrightarrow{#1}\!\!^*}} \newcommand{\cl}{\mathsf{Cl}} \newcommand{\pow}{\mathcal{P}} \newcommand{\matches}{\mathrel{\mathsf{matches}}} \newcommand{\kw}[1]{\mathsf{#1}} \newcommand{\andop}{\mathrel{\&\!\&}} \newcommand{\orop}{\mathrel{\|}} \newcommand{\ff}{\mathsf{false}} \newcommand{\tt}{\mathsf{true}} \newcommand{\abra}[1]{\langle #1 \rangle} \newcommand{\bnfnt}[1]{\abra{\small \textsf{#1}}} \newcommand{\llbracket}{[\![} \newcommand{\rrbracket}{]\!]} \newcommand{\first}{\mathsf{First}} \newcommand{\nullable}{\mathsf{Nullable}} \newcommand{\follow}{\mathsf{Follow}} \newcommand{\tm}[1]{\mathsf{#1}} \]
\[\begin{align*} & \textit{exp}\\ &\to \textit{fexp}\\ &\to \lbrack\textit{fexp}\rbrack\ \textit{aexp}\\ &\to \textit{fexp}\ \textit{aexp}\\ &\to [\textit{fexp}]\ \textit{aexp}\ \textit{aexp}\\ &\to \textit{aexp}\ \textit{aexp}\\ &\to \textit{literal}\ \textit{aexp}\\ &\to \textit{integer}\ \textit{aexp}\\ &\to \textit{decimal}\ \textit{aexp}\\ &\to \textit{digit}\{\textit{digit}\}\ \textit{aexp}\\ &\to \textit{digit}\ \textit{aexp}\\ &\to \textit{ascDigit}\ \textit{aexp}\\ &\to 3\ \textit{aexp}\\ &\to 3\ \textit{gcon}\\ &\to 3\ ()\\ \end{align*}\]