Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Statement> := ' '* (<Control> | <Operation | <Assignment>) ' '* ';'
- <Control> := 'if(' <CompoundBooleanOperation> ')' '\n'* '{' '\n'* <Statement>* '\n'* '}' ('\n'* 'else' '\n'* '{' <Statement>* '\n'* '}')? | 'while(' <BooleanOp> ')' '\n'* '{' '\n'* <Statement>* '\n'* '}'
- <Operation> := <String> '(' ((<MathOperation> | <RealNumber> | <Variable>) (',' (<MathOperation> | <RealNumber> | <Variable>))*)? ')'
- <Assignment> := <Variable> ' '* '=' ' '* (<MathOperation> | <RealNumber>)
- <MathOperation> := <Variable> ' '* <BinaryMathOp> ' '* <Variable> | <Variable> ' '* <BinaryMathOp> ' '* <RealNumber> | <Variable> ' '* <BinaryMathOp> ' '* <MathOperation> | <Variable> ' '* <BinaryMathOp> ' '* <ParenthesisMathOp> | <RealNumber> ' '* <BinaryMathOp> ' '* <Variable> | <RealNumber> ' '* <BinaryMathOp> ' '* <RealNumber> | <RealNumber> ' '* <BinaryMathOp> ' '* <MathOperation> | <RealNumber> ' '* <BinaryMathOp> ' '* <ParenthesisMathOp> | <MathOperation> ' '* <BinaryMathOp> ' '* <Variable> | <MathOperation> ' '* <BinaryMathOp> ' '* <RealNumber> | <MathOperation> ' '* <BinaryMathOp> ' '* <MathOperation> | <MathOperation> ' '* <BinaryMathOp> ' '* <ParenthesisMathOp> | <ParenthesisMathOp> ' '* <BinaryMathOp> ' '* <Variable> | <ParenthesisMathOp> ' '* <BinaryMathOp> ' '* <RealNumber> | <ParenthesisMathOp> ' '* <BinaryMathOp> ' '* <MathOperation> | <ParenthesisMathOp> ' '* <BinaryMathOp> ' '* <ParenthesisMathOp>
- <ParenthesisMathOp> := '(' (<MathOperation> | <Variable> | <RealNumber>) ')'
- <Variable> := <String>
- <CompoundBooleanOperation> := <BooleanOperation> | <UnaryLogicalOp> '(' <BooleanOperation> ')' | <CompoundBooleanOperation> <BinaryLogicalOp> <CompoundBooleanOperation>
- <BinaryLogicalOp> := '&&' | '||' '^'
- <UnaryLogicalOp> := '!'
- <BooleanOperation> := <Variable> <BooleanOp> <Variable> | <Variable> <BooleanOp> <RealNumber> | <Variable> <BooleanOp> <MathOperation> | <RealNumber> <BooleanOp> <Variable> | <RealNumber> <BooleanOp> <RealNumber> | <RealNumber> <BooleanOp> <MathOperation> | <MathOperation> <BooleanOp> <Variable> | <MathOperation> <BooleanOp> <RealNumber> | <MathOperation> <BooleanOp> <MathOperation>
- <BooleanOp> := '==' | '!=' | '<' | '>' | '>=' | '<='
- <RealNumber> := <DigitList> | <DigitList> '.' <DigitList> | '-' <DigitList> | '-' <DigitList> '.' <DigitList>
- <DigitList> := <Digit> | <Digit> <DigitList>
- <Digit> := '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9'
- <String> := <Character> | <Character> <String>
- <Character> := 'a' | 'b' | 'c' | 'd' | 'e' | 'f' | 'g' | 'h' | 'i' | 'j' | 'k' | 'l' | 'm' | 'n' | 'o' | 'p' 'q' | 'r' | 's' | 't' | 'u' | 'v' | 'w' | 'x' | 'y' | 'z' | 'A' | 'B' | 'C' | 'D' | 'E' 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z'
- <BinaryMathOp> := '+' | '-' | '*' | '/'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement