// <bool_term>       ::= <bool_not_factor> [<and_op> <bool_not_factor]*
void Term(CPU *cpu, Files file){
    NotFactor(cpu, file);
    while(Peek("&&", file)){
        Match("&&", file);
        NotFactor(cpu, file);
        cpu->PopValue();
        cpu->BooleanAnd();
    }
}
void BoolTerm() {
  NotFactor();
  while (Look == '&') {
    EmitLn("push rax");
    Match('&');
    NotFactor();
    EmitLn("and rax, [rsp]");
    EmitLn("add rsp, 8");
  }
}
Beispiel #3
0
void BoolTerm(void)
{
	NotFactor();
	while (Token[0]=='&') {
		Push();
		MatchString("&");
		NotFactor();
		PopAnd();
	}
}
Beispiel #4
0
/* Parse and Translate a Boolean Term 
 * <bool_term> ::= <not_factor> ( and_op <not_factor )*
 * */
void BoolTerm()
{
    NotFactor();
    while(Token == '&') {
        Push();
        Next();
        NotFactor();
        PopAnd();
    }
}
Beispiel #5
0
void BoolTerm()
{
    NotFactor();
    while(Look == '&') {
        EmitLn("pushl %eax");
        Match('&');
        NotFactor();
        EmitLn("and (%esp), %eax");
        EmitLn("addl $4, %esp");
    }
}
void BoolTerm() {
  NotFactor();
  NewLine();
  while(Look == '&') {
    Push();
    Match('&');
    NotFactor();
    PopAnd();
    NewLine();
  }
}