I would like to write out some data dictionaries for a program design document in LaTeX, and I am looking for an efficient way to do this.
I want to write snippets that look like:
Name = FirstName + (Initial) + LastName
FirstName = 1{Character}32
Initial = Character
LastName = 1{Character}
Character = [ A-Z | a-z | 0-9 | ' | - ]
It's important that these are lined up at the = signs - they look ugly without it.
I could write this as the MWE:
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{align*}
\text{Name} &= \text{FirstName + (Initial) + LastName} \\
\text{FirstName} &= \text{1\{Character\}32} \\
\text{Initial} &= \text{Character} \\
\text{LastName} &= \text{1\{Character\}} \\
\text{Character} &= \text{[ A -- Z $|$ a -- z $|$ 0 -- 9 $|$ ' $|$ -- ]} \\
\end{align*}
\end{document}
but this feels pretty clunky with all of the \text{} commands. Is there a simpler method?

verbatimenvironment do? Try placing that first snippet you show between\begin{verbatim}and\end{verbatim}. – Torbjørn T. Jun 13 '15 at 18:05