Index: modcargo-crates/sieve-rs-0.2.1/src/compiler/grammar/tests/test_execute.rs
--- modcargo-crates/sieve-rs-0.2.1/src/compiler/grammar/tests/test_execute.rs.orig
+++ modcargo-crates/sieve-rs-0.2.1/src/compiler/grammar/tests/test_execute.rs
@@ -25,13 +25,17 @@ use serde::{Deserialize, Serialize};
 
 use crate::compiler::grammar::instruction::{CompilerState, Instruction};
 use crate::compiler::lexer::string::StringItem;
+use crate::compiler::lexer::Token;
 use crate::compiler::CompileError;
+use crate::CommandType;
 
 use crate::compiler::grammar::test::Test;
+use crate::compiler::lexer::word::Word;
 
 #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
 pub(crate) struct Execute {
     pub command: StringItem,
+    pub command_type: CommandType,
     pub arguments: Vec<StringItem>,
     pub is_not: bool,
 }
@@ -43,21 +47,28 @@ pub(crate) struct Error {
 
 impl<'x> CompilerState<'x> {
     pub(crate) fn parse_execute(&mut self) -> Result<(), CompileError> {
-        let command = Execute {
-            command: self.parse_string()?,
-            arguments: self.parse_strings()?,
-            is_not: false,
-        };
-        self.instructions.push(Instruction::Execute(command));
-
+        let instruction = Instruction::Execute(self.parse_execute_()?);
+        self.instructions.push(instruction);
         Ok(())
     }
 
     pub(crate) fn parse_test_execute(&mut self) -> Result<Test, CompileError> {
-        Ok(Test::Execute(Execute {
+        Ok(Test::Execute(self.parse_execute_()?))
+    }
+
+    fn parse_execute_(&mut self) -> Result<Execute, CompileError> {
+        let token_info = self.tokens.unwrap_next()?;
+        Ok(Execute {
+            command_type: match token_info.token {
+                Token::Tag(Word::Binary) => CommandType::Binary,
+                Token::Tag(Word::Query) => CommandType::Query,
+                _ => {
+                    return Err(token_info.expected("':binary' or ':query'"));
+                }
+            },
             command: self.parse_string()?,
             arguments: self.parse_strings()?,
             is_not: false,
-        }))
+        })
     }
 }
