Is it possible to have tikz
automatically determining the distance between two nodes based on a third node used to connect them?
For instance, in the following picture the arrow used to connect the nodes are too short. Can tikz
calculate its length automatically so that its label fits it better?
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}
\node [rectangle,draw] (a) {source program};
\node [rectangle,draw] (b) [right=of a] {token list};
\draw [->] (a.east) -- (b.west) node[above] {lexical analysis};
\end{tikzpicture}
\end{document}