Allow lower-case piece indicator in drop-move notation
[xboard.git] / parser.l
index 0e4f898..84c9ec5 100644 (file)
--- a/parser.l
+++ b/parser.l
@@ -236,6 +236,7 @@ extern void CopyBoard P((Board to, Board from));
 
     piece = boards[yyboardindex]
       [currentMoveString[1] - ONE][currentMoveString[0] - AAA];
+    if(PieceToChar(piece) == '+' && appData.icsActive) promoted = 1, yytext[skip3] = PieceToChar(DEMOTED piece); // trust ICS
     if(promoted) piece = (ChessSquare) (DEMOTED piece);
     c = PieceToChar(piece);
     if(c == '~') c = PieceToChar((ChessSquare) (DEMOTED piece));
@@ -827,7 +828,7 @@ extern void CopyBoard P((Board to, Board from));
                              rf, ff, rt, ft, NULLCHAR);
 }
 
-[A-Z][@*][a-l][0-9] {
+[A-Za-z][@*][a-l][0-9] {
     /* Bughouse piece drop. */
     currentMoveString[1] = '@';
     currentMoveString[2] = yytext[2];