SE250:lab-9:rthu009

From Marks Wiki
Revision as of 05:20, 3 November 2008 by Mark (Sọ̀rọ̀ | contribs) (2 revision(s))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Okay.... after half and hour of lookn at the code i gt a bit of idea how to go further on task2

 Tree* Stmt( TokenStream* tokens )

    if( current( tokens ))
    advance( tokens );

    Tree* t1 = Exp( tokens, 0 );
    expect( tokens, TOK_THEN );

    Tree* t2 = Exp( tokens, 0 );

    expect( tokens, TOK_ELSE );
    Tree* t3 = Exp( tokens, 0 );
     
     
 
   return mkNode3(n,t1,t2,t3);
   
   
  }