Exemple #1
0
 /// <summary>
 /// Called when a <see cref="ForBlock"/> block is read.
 /// Verifies the structure of the For loop and calls the corresponding functions that
 /// handle the code generation for the loop.
 /// Called by <see cref="INSTRUCTION"/>.
 /// </summary>
 void FOR()
 {
     Expect(28);         // "for"
     Expect(10);         // '('
     SUPER_EXP();
     Expect(12);         // ')'
     try { QuadrupleManager.ForAfterCondition(); }
     catch (Exception e) { SemErr(e.Message); }
     Expect(29);        // "loops"
     Expect(7);         // '{'
     while (StartOf(1))
     {
         INSTRUCTION();
     }
     Expect(8);         // '}'
     QuadrupleManager.ForEnd();
 }