Predicate grammar

We define a Predicate grammar that describes how Predicates can be combined to form more elaborate Predicates.
  			predicate -> orPredicate
  			orPredicate -> andPredicate or
				               orPredicate
  			orPredicate -> andPredicate
  			andPredicate -> simplePredicate and 
				                andPredicate
  			andPredicate -> simplePredicate
  			simplePredicate -> ( orPredicate )
  			simplePredicate -> notPredicate
  			notPredicate -> not simplePredicate				
  		

Note

Terminals are displayed like so: terminal

Note

Note that this context-free grammar defines a precedence on rules. In the preceeding grammar, and has a higher precedence than or.

Using this grammar, it is possible to define fairly complex combinations of Predicates that can describe complex pre-conditions. This set of Predicates is evaluated to a single Predicate according to the grammar rules.