% vim: nospell:
\section{Grammar}
\label{sec:grammar}

\setlength{\grammarparsep}{4pt}
\setlength{\grammarindent}{10em}
\begin{grammar}
	<Fuspel> ::= <Statement-list>

	<Statement-list> ::= <Rerwite> `;' <Rewrite-list>
		\alt <Comment> <Statement-list>
		\alt <empty>

	<Comment> ::= `//' \dots `\textbackslash n'

	<Rewrite> ::= <Name> <Arg-list> `=' <Rhs>

	<Arg-list> ::= <Arg> ` ' <Arg-list> | <empty>

	<Arg> ::= [`!'] <Simple-expr>

	<Simple-expr> ::= <Int>
		\alt <Name>
		\alt <Simple-list>
		\alt <Simple-tuple>

	<Simple-list> ::= `[' <Simple-expr> `:' <Simple-list> `]'
		\alt `[]'
	
	<Simple-tuple> ::= `(' <Simple-expr> `,' <Simple-expr> `)'

	<Rhs> ::= <Expr>

	<Expr> ::= <Int>
		\alt <Name>
		\alt <List>
		\alt <Tuple>
		\alt <Expr> <Expr>
		\alt `code' <Name>
		\alt `(' <Expr> `)'

	<List> ::= `[' <Expr> `:' <List> `]'
		\alt `[]'
	
	<Tuple> ::= `(' <Expr> `,' <Expr> `)'
\end{grammar}
