# BNF for PropositionalLogicParser.jj

## NON-TERMINALS

FileInputModeStart | ::= | ( StatementList <EOL> | Command ( ";" )? <EOL> | <EOL> )* <EOF>
Start | ::= | StatementList <EOL>
| | | Command ( ";" )? <EOL>
| | | <EOL>
| | | <EOF>
StatementList | ::= | Statement ( ";" Statement )* ( ";" )?
Statement | ::= | AssignmentExpressionList
| | | PropositionalExpression
| | | ";"
PropositionalExpression | ::= | Formula
Formula | ::= | AdditiveExpression
AdditiveExpression | ::= | MultiplicativeExpression ( ( <IMPLIES> AdditiveExpression | <IFF> AdditiveExpression ) )*
AssignmentExpressionList | ::= | AssignmentExpression ( <COMMA> AssignmentExpression )*
AssignmentExpression | ::= | ValueAssignmentExpression
| | | DescriptionAssignmentExpression
ValueAssignmentExpression | ::= | <IDENTIFIER> <VALUE_ASSIGN> Formula
DescriptionAssignmentExpression | ::= | <IDENTIFIER> <DESCRIPTION_ASSIGN> <STRING_LITERAL>
MultiplicativeExpression | ::= | UnaryExpression ( ( <AND> MultiplicativeExpression | <OR> MultiplicativeExpression ) )*
UnaryExpression | ::= | <NOT> UnaryExpression
| | | AtomicExpression
AtomicExpression | ::= | <NUMBER>
| | | <TRUE>
| | | <FALSE>
| | | Symbol
| | | "(" Formula ")"
Symbol | ::= | <IDENTIFIER>
Command | ::= | <EXIT>
| | | <ECHO_STRING>
| | | <SWITCH_TO_INTERACTIVE_MODE>
| | | <INPUT_FILE> <STRING_LITERAL>
| | | <TRANSLATE> Formula
| | | <LIST_COMMAND> Formula
| | | <SET_SYSTEM> <STRING_LITERAL>
| | | <CURRENT_SYSTEM>
| | | <SET_RELATION> <IDENTIFIER>
| | | <CREATE_RELATION> <IDENTIFIER> BinaryRelationalSet
| | | <SHOW_RELATION> <IDENTIFIER>
| | | OrderedPairExpression ( "," OrderedPairExpression )*
| | | <IMPLICIT_RELATION_REMOVE> OrderedPairExpression ( "," OrderedPairExpression )*
| | | <ADD_TO_RELATION> <IDENTIFIER> OrderedPairExpression ( "," OrderedPairExpression )*
| | | <REMOVE_FROM_RELATION> <IDENTIFIER> OrderedPairExpression ( "," OrderedPairExpression )*
| | | <SET_BORDERLINE> <NUMBER>
| | | <SATISFIABLE> Formula
| | | <VALID> Formula
| | | EntailmentExpression
BinaryRelationalSet | ::= | "{" ( OrderedPairExpression ( "," OrderedPairExpression )* )? "}"
OrderedPairExpression | ::= | "<" <IDENTIFIER> "," ( <NUMBER> | <IDENTIFIER> ) ">"
EntailmentExpression | ::= | "{" Formula ( "," Formula )* "}" <MODELS> Formula ( <EOF> )?