\begin{frame}{Notational Conventions for Grammars}
\begin{goal}{Notational Conventions}
When defining grammars, we use the following conventions:
\begin{itemize}
\item \emph{upper case} letters for \emph{variables} (non-terminals)
\item \emph{lower case} letters for \emph{terminals}
\item $V \to w_1 \mid \ldots \mid w_n$ is \emph{shorthand for} $n$ rules
\begin{talign}
V &\to w_1\\[-1.5ex]
&\;\;\vdots\\[-1ex]
V &\to w_n
\end{talign}\vspace{-7mm}
\end{itemize}
Often, we only specify the production rules.
\end{goal}
\pause
\begin{exampleblock}{}
\vspace{-3mm}
\begin{talign}
G_1: \quad S &\to Ab & G_2:\quad S &\to aSb \\
A &\to aAb \mid \lambda & S &\to b
\end{talign}
\pause
What languages are generated by these grammars?
\begin{talign}
L(G_1) &= \mpause[1]{\{ a^nb^{n+1} \mid n \geq 0 \}} & \mpause[3]{=} &&
\mpause[2]{ L(G_2) &=} \mpause{\{ a^nb^{n+1} \mid n \geq 0 \}}
\end{talign}
\end{exampleblock}
\end{frame}