Pascal

              

- 6


procedure Add;

begin

   Match('+');

   Term;

   PopAdd;

end;

{-------------------------------------------------------------}

{ Recognize and Translate a Subtract }

procedure Subtract;

begin

   Match('-');

   Term;

   PopSub;

end;

{---------------------------------------------------------------}

{ Parse and Translate an Expression }

procedure Expression;

begin

   FirstTerm;

   while IsAddop(Look) do begin

      Push;

      case Look of

       '+': Add;

       '-': Subtract;

      end;

   end;

end;

{--------------------------------------------------------------}

{ Parse and Translate an Assignment Statement }

procedure Assignment;

var Name: char;

begin

   Name := GetName;

   Match('=');

   Expression;

   Store(Name);

end;

{--------------------------------------------------------------}

, , . , , . !