// BubFns BubFns = BubFn ZeroOrMoreBubFns / f ZeroOrMoreBubFns = SpaceAndBubFn ZeroOrMoreBubFns / () SpaceAndBubFn = Space BubFn / f // BubFn // BubFn = Sum Space Sum Space Sum Space OrOrExpr Space Sum BubFn = SumAndSpace BubFn1 / f BubFn1 = SumAndSpace BubFn2 / f BubFn2 = SumAndSpace BubFn3 / f BubFn3 = OrOrExprAndSpace BubFn4 / f BubFn4 = Sum () / f SumAndSpace = Sum Space / f OrOrExprAndSpace = OrOrExpr Space / f // OrOr Expr OrOrExpr = AndAndExpr OrOrExpr1 / AndAndExpr OrOrExpr1 = OrOr OrOrExpr / f OrOr = { Str("||") } () / f // AndAnd Expr AndAndExpr = ComparisonExpr AndAndExpr1 / ComparisonExpr AndAndExpr1 = AndAnd AndAndExpr / f AndAnd = { Str("&&") } () / f // Comparison Expr ComparisonExpr = Sum ComparisonExpr1 / f ComparisonExpr1 = Comparison Sum / f Comparison = EqEq () / Comparison1 Comparison1 = Ne () / Comparison2 Comparison2 = Ge () / Comparison3 Comparison3 = Le () / Comparison4 Comparison4 = Gt () / Comparison5 Comparison5 = Lt () / f EqEq = { Str("==") } () / f Ne = { Str("!=") } () / f Ge = { Str(">=") } () / f Le = { Str("<=") } () / f Gt = { Char('>') } () / f Lt = { Char('<') } () / f // Sum Sum = Term ZeroOrMorePlusOrMinusAndTerms / f ZeroOrMorePlusOrMinusAndTerms = PlusOrMinusAndTerm ZeroOrMorePlusOrMinusAndTerms / () PlusOrMinusAndTerm = PlusOrMinus Term / f // Term Term = Factor ZeroOrMoreStarOrSlashAndFactors / f ZeroOrMoreStarOrSlashAndFactors = StarOrSlashAndFactor ZeroOrMoreStarOrSlashAndFactors / () StarOrSlashAndFactor = StarOrSlash Factor / f // Factor Factor = PlusOrMinus Factor / Power // Power Power = Atom PowerAndFactor / Atom PowerAndFactor = { Char('^') } Factor / f // Atom Atom = ExprInParentheses () / Atom1 Atom1 = FloatLiteral () / Atom2 Atom2 = IntegerLiteral () / Atom3 Atom3 = Function () / Atom4 Atom4 = Variable () / Atom5 Atom5 = Constant () / f // Variable Variable = UppercaseX () / Variable1 Variable1 = UppercaseY () / Variable2 Variable2 = UppercaseZ () / Variable3 Variable3 = LowercaseX () / Variable4 Variable4 = LowercaseY () / Variable5 Variable5 = LowercaseZ () / Variable6 Variable6 = UppercaseN () / Variable7 Variable7 = LowercaseN () / Variable8 Variable8 = UppercaseF () / Variable9 Variable9 = UppercaseS () / f UppercaseX = { Char('X') } () / f UppercaseY = { Char('Y') } () / f UppercaseZ = { Char('Z') } () / f LowercaseX = { Char('x') } () / f LowercaseY = { Char('y') } () / f LowercaseZ = { Char('z') } () / f UppercaseN = { Char('N') } () / f LowercaseN = { Char('n') } () / f UppercaseF = { Char('F') } () / f UppercaseS = { Char('S') } () / f // Constant Constant = E () / Constant1 Constant1 = Pi () / f E = { Char('E') } () / f Pi = { Str("PI") } () / f // Function Function = Sine () / Function1 Function1 = Cosine () / Function2 Function2 = Tangent () / Function3 Function3 = Ln () / Function4 Function4 = Lg () / f Sine = { Str("sin") } Factor / f Cosine = { Str("cos") } Factor / f Tangent = { Str("tan") } Factor / f Ln = { Str("ln") } Factor / f Lg = { Str("lg") } Factor / f // Delimiters ExprInParentheses = { Char('(') } ExprAndClose / f ExprAndClose = Sum { Char(')') } / f // Integer IntegerLiteral = DecLiteral () / f // Float FloatLiteral = DecLiteral PointAndDecLiteral / BytesF64Literal PointAndDecLiteral = { Char('.') } DecLiteral / f BytesF64Literal = { Char('b') } ???????? / f // Dec DecLiteral = DecDigit ZeroOrMoreDecDigits / f ZeroOrMoreDecDigits = DecDigit ZeroOrMoreDecDigits / () DecDigit = { Char('0') } () / DecDigit1 DecDigit1 = { Char('1') } () / DecDigit2 DecDigit2 = { Char('2') } () / DecDigit3 DecDigit3 = { Char('3') } () / DecDigit4 DecDigit4 = { Char('4') } () / DecDigit5 DecDigit5 = { Char('5') } () / DecDigit6 DecDigit6 = { Char('6') } () / DecDigit7 DecDigit7 = { Char('7') } () / DecDigit8 DecDigit8 = { Char('8') } () / { Char('9') } // Others PlusOrMinus = Plus () / PlusOrMinus1 PlusOrMinus1 = Minus () / f Plus = { Char('+') } () / f Minus = { Char('-') } () / f StarOrSlash = Star () / StarOrSlash1 StarOrSlash1 = Slash () / f Star = { Char('*') } () / f Slash = { Char('/') } () / f Space = { Char(' ') } () / f