Example #1
0
 static void HaltStatement()
 {
     Expect(halt_Sym);
     if (la.kind == lparen_Sym)
     {
         Get();
         ReadList();
         Expect(rparen_Sym);
     }
     ExpectWeak(semicolon_Sym, 6);
     CodeGen.LeaveProgram();
 }
Example #2
0
 static void HaltStatement()
 {
     Expect(halt_Sym);
     if (la.kind == lparen_Sym)
     {
         Get();
         Expect(stringLit_Sym);
         CodeGen.WriteString(token.val);
         Expect(rparen_Sym);
     }
     CodeGen.LeaveProgram();
     ExpectWeak(semicolon_Sym, 6);
 }
Example #3
0
 static void Parva()
 {
     CodeGen.FrameHeader();
     // no arguments
     CodeGen.Call(mainEntryPoint);
     // forward, incomplete
     CodeGen.LeaveProgram();
     while (la.kind == void_Sym)
     {
         FuncDeclaration();
     }
     Expect(EOF_SYM);
     if
     (!mainEntryPoint.IsDefined())
     {
         SemError("missing Main function");
     }
 }
Example #4
0
 static void HaltStatement()
 {
     Expect(halt_Sym);
     CodeGen.LeaveProgram();
     ExpectWeak(semicolon_Sym, 6);
 }