Vollständige Syntaxbeschreibung
LOGIC ::= INPUT ASSIGNMENTS OUTPUT;
INPUT ::= ( 'Input' | 'Eingang' ) ( '=' | 'is' | 'are' | 'ist' | 'sind' ) LIST_OF_INPUTS '.';
LIST_OF_INPUTS ::= INPUT_NAME { ',' INPUT_NAME };
INPUT_NAME ::= [a-uA-U] [a-zA-Z0-9]*;
OUTPUT ::= ( 'Output' | 'Ausgang' ) ( '=' | 'is' | 'are' | 'ist' | 'sind' ) LIST_OF_OUTPUTS '.';
LIST_OF_OUTPUTS ::= { OUTPUT_NAME | ',' OUTPUT_NAME };
OUTPUT_NAME ::= [v-zV-Z] [a-zA-Z0-9]*;
ASSIGNMENTS ::= ASSIGNMENT { '.' ASSIGNMENT } '.';
ASSIGNMENT ::= OUTPUT_NAME ( '=' | 'is' | 'ist' ) ( ANY_CONDITION | VALUE );
VALUE ::= EXPRESSION [ CONDITION ];
ANY_CONDITION ::= ( 'any' | 'beliebig' ) CONDITION;
CONDITION ::= ( 'when' | 'wenn' ) EXPRESSION;
EXPRESSION ::= [ NOT ] TERM { ( 'and' | 'und' ) [ NOT ] TERM };
NOT ::= ( 'not' | 'nicht' | '^' ) ;
TERM ::= FACTOR { ( 'or' | 'oder' ) FACTOR };
FACTOR ::= [ NOT ] ( NAME | '(' EXPRESSION ')' );
NAME ::= OUTPUT_NAME | INPUT_NAME | FUNCTION_CALL |
'true' | 'false' | 'wahr' | 'falsch' | '1' | '0';
FUNCTION_CALL ::= FUNCTION_NAME '(' LIST_OF_EXPRESSIONS ')';
FUNCTION_NAME ::= 'NAND' | 'NOR' ;
LIST_OF_EXPRESSIONS ::= EXPRESSION { ',' EXPRESSION };