Operand = Literal | OperandName | "(" Expression ")" | GoStmt
constLit = "true" | "false"
BasicLiteral = float | integer | stringLit | constLit | charLit
OperandName = identifier | EnvVariable | FnIdent
PrimaryExpr = Operand | FuncName Arguments | Expression "." FuncName Arguments | IfOp |
OptionalArgs = identifier ":" Expression { "," identifier ":" Expression }
Arguments = "(" [ ExpressionList ] [ OptionalArgs ] ")"
ExpressionList = Expression { "," Expression }
Expression = UnaryExpr | Expression binaryOp Expression | OperandName assignOp Expression
UnaryExpr = PrimaryExpr | unaryOp UnaryExpr | incOp OperandName | OperandName incOp |
binaryOp = "||" | "&&" | relOp | mathOp | assignOp | rangeOp
relOp = "==" | "!=" | "<" | "<=" | ">" | ">="
mathOp = "+" | "-" | "|" | "^" | "*" | "/" | "%" | "<<" | ">>" | "&" |
unaryOp = "-" | "!" | "^" | "*" | "#" | "##"
assignOp = "=" | "+=" | "-=" | "|=" | "^=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | "&=" | "#="
IfOp = "?" "(" Expression "," Expression "," Expression ")"