[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-XBoard] [bug #27799] fix for nested-nested-nested variations
From: |
Tim Mann |
Subject: |
[Bug-XBoard] [bug #27799] fix for nested-nested-nested variations |
Date: |
Sun, 25 Oct 2009 15:46:12 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.14) Gecko/2009090217 Ubuntu/9.04 (jaunty) Firefox/3.0.14 |
Follow-up Comment #3, bug #27799 (project xboard):
All good points, and you understand the syntax correctly.
Looking at the next pattern, besides the fact that the patterns are wrongly
looking for "Mateed" we actually are trying to recognize "White mated" as both
a win and a loss by white! I guess it could mean "White mated his opponent",
but "White is mated here" seems more likely.
Also, "White mate" seems meaningless to me, so maybe we should ignore that
one. (If we don't match it here, the "skip everything else" pattern will skip
"White " and the "([Cc]heck)?[Mm]ate" pattern will match at that point and
consider it a loss for the player who is on move.)
Actually, much of this stuff is probably unnecessary now that PGN is a fairly
accepted standard -- it dates from when xboard was often used to parse out
games people had typed into email messages by hand, before PGN even had been
proposed. But we could keep it and fix it this way:
(([Ww](hite)?)|([Bb](lack)?))" "[Mm]ates {
return (int) (ToUpper(yytext[0]) == 'W' ? WhiteWins : BlackWins);
}
(([Ww](hite)?)|([Bb](lack)?))" "([Mm]ated)|([Ll]os[tes]+.*) {
return (int) (ToUpper(yytext[0]) == 'W' ? BlackWins : WhiteWins);
}
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?27799>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/24
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/24
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/25
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations,
Tim Mann <=
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/25
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/25
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, Tim Mann, 2009/10/25
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/26
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, Tim Mann, 2009/10/28
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, Arun Persaud, 2009/10/28
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/28
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/28
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/28
- [Bug-XBoard] [bug #27799] fix for nested-nested-nested variations, anonymous, 2009/10/28