\documentclass[
convert,
outext=.png,
border=2bp,
tikz,
]{standalone}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text,Scale=MatchLowercase}
\setmainfont[BoldFont={Fira Sans}]{Fira Sans Light}
\setmonofont{Fira Mono}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning}
\usetikzlibrary{shapes.misc}
\usetikzlibrary{graphs}
\usepackage{color}
\begin{document}
\tikzset{
>=stealth', black!50, text=black, thick,
every new ->/.style = {thick, shorten <=0pt, shorten >=1pt, color=black!70},
every new --/.style = {thick, color=black!70},
graphs/every graph/.style = {edges=rounded corners},
skip loop/.style = {to path={-- ++(0,#1) -| (\tikztotarget)}},
hv path/.style = {to path={-| (\tikztotarget)}},
vh path/.style = {to path={|- (\tikztotarget)}},
nonterminal/.style={
rectangle, minimum size=6mm, very thick, draw=red!50!black!50,
top color=white, bottom color=red!50!black!20,
font=\itshape, text height=1.5ex,text depth=.25ex},
terminal/.style={
rounded rectangle, minimum size=6mm, very thick, draw=black!50,
top color=white, bottom color=black!20,
font=\ttfamily, text height=1.5ex, text depth=.25ex},
invisible/.style={
draw, circle, minimum size=0mm,
inner sep=0pt, outer sep=0pt},
shape = coordinate
}
\begin{tikzpicture}
\graph[
grow right sep,
branch down=7mm,
simple,
]{
/ --
p1 --
p2 ->
start_negative[as={-}, terminal] --
p3 --
p4 ->
start_digit[as={digit}, terminal] --
p5 --
p6 ->
hyphen[as={-}, terminal] --
p7 ->
end_negative[as={-}, terminal] --
p8 --
p9 ->
end_digit[as={digit}, terminal] --
p10 --
p11 --
p12 ->
"," [terminal] --
p13 -!-
p14 --
/ [coordinate];
p2 -- [skip loop=5mm] p3;
p6 -- [skip loop=9mm] p11;
p7 -- [skip loop=5mm] p8;
p12 -- [skip loop=5mm] p14;
p5 -> [skip loop=-5mm] p4;
p10 -> [skip loop=-5mm] p9;
p13 -> [skip loop=-9mm] p1;
};
\end{tikzpicture}
\end{document}