ebnf-prologue

ebnf-prologue is a variable defined in `ebnf2ps.el'.
Its value is

"\n% === begin EBNF engine\n\n% --- Basic Definitions\n\n/fS F\n/SpaceS FontHeight 0.5 mul def\n/HeightS FontHeight FontHeight add def\n\n/fE F\n/SpaceE FontHeight 0.5 mul def\n/HeightE FontHeight FontHeight add def\n\n/fR F\n/SpaceR FontHeight 0.5 mul def\n/HeightR FontHeight FontHeight add def\n\n/fT F\n/SpaceT FontHeight 0.5 mul def\n/HeightT FontHeight FontHeight add def\n\n/fNT F\n/SpaceNT FontHeight 0.5 mul def\n/HeightNT FontHeight FontHeight add def\n\n/T HeightT HeightNT add 0.5 mul def\n/hT T 0.5 mul def\n/hT2 hT 0.5 mul ArrowScale mul def\n/hT4 hT 0.25 mul ArrowScale mul def\n\n/Er 0.1 def % Error factor\n\n\n/c{currentpoint}bind def\n/xyi{/xi c /yi exch def def}bind def\n/xyo{/xo c /yo exch def def}bind def\n/xyp{/xp c /yp exch def def}bind def\n/xyt{/xt c /yt exch def def}bind def\n\n% vertical movement: x y height vm\n/vm{add moveto}bind def\n\n% horizontal movement: x y width hm\n/hm{3 -1 roll exch add exch moveto}bind def\n\n% set color: [R G B] SetRGB\n/SetRGB{aload pop setrgbcolor}bind def\n\n% filling gray area: gray-scale FillGray\n/FillGray{gsave setgray fill grestore}bind def\n\n% filling color area: [R G B] FillRGB\n/FillRGB{gsave SetRGB fill grestore}bind def\n\n/Stroke{LineWidth setlinewidth LineColor SetRGB stroke}bind def\n/StrokeShape{borderwidth setlinewidth bordercolor SetRGB stroke}bind def\n/Gstroke{gsave Stroke grestore}bind def\n\n% Empty Line: width EL\n/EL{0 rlineto Gstroke}bind def\n\n% --- Arrows\n\n/Down{hT2 neg hT4 neg rlineto}bind def\n\n/Arrow\n{hT2 neg hT4 rmoveto\n hT2 hT4 neg rlineto\n Down\n}bind def\n\n/ArrowPath{c newpath moveto Arrow closepath}bind def\n\n/UpPath\n{c newpath moveto\n hT2 neg 0 rmoveto\n 0 hT4 rlineto\n hT2 hT4 neg rlineto\n closepath\n}bind def\n\n/DownPath\n{c newpath moveto\n hT2 neg 0 rmoveto\n 0 hT4 neg rlineto\n hT2 hT4 rlineto\n closepath\n}bind def\n\n%>Right Arrow: RA\n% \\\n% *---+\n% /\n/RA-vector\n[{} % 0 - none\n {hT2 neg hT4 rlineto} % 1 - semi-up\n {Down} % 2 - semi-down\n {Arrow} % 3 - simple\n {Gstroke ArrowPath} % 4 - transparent\n {Gstroke ArrowPath 1 FillGray} % 5 - hollow\n {Gstroke ArrowPath LineColor FillRGB} % 6 - full\n {Gstroke UpPath 1 FillGray} % 7 - semi-up-hollow\n {Gstroke UpPath LineColor FillRGB} % 8 - semi-up-full\n {Gstroke DownPath 1 FillGray} % 9 - semi-down-hollow\n {Gstroke DownPath LineColor FillRGB} % 10 - semi-down-full\n {Gstroke gsave UserArrow grestore} % 11 - user\n]def\n\n/RA\n{hT 0 rlineto\n c\n RA-vector ArrowShape get exec\n Gstroke\n moveto\n ExtraWidth 0 rmoveto\n}def\n\n% rotation DrawArrow\n/DrawArrow\n{gsave\n 0 0 translate\n rotate\n RA\n c\n grestore\n rmoveto\n}def\n\n%>Left Arrow: LA\n% /\n% +---*\n% \\\n/LA{180 DrawArrow}def\n\n%>Up Arrow: UA\n% +\n% /|\\\n% |\n% *\n/UA{90 DrawArrow}def\n\n%>Down Arrow: DA\n% *\n% |\n% \\|/\n% +\n/DA{270 DrawArrow}def\n\n% --- Corners\n\n%>corner Right Descendant: height arrow corner_RD\n% _ | arrow\n% / height > 0 | 0 - none\n% | | 1 - right\n% * ---------- | 2 - left\n% | | 3 - vertical\n% \\ height < 0 |\n% - |\n/cRD0-vector\n[% 0 - none\n {0 h rlineto\n hT 0 rlineto}\n % 1 - right\n {0 h rlineto\n RA}\n % 2 - left\n {hT 0 rmoveto xyi\n LA\n 0 h neg rlineto\n xi yi moveto}\n % 3 - vertical\n {hT h rmoveto xyi\n hT neg 0 rlineto\n h 0 gt{DA}{UA}ifelse\n xi yi moveto}\n]def\n\n/cRD-vector\n[{cRD0-vector arrow get exec} % 0 - miter\n {0 0 0 h hT h rcurveto} % 1 - rounded\n {hT h rlineto} % 2 - bevel\n]def\n\n/corner_RD\n{/arrow exch def /h exch def\n cRD-vector ChartShape get exec\n Gstroke\n}def\n\n%>corner Right Ascendant: height arrow corner_RA\n% | arrow\n% | height > 0 | 0 - none\n% / | 1 - right\n% *- ---------- | 2 - left\n% \\ | 3 - vertical\n% | height < 0 |\n% |\n/cRA0-vector\n[% 0 - none\n {hT 0 rlineto\n 0 h rlineto}\n % 1 - right\n {RA\n 0 h rlineto}\n % 2 - left\n {hT h rmoveto xyi\n 0 h neg rlineto\n LA\n xi yi moveto}\n % 3 - vertical\n {hT h rmoveto xyi\n h 0 gt{DA}{UA}ifelse\n hT neg 0 rlineto\n xi yi moveto}\n]def\n\n/cRA-vector\n[{cRA0-vector arrow get exec} % 0 - miter\n {0 0 hT 0 hT h rcurveto} % 1 - rounded\n {hT h rlineto} % 2 - bevel\n]def\n\n/corner_RA\n{/arrow exch def /h exch def\n cRA-vector ChartShape get exec\n Gstroke\n}def\n\n%>corner Left Descendant: height arrow corner_LD\n% _ | arrow\n% \\ height > 0 | 0 - none\n% | | 1 - right\n% * ---------- | 2 - left\n% | | 3 - vertical\n% / height < 0 |\n% - |\n/cLD0-vector\n[% 0 - none\n {0 h rlineto\n hT neg 0 rlineto}\n % 1 - right\n {hT neg h rmoveto xyi\n RA\n 0 h neg rlineto\n xi yi moveto}\n % 2 - left\n {0 h rlineto\n LA}\n % 3 - vertical\n {hT neg h rmoveto xyi\n hT 0 rlineto\n h 0 gt{DA}{UA}ifelse\n xi yi moveto}\n]def\n\n/cLD-vector\n[{cLD0-vector arrow get exec} % 0 - miter\n {0 0 0 h hT neg h rcurveto} % 1 - rounded\n {hT neg h rlineto} % 2 - bevel\n]def\n\n/corner_LD\n{/arrow exch def /h exch def\n cLD-vector ChartShape get exec\n Gstroke\n}def\n\n%>corner Left Ascendant: height arrow corner_LA\n% | arrow\n% | height > 0 | 0 - none\n% \\ | 1 - right\n% -* ---------- | 2 - left\n% / | 3 - vertical\n% | height < 0 |\n% |\n/cLA0-vector\n[% 0 - none\n {hT neg 0 rlineto\n 0 h rlineto}\n % 1 - right\n {hT neg h rmoveto xyi\n 0 h neg rlineto\n RA\n xi yi moveto}\n % 2 - left\n {LA\n 0 h rlineto}\n % 3 - vertical\n {hT neg h rmoveto xyi\n h 0 gt{DA}{UA}ifelse\n hT 0 rlineto\n xi yi moveto}\n]def\n\n/cLA-vector\n[{cLA0-vector arrow get exec} % 0 - miter\n {0 0 hT neg 0 hT neg h rcurveto} % 1 - rounded\n {hT neg h rlineto} % 2 - bevel\n]def\n\n/corner_LA\n{/arrow exch def /h exch def\n cLA-vector ChartShape get exec\n Gstroke\n}def\n\n% --- Flow Stuff\n\n% height prepare-height |- line_height corner_height corner_height\n/prepare-height\n{dup 0 gt\n {T sub hT}\n {T add hT neg}ifelse\n dup\n}def\n\n%>Left Alternative: height LAlt\n% _\n% /\n% | height > 0\n% |\n% /\n% *- ----------\n% \\\n% |\n% | height < 0\n% \\\n% -\n/LAlt\n{dup 0 eq\n {T exch rlineto}\n {dup abs T lt\n {0.5 mul dup\n 1 corner_RA\n 0 corner_RD}\n {prepare-height\n 1 corner_RA\n exch 0 exch rlineto\n 0 corner_RD\n }ifelse\n }ifelse\n}def\n\n%>Left Loop: height LLoop\n% _\n% /\n% | height > 0\n% |\n% \\\n% -* ----------\n% /\n% |\n% | height < 0\n% \\\n% -\n/LLoop\n{prepare-height\n 3 corner_LA\n exch 0 exch rlineto\n 0 corner_RD\n}def\n\n%>Right Alternative: height RAlt\n% _\n% \\\n% | height > 0\n% |\n% \\\n% -* ----------\n% /\n% |\n% | height < 0\n% /\n% -\n/RAlt\n{dup 0 eq\n {T neg exch rlineto}\n {dup abs T lt\n {0.5 mul dup\n 1 corner_LA\n 0 corner_LD}\n {prepare-height\n 1 corner_LA\n exch 0 exch rlineto\n 0 corner_LD\n }ifelse\n }ifelse\n}def\n\n%>Right Loop: height RLoop\n% _\n% \\\n% | height > 0\n% |\n% /\n% *- ----------\n% \\\n% |\n% | height < 0\n% /\n% -\n/RLoop\n{prepare-height\n 1 corner_RA\n exch 0 exch rlineto\n 0 corner_LD\n}def\n\n% --- Terminal, Non-terminal and Special Basics\n\n% string width prepare-width |- string\n/prepare-width\n{/width exch def\n dup stringwidth pop space add space add width exch sub ExtraWidth sub 0.5 mul\n /w exch def\n}def\n\n% string width begin-right\n/begin-right\n{xyo\n prepare-width\n w hT sub EL\n RA\n}def\n\n% end-right\n/end-right\n{xo width add Er add yo moveto\n w Er add neg EL\n xo yo moveto\n}def\n\n% string width begin-left\n/begin-left\n{xyo\n prepare-width\n w EL\n}def\n\n% end-left\n/end-left\n{xo width add Er add yo moveto\n hT w sub Er add EL\n LA\n xo yo moveto\n}def\n\n/ShapePath-vector\n[% 0 - miter\n {xx yy moveto\n xx YY lineto\n XX YY lineto\n XX yy lineto}\n % 1 - rounded\n {/half YY yy sub 0.5 mul abs def\n xx half add YY moveto\n 0 0 half neg 0 half neg half neg rcurveto\n 0 0 0 half neg half half neg rcurveto\n XX xx sub abs half sub half sub 0 rlineto\n 0 0 half 0 half half rcurveto\n 0 0 0 half half neg half rcurveto}\n % 2 - bevel\n {/quarter YY yy sub 0.25 mul abs def\n xx quarter add YY moveto\n quarter neg quarter neg rlineto\n 0 quarter quarter add neg rlineto\n quarter quarter neg rlineto\n XX xx sub abs quarter sub quarter sub 0 rlineto\n quarter quarter rlineto\n 0 quarter quarter add rlineto\n quarter neg quarter rlineto}\n]def\n\n/doShapePath\n{newpath\n ShapePath-vector shape get exec\n closepath\n}def\n\n/doShapeShadow\n{gsave\n Xshadow Xshadow add Xshadow add\n Yshadow Yshadow add Yshadow add translate\n doShapePath\n 0.9 FillGray\n grestore\n}def\n\n/doShape\n{gsave\n doShapePath\n shapecolor FillRGB\n StrokeShape\n grestore\n}def\n\n% string SBound |- string\n/SBound\n{/xx c dup /yy exch def\n FontHeight add /YY exch def def\n dup stringwidth pop xx add /XX exch def\n Effect 8 and 0 ne\n {/yy yy YShadow add def\n /XX XX XShadow add def\n }if\n}def\n\n% string SBox\n/SBox\n{gsave\n c space sub moveto\n SBound\n /XX XX space add space add def\n /YY YY space add def\n /yy yy space sub def\n shadow{doShapeShadow}if\n doShape\n space Descent abs rmoveto\n foreground SetRGB S\n grestore\n}def\n\n% --- Terminal\n\n% TeRminal: string TR\n/TR\n{/Effect EffectT def\n /shape ShapeT def\n /shapecolor BackgroundT def\n /borderwidth BorderWidthT def\n /bordercolor BorderColorT def\n /foreground ForegroundT def\n /shadow ShadowT def\n SBox\n}def\n\n%>Right Terminal: string width RT |- x y\n/RT\n{xyt\n /fT F\n /space SpaceT def\n begin-right\n TR\n end-right\n xt yt\n}def\n\n%>Left Terminal: string width LT |- x y\n/LT\n{xyt\n /fT F\n /space SpaceT def\n begin-left\n TR\n end-left\n xt yt\n}def\n\n%>Right Terminal Default: string width RTD |- x y\n/RTD\n{/-save- BorderWidthT def\n /BorderWidthT BorderWidthT DefaultWidth add def\n RT\n /BorderWidthT -save- def\n}def\n\n%>Left Terminal Default: string width LTD |- x y\n/LTD\n{/-save- BorderWidthT def\n /BorderWidthT BorderWidthT DefaultWidth add def\n LT\n /BorderWidthT -save- def\n}def\n\n% --- Non-Terminal\n\n% Non-Terminal: string NT\n/NT\n{/Effect EffectNT def\n /shape ShapeNT def\n /shapecolor BackgroundNT def\n /borderwidth BorderWidthNT def\n /bordercolor BorderColorNT def\n /foreground ForegroundNT def\n /shadow ShadowNT def\n SBox\n}def\n\n%>Right Non-Terminal: string width RNT |- x y\n/RNT\n{xyt\n /fNT F\n /space SpaceNT def\n begin-right\n NT\n end-right\n xt yt\n}def\n\n%>Left Non-Terminal: string width LNT |- x y\n/LNT\n{xyt\n /fNT F\n /space SpaceNT def\n begin-left\n NT\n end-left\n xt yt\n}def\n\n%>Right Non-Terminal Default: string width RNTD |- x y\n/RNTD\n{/-save- BorderWidthNT def\n /BorderWidthNT BorderWidthNT DefaultWidth add def\n RNT\n /BorderWidthNT -save- def\n}def\n\n%>Left Non-Terminal Default: string width LNTD |- x y\n/LNTD\n{/-save- BorderWidthNT def\n /BorderWidthNT BorderWidthNT DefaultWidth add def\n LNT\n /BorderWidthNT -save- def\n}def\n\n% --- Special\n\n% SPecial: string SP\n/SP\n{/Effect EffectS def\n /shape ShapeS def\n /shapecolor BackgroundS def\n /borderwidth BorderWidthS def\n /bordercolor BorderColorS def\n /foreground ForegroundS def\n /shadow ShadowS def\n SBox\n}def\n\n%>Right SPecial: string width RSP |- x y\n/RSP\n{xyt\n /fS F\n /space SpaceS def\n begin-right\n SP\n end-right\n xt yt\n}def\n\n%>Left SPecial: string width LSP |- x y\n/LSP\n{xyt\n /fS F\n /space SpaceS def\n begin-left\n SP\n end-left\n xt yt\n}def\n\n%>Right SPecial Default: string width RSPD |- x y\n/RSPD\n{/-save- BorderWidthS def\n /BorderWidthS BorderWidthS DefaultWidth add def\n RSP\n /BorderWidthS -save- def\n}def\n\n%>Left SPecial Default: string width LSPD |- x y\n/LSPD\n{/-save- BorderWidthS def\n /BorderWidthS BorderWidthS DefaultWidth add def\n LSP\n /BorderWidthS -save- def\n}def\n\n% --- Repeat and Except basics\n\n/begin-direction\n{/w width rwidth sub 0.5 mul def\n width 0 rmoveto}def\n\n/end-direction\n{gsave\n /xx c entry add /YY exch def def\n /yy YY height sub def\n /XX xx rwidth add def\n shadow{doShapeShadow}if\n doShape\n grestore\n}def\n\n/right-direction\n{begin-direction\n w neg EL\n xt yt moveto\n w hT sub EL RA\n end-direction\n}def\n\n/left-direction\n{begin-direction\n hT w sub EL LA\n xt yt moveto\n w EL\n end-direction\n}def\n\n% --- Repeat\n\n% entry height width rwidth begin-repeat\n/begin-repeat\n{/rwidth exch def\n /width exch def\n /height exch def\n /entry exch def\n /fR F\n /space SpaceR def\n /Effect EffectR def\n /shape ShapeR def\n /shapecolor BackgroundR def\n /borderwidth BorderWidthR def\n /bordercolor BorderColorR def\n /foreground ForegroundR def\n /shadow ShadowR def\n xyt\n}def\n\n% string end-repeat |- x y\n/end-repeat\n{gsave\n space Descent rmoveto\n foreground SetRGB S\n c Descent sub\n grestore\n exch space add exch moveto\n xt yt\n}def\n\n%>Right RePeat: string entry height width rwidth RRP |- x y\n/RRP{begin-repeat right-direction end-repeat}def\n\n%>Left RePeat: string entry height width rwidth LRP |- x y\n/LRP{begin-repeat left-direction end-repeat}def\n\n% --- Except\n\n% entry height width rwidth begin-except\n/begin-except\n{/rwidth exch def\n /width exch def\n /height exch def\n /entry exch def\n /fE F\n /space SpaceE def\n /Effect EffectE def\n /shape ShapeE def\n /shapecolor BackgroundE def\n /borderwidth BorderWidthE def\n /bordercolor BorderColorE def\n /foreground ForegroundE def\n /shadow ShadowE def\n xyt\n}def\n\n% x-width end-except |- x y\n/end-except\n{gsave\n space space add add Descent rmoveto\n (-) foreground SetRGB S\n grestore\n space 0 rmoveto\n xt yt\n}def\n\n%>Right EXcept: x-width entry height width rwidth REX |- x y\n/REX{begin-except right-direction end-except}def\n\n%>Left EXcept: x-width entry height width rwidth LEX |- x y\n/LEX{begin-except left-direction end-except}def\n\n% --- Sequence\n\n%>Beginning Of Sequence: BOS |- x y\n/BOS{currentpoint}bind def\n\n%>End Of Sequence: x y x1 y1 EOS |- x y\n/EOS{pop pop}bind def\n\n% --- Production\n\n%>Beginning Of Production: string width height BOP |- y x\n/BOP\n{xyp\n neg yp add /yw exch def\n xp add T sub /xw exch def\n dup length 0 gt % empty string ==> no production name\n {/Effect EffectP def\n /fP F ForegroundP SetRGB BackgroundP aload pop true BG S\n /Effect 0 def\n ( :) S false BG}{pop}ifelse\n xw yw moveto\n hT EL RA\n xp yw moveto\n T EL\n yp xp\n}def\n\n%>End Of Production: y x delta EOP\n/EOPH{add exch moveto}bind def % horizontal\n/EOPV{exch pop sub 0 exch moveto}bind def % vertical\n\n% --- Empty Alternative\n\n%>Empty Alternative: width EA |- x y\n/EA\n{gsave\n Er add 0 rlineto\n Stroke\n grestore\n c\n}def\n\n% --- Alternative\n\n%>AlTernative: h1 h2 ... hn n width AT |- x y\n/AT\n{xyo xo add /xw exch def\n xw yo moveto\n Er EL\n {xw yo moveto\n dup RAlt\n xo yo moveto\n LAlt}repeat\n xo yo\n}def\n\n% --- Optional\n\n%>OPtional: height width OP |- x y\n/OP\n{xyo\n T sub /ow exch def\n ow Er sub 0 rmoveto\n T Er add EL\n neg dup RAlt\n ow T sub neg EL\n xo yo moveto\n LAlt\n xo yo moveto\n T EL\n xo yo\n}def\n\n% --- List Flow\n\n%>One or More: height width OM |- x y\n/OM\n{xyo\n /ow exch def\n ow Er add 0 rmoveto\n T Er add neg EL\n dup RLoop\n xo T add yo moveto\n LLoop\n xo yo moveto\n T EL\n xo yo\n}def\n\n%>Zero or More: h2 h1 width ZM |- x y\n/ZM\n{xyo\n Er add EL\n Er neg 0 rmoveto\n dup RAlt\n exch dup RLoop\n xo yo moveto\n exch dup LAlt\n exch LLoop\n yo add xo T add exch moveto\n xo yo\n}def\n\n% === end EBNF engine\n\n"

  • This variable may be risky if used as a file-local variable.

Documentation:
EBNF PostScript prologue