SHARE
TWEET

chess_moves.bnf

a guest Jul 13th, 2018 204 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. move ::= (<simpleMove> | <standardMove>) <suffix>
  2. <simpleMove> ::= (fromFile = <file>) (fromRank = <rank>) (toFile = <file>) (toRank = <rank>)
  3. <standardMove> ::= <normalMove> | <bishopMove> | <pawnMove> | <castle>
  4. <normalMove> ::= (piece = <nonBishopPiece>) ((fromFile = <file>) | (fromRank = <rank>))? "x"? (toFile = <file>) (toRank = <rank>)
  5. <bishopMove> ::= (((piece = "B") "x") | (piece = <bishopPiece>)) (fromFile = <file>)? (toFile = <file>) (toRank = <rank>)
  6. <pawnMove> ::= ((fromFile = <file>) "x")? (toFile = <file>) (toRank = <rank>)
  7. <castle> ::= (queensideCastle = "0-0-0") | (kingsideCastle = "0-0")
  8. <file> ::= /[a-hA-H]/
  9. <rank> ::= /[1-8]/
  10. <nonBishopPiece> ::= "p" | "P" | "r" | "R" | "n" | "N" | "q" | "Q" | "k" | "K"
  11. <bishopPiece> ::= "b" | "B"
  12. <suffix> ::= <promotion>? <check>
  13. <promotion> ::= "=" (promotedPiece = <promotablePiece>)
  14. <promotablePiece> ::= "r" | "R" | "n" | "N" | "b" | "B" | "q" | "Q"
  15. <check> ::= "+" | "++" | "#"
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top