ag_gen/docs/exploit-pattern-grammar.txt
2021-09-23 13:55:29 -05:00

56 lines
1.9 KiB
Plaintext
Executable File

<exploit-pattern> ::= <exploit-list>
<exploit-list> ::= <exploit-list> <exploit>
| <exploit>
<exploit> ::= "exploit" <identifier> , ( <parameter-list> ) = <options> <precondition-list> <postcondition-list> .
<parameter-list> ::= <parameters>
| <EOL>
<parameters> ::= <identifier> , <parameters>
| <identifier>
<preconditions> ::= preconditions : <preconditions-list>
<preconditions-list> ::= <preconditions-list> <precondition>
| <precondition>
<precondition> ::= <f>
<postconditions> ::= postconditions : <postconditions-list>
<postconditions-list> ::= <postconditions-list> <postcondition>
| <postcondition>
<postcondition> ::= <operation> <f>
<operation> ::= insert
| delete
| update
<f> ::= quality : <identifier> , <statement> ;
| topology : <identifier> <direction> <identifier> , <statement> ;
<statement> ::= <identifier> <operator> <value>
<identifier> ::= [A-Za-z][A-Za-z0-9_]*
<value> ::= <string>
| <number>
<string> ::= [A-Za-z0-9_]*
<number> ::= -?[1-9][0-9]*
<operator> ::= <eqlop>
| <addop>
| <relop>
| <-
<eqlop> ::= =
| :=
<relop> ::= <
| >
| <=
| >=
<addop> ::= +=
| -=
<direction> ::= ->
| <-
| <->
<whitespace> ::= [\t\n ]