[erlang-questions] config based rules grammar

Nav orionqwest@REDACTED
Thu Feb 17 14:34:58 CET 2011

Thanks a lot Jesper and Robert. Your inputs certainly helped to set a

Though my initial thought were to develop abstract grammar in config
(which should be just text for easy maintainability)

[R1, R2, R3, .....]

where each rule R = [C, A]

where some possibilities

C = Conditions for applying rule

 = {Field10=5 AND/OR Field11=20 AND Field12= "Now"-10 min...}    %%
Check values for rule eligibility

A = Actions if C is true
    [A1, A3, ...] or just [A2, A3,...]

A1 = Forward this packet
A2 = Log this packet
A3 = Send ACK for this packet
.... (This is hard part to think of some really basic actions on which
complex actions could be built upon)

So in end config file would look like
[R1=[C1, [A1, A3]], R2=[C2, [A2, A3]],....]

Though its just upto us to set level of abstraction :) What I was
looking if Erlang already has some similar rule building package,
though just Eralng as language itself is so powerful with pattern
matching & recursions, that its easier to implement my own ideas.

More information about the erlang-questions mailing list