Skip to content
Guillaume Camera edited this page Feb 18, 2016 · 12 revisions

Welcome to the django-formidable wiki!

Grammar Validations

validation : orBool | ifStatement ;
ifStatement : 'if(' orBool ',' validation ( ',' validation )? ')' ;
orBool : andBool ( 'or(' andBool ')' )* ;
andBool : identity ( 'and(' identity )* ')' ;
identity : NOT `(` orBool `)` | comparison ;
comparison : compareFunc '(' orBool ',' orBool ')' | boolFunc '(' orBoolList ')' | BOOLEAN;
compareFunc: 'EQ' | 'GT' | 'GTE' | 'LT' | 'LTE';
boolFunc : ## Dynamically generated ;
orBoolList : orBool(',' orBool) ? ;
function : ID '(' orBoolList ')' | value ;
value : STRING | INTEGER | DATE | BOOLEAN | field ;
field : 'field(' ID ')';
Clone this wiki locally