%!
%% Copyright (C) 1989, Digital Equipment Corporation
%% All rights reserved.
%% See the file COPYRIGHT for a full description.
%%
%%Title:         m3poster.txt
%%Creator:       Bill Kalsow
%%CreationDate:  Fri Oct 23 13:21:27 1987 by kalsow
%%EditDate:      Last modified on Fri Nov  3 16:32:18 1989 by muller
%%EditDate:           modified on Wed Oct 11 09:14:56 1989 by kalsow
%%
%%  a Modula-3 poster
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%  Select the 11x17 page size if possible

statusdict /11x17tray known
 {statusdict begin 11x17tray end}
 {11 17 div dup scale 0 0 moveto 792 0 lineto
  792 1224 lineto 0 1224 lineto closepath clip} ifelse

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% railroad primitives

/SCALE   7.4  def % sizing parameter
/XSHRINK 0.92 def % x fudge factor
/YSHRINK 0.95 def % y fudge factor
#include "railroad.h"

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

500 dict begin % local Modula-3 dictionary

#include "m3grammar.h"

/MaxY            10.5 inches def
/MinY            0.1 inches def
/MaxX            17  inches def

/StartColumn     { /LastY MaxY def } def
/ColumnOne       { /BaseX   0 def  StartColumn } def
/ColumnTwo       { /BaseX MaxX 0.20 mul def  StartColumn } def
/ColumnThree     { /BaseX MaxX 0.55 mul def StartColumn } def
/ColumnFour      { /BaseX MaxX 0.75 mul def StartColumn } def
/Landscape       { 270 rotate 16.75 neg inches 0 translate } def
/ResetGraphics   { Landscape SCALE 10 div setlinewidth } def
/ShowPage        { showpage ResetGraphics } def
/FlushPage       { ShowPage  ColumnOne } def
/CheckBottom     { LastY MinY lt { FlushPage } if } def

/DoIt {                 % rule indent
    CheckBottom         % rule indent
    5 SCALE mul mul     % rule 5*S*indent
    BaseX add           % rule 5*S*indent+Col
    LastY               % rule 5*S*indent+Col LastY
    3 -1 roll           %      5*S*indent+Col LastY rule
    DrawProduction      % height
    LastY sub neg       % LastY-height
    BOXHgt sub          % LastY-height-BOXHgt
    /LastY exch def     %
  } def % DoIt

/Place {                        %  prod x y
    SCALE mul YSHRINK mul exch  %  prod y*S x
    SCALE mul XSHRINK mul exch  %  prod x*S y*S
    3 -1 roll                   %       x*S y*S prod
    DrawProduction              %  height
    pop                         %
  } def % Place

/Grid {
    /gridStep exch SCALE mul def
    0 gridStep MaxY {
      newpath dup 0 exch moveto MaxX exch lineto stroke
    } for
    0 gridStep MaxX {
      newpath dup 0 moveto MaxY lineto stroke
    } for
  } def % Grid

ResetGraphics
%%% 10 Grid

 CompilationUnit        0 105 Place
 Interface             21 105 Place
 Module                 0 100 Place
 Import                 0  92 Place
 Block                 25  92 Place
 Declaration            0  83 Place
 ConstDeclaration      30  85 Place
 VariableDeclaration   58  92 Place
 ProcedureHeading      58  81 Place
 TypeDeclaration       30  75 Place
 ExceptionDeclaration  48  75 Place
 Revelation            66  75 Place
 Signature             30  68 Place
  formal                0  60 Place

 StatementSequence      0  42 Place
 AssignmentStatement   20  42 Place
 CallStatement         40  42 Place
 CaseStatement         21  35 Place
  case                 22  28 Place
 DecStatement          21   8 Place  
 ExitStatement         62  42 Place
 EvalStatement         72  42 Place
 ForStatement          21  20 Place
 IfStatement           21  15 Place
 IncStatement          52   8 Place
 LockStatement         90  42 Place
 LoopStatement         70  35 Place
% NewStatement          80   8 Place
 RaiseStatement       120  10 Place
 RepeatStatement       90  35 Place
 ReturnStatement       60  28 Place
 TryFinallyStatement   80  28 Place
 TryStatement         120  42 Place
  handler             125  35 Place
 TypeCaseStatement    110  27 Place
  tcase               145  20 Place
 WhileStatement        80  20 Place
 WithStatement        110  20 Place
 actual                90  11 Place

 Type                 110 105 Place
 ArrayType            125 105 Place
 SetType              150 105 Place
 ObjectType           125  98 Place
   Brand               90  92 Place
   methodList         125  88 Place
   method             140  93 Place
 ProcedureType        100  83 Place
 RecordType           150  85 Place
 RefType              116  79 Place
 PackedType           142  80 Place
 EnumerationType      153  74 Place
 SubrangeType         116  73 Place
 fields                85  88 Place
 field                 85  80 Place

 ConstExpression       75  67 Place
 Expression            86  67 Place
   e1                 101  67 Place
   e2                 117  67 Place
   e3                 129  67 Place
   e4                  83  59 Place
   e5                  88  50 Place
   e6                 110  59 Place
   e8                 143  59 Place
 Constructor           40  60 Place
    setCons            65  50 Place
    recordCons         45  50 Place
    arrayCons          65  60 Place

 TypeID                 0  48 Place
 ExceptionID           15  48 Place
 ProcedureID           30  48 Place

%
%  draw the title
%

/Times-Bold findfont
SCALE 9.5 mul scalefont
setfont
65 SCALE mul XSHRINK mul
99 SCALE mul YSHRINK mul moveto
(Modula-3) show

FlushPage

end % Modula-3 dictionary 

