Author: Steffen Jakob
Date: 02:07:59 06/14/00
Go up one level in this thread
On June 14, 2000 at 04:57:10, Dann Corbit wrote: >On June 14, 2000 at 02:31:56, Oliver Roese wrote: > >>On June 13, 2000 at 17:17:36, Dann Corbit wrote: >> >>>... the chess programmer's life a whole lot easier. >>> >>>Write a formal BNF grammar for: >>> >>>1. PGN (with the EPD and FEN subsets, darn it!) This one should probably hold >>>off until PGN II comes out in the near future. >>> >> >>The original specification of Edwards contains already a grammar, written in >>BNF. Scroll down up to the very end of the document and there you have it! > >If you mean this: > >18: Formal syntax > ><PGN-database> ::= <PGN-game> <PGN-database> > <empty> > ><PGN-game> ::= <tag-section> <movetext-section> > ><tag-section> ::= <tag-pair> <tag-section> > <empty> > ><tag-pair> ::= [ <tag-name> <tag-value> ] > ><tag-name> ::= <identifier> > ><tag-value> ::= <string> > ><movetext-section> ::= <element-sequence> <game-termination> > ><element-sequence> ::= <element> <element-sequence> > <recursive-variation> <element-sequence> > <empty> > ><element> ::= <move-number-indication> > <SAN-move> > <numeric-annotation-glyph> > ><recursive-variation> ::= ( <element-sequence> ) > ><game-termination> ::= 1-0 > 0-1 > 1/2-1/2 > * ><empty> ::= > >It's about 1% of what is actually needed. No, it's much more! For Hossa I have implemented a PGN parser with lex&yacc. It was very easy to do with the help of the grammar included in the PGN standard which Oliver mentioned above. Greetings, Steffen.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.