0

I am trying to do something like this :

/* 
 * comment block
 */
Sequence seq001 is {
   /*
    * comment block
    */
   Phase phase001 is {
       /*
        * comment block
        */
       Step step001 :
           /*
            *
            */     
           Rule rule01 is {

               key1 <= "value1",
               key2 is {
                   key21 <= "value21",
                   key22 <= "value22"
                   ...
                   key2n <= "value2n"
               },
               key3 <= "value3",
               key4 is {
                   key41 <= "value41",
                   key42 <= "value42"
                   ...
                   key4n <= "value4n"
               },
               ...
           }

          Step step002 :
            
             Rule rulexx is {
                 ....
             }
   },
   Phase phase002 is {
      ...
   },
   ...
}

The error output states:

Attack_sequence 1 is { Attack_Phase 1 is { Attack_step 1: Rule 1 is { proto <= "test",src is { port <= "80",address <= "34.56.67.5"}}}}

error: syntax error

I know that the problem is the grammar expression. With what BNF grammar could the above code work?

Community
  • 1
  • 1
  • Don't use screenshots for showing error message, copy-paste them to here. – peterh Jul 15 '17 at 22:08
  • 1
    I typed it into your question with my bare hand. See, how generous I was to you now. Furthermore, I edited out the "do the grammar for me, I won't work" flavor from your question, now it has a non-zero chance to survive. But next time I won't be with you, and your question will be closed :-) – peterh Jul 15 '17 at 22:12
  • Ok. Finally, I solve the problem myself. It was very simple. Thanks. – user0003 Jul 17 '17 at 15:42

0 Answers0