=====================
Boolean expression #1
=====================

rule rule123 {
    condition:
        true and true
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (and
                (bool_literal)
                (bool_literal)
            )
        )
    )
)


=====================
Boolean expression #2
=====================

rule rule123 {
    condition:
        true or true and false
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (or
                (bool_literal)
                (and
                    (bool_literal)
                    (bool_literal)
                )
            )
        )
    )
)


=====================
Boolean expression #3
=====================

rule rule123 {
    condition:
        true or true or false and true and true
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (or
                (or
                    (bool_literal)
                    (bool_literal)
                )
                (and
                    (and
                        (bool_literal)
                        (bool_literal)
                    )
                    (bool_literal)
                )
            )
        )
    )
)


===========================
Boolean expression #4 (rel)
===========================

rule rule123 {
    condition:
        #123 > 123 and @abc < @d
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (and
                (greater_than
                    (string_count)
                    (uint_literal
                        (dec_uint_literal_value)
                    )
                )
                (less_than
                    (string_offset)
                    (string_offset)
                )
            )
        )
    )
)


===========================
Boolean expression #5 (rel)
===========================

rule rule123 {
    condition:
        #123 >= 123 or @abc <= @d
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (or
                (greater_than_or_equal
                    (string_count)
                    (uint_literal
                        (dec_uint_literal_value)
                    )
                )
                (less_than_or_equal
                    (string_offset)
                    (string_offset)
                )
            )
        )
    )
)


===========================
Boolean expression #6 (not)
===========================

rule rule123 {
    condition:
        not #123 >= 123 
}

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (not
                (greater_than_or_equal
                    (string_count)
                    (uint_literal
                        (dec_uint_literal_value)
                    )
                )
            )
        )
    )
)

