% file: o2_Toverview.mp % enumeration and the 4 T classes input boxes u:=1cc; pair sep,fldsep; sep := (0,3u); fldsep := (2u,0); beginfig(1); boxit.tclass(btex Terminal vocabulary etex); % enumeration boxit.enum(btex enumeration etex); % enumeration boxit.lr(btex lrk meta-terminal constants etex); % lrk boxit.rc(btex raw characters etex); % raw characters boxit.err(btex errors etex); % error tokens boxit.t(btex terminals etex); % basic terminal tokens % place the boxes enum.e + fldsep = lr.w; lr.e + fldsep = rc.w; rc.e + fldsep = t.w; t.e + fldsep = err.w; ypart enum.n = ypart lr.n = ypart rc.n = ypart t.n = ypart err.n; drawboxed(enum); drawboxed(lr); drawboxed(rc); drawboxed(t); drawboxed(err); .5[tclass.e,tclass.w] - sep = .5[enum.e,err.w]; drawboxed(tclass); numeric a; a := ypart tclass.c - ypart .5sep; draw tclass.s -- (xpart tclass.s, a); draw (xpart enum.n,a) -- (xpart err.n,a); % horozontal line drawarrow (xpart enum.n,a) -- enum.n; drawarrow (xpart lr.n,a) -- lr.n; drawarrow (xpart rc.n,a) -- rc.n; drawarrow (xpart t.n,a) -- t.n; drawarrow (xpart err.n,a) -- err.n; endfig; end;