Exemplo n.º 1
0
 static void HaltStatement()
 {
     Expect(halt_Sym);
     if (la.kind == lparen_Sym)
     {
         Get();
         ReadList();
         Expect(rparen_Sym);
     }
     ExpectWeak(semicolon_Sym, 6);
     CodeGen.LeaveProgram();
 }
Exemplo n.º 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);
 }
Exemplo n.º 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");
     }
 }
Exemplo n.º 4
0
 static void HaltStatement()
 {
     Expect(halt_Sym);
     CodeGen.LeaveProgram();
     ExpectWeak(semicolon_Sym, 6);
 }