================
One line comment
================

//Comment comment Comment comment Comment comment
rule _r1_ {
    condition: 
        true
}

---

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


==========================
Multiple one line comments
==========================

//Comment comment Comment comment Comment comment
rule _r1_ { //Comment comment Comment comment Comment comment
    //Comment comment Comment comment Comment comment
    condition: 
        true //Comment comment Comment comment Comment comment
    //Comment comment Comment comment Comment comment
} //Comment comment Comment comment Comment comment
//Comment comment Comment comment Comment comment

---

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


==================
Multi line comment
==================

/* /
   \
*/
rule _r1_ { 
    condition: true 
} 

---

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


==============================
Multiple multiline comments #1
==============================

/* 
   
*/
rule /* */_r1_/* Comment */ {/*

*/
 /* */ condition: /* */ 
    true /**/ 
} 

---

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


==============================
Multiple multiline comments #2
==============================

/* 
   
*/
rule /* */_r1_/* Comment */ {/*

*/
    meta: /*
        */KEY/*  */=/*  */"value"
 /* */ condition: /* */ 
    true /**/ 
} 

---

(yara_file
    (comment)
    (rule
        (rule_head
            (comment)
            (identifier)
        )
        (comment)
        (rule_body
            (comment)
            (comment)
            (meta_list
                (meta
                    (identifier)
                    (comment)
                    (comment)
                    (string_literal
                        (string_literal_str)
                    )
                )
            )
            (comment)
            (comment)
            (bool_literal)
            (comment)
        )
    )
)


==============================
Multiple multiline comments #3
==============================

rule ___r3 {
    strings/*******/:
        $str = /**/"abc" /*
       *//*
    */condition/*******/:
        true
} 

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (comment)
            (strings_list
                (string
                    (string_identifier)
                    (comment)
                    (string_literal
                        (string_literal_str)
                    )
                )
            )
            (comment)
            (comment)
            (comment)
            (bool_literal)
        )
    )
)


=======================================
Multiline comment inside string literal
=======================================

rule ___r3 {
    strings:
        $str = /*123   */"1234/* */56789" /*123


        */
        $str2 = /*áíé
        
        */ /abc/i 
    condition:
        true
} 

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (strings_list
                (string
                    (string_identifier)
                    (comment)
                    (string_literal
                        (string_literal_str)
                    )
                )
                (comment)
                (string
                    (string_identifier)
                    (comment)
                    (regexp
                        (regexp_body
                            (regexp_cat
                                (regexp_cat
                                    (regexp_char)
                                    (regexp_char)
                                )
                                (regexp_char)
                            )
                        )
                        (regexp_flags)
                    )
                )
            )
            (bool_literal)
        )
    )
)


=====================================
One line comment inside string literal
=====================================

rule ___r3 {
    strings:
        $str = "1234//56789"
    condition:
        true
} 

---

(yara_file
    (rule
        (rule_head
            (identifier)
        )
        (rule_body
            (strings_list
                (string
                    (string_identifier)
                    (string_literal
                        (string_literal_str)
                    )
                )
            )
            (bool_literal)
        )
    )
)

