xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XBoard-devel] Move Parser


From: h.g. muller
Subject: Re: [XBoard-devel] Move Parser
Date: Tue, 01 Mar 2011 19:14:17 +0100


If this is something we want to get into master, I think we should move
it in there rather sooner than later, so that people can test it...  I
guess this is also something where a test-suite could be useful, but I
have never done that before.

Well, 'master' is not the same as 'v4.5.x'. But that is an argument to
not put it at the back of the 'alien' branch, as I am not so sure we should
put that in master. The new feature of the alien parser is that it allows
comma suffixes to moves, to indicate the move is only partial, and more
of it is to follow. The nice thing, however, is that now I can really make
the syntax rule recognizing the trailing comma only be active in the
multi-move variants.

What we really would need is a heap of incompliant games in all sorts
of formats, which means probably from all kind of sources.
Of course we could wonder if it is really useful to keep supporting
non-compliant game files. E.g. standard PGN for a draw is "1/2-1/2".
But the parser also recognizes "1/2 - 1/2", "1 / 2 - 1 / 2", "1/2", "1 / 2",
"draw agreed", "Draw Agreed", "Draw by agreement", "draw by repetition"
"Drawn by Repetion".

I am not sure how critical all that is, though. As long as all moves are
recognized, the rest of a game can pretty much be ignored.
I guess the most critical part, which many of these rules are supposed
to facilitate, is to recognize the start of new games in a multi-game file.
This can be based on seeing PGN tags, a move number equal to 1,
a position diagram in various save formats, game headers as made
by GNU Chess or XBoard old save format, etc. Once you recognize the
game starts, and are able to fish out the moves from between the noise
(andnot mastake any kind of noise for moves), I guess you are pretty
much done. Failing to recognize result indications might of course
fuse games that also do not have recognizable headers or move numbers.


cheers
        ARUN




reply via email to

[Prev in Thread] Current Thread [Next in Thread]