The legal filter must be followed by a single ―― filter, the argument:
    legal ――(o-o)
    legal ――
    legal ――

The argument ―― filter must have either no specified target, or a single target filter that is one of o-o, o-o-o, castle, or enpassant.

The legal filter matches the current position if there is a legal move matching the argument dash filter. The move need not be present in the PGN file.


The pseudolegal filter has exactly the same syntax as the legal filter, except that the keyword legal is replaced by the keyword pseudolegal. Its meaning is the same as legal except that pseudolegal moves, not just legal moves, are considered. (A pseudolegal move is like a legal move except that a pseudolegal move might leave the moving side in check).
    pseudolegal ――