/* -*-c-*-
*
- * $Id: anag.c,v 1.5 2002/08/11 12:58:09 mdw Exp $
+ * $Id: anag.c,v 1.6 2003/09/15 02:48:54 mdw Exp $
*
* Main driver for anag
*
/*----- Revision history --------------------------------------------------*
*
* $Log: anag.c,v $
+ * Revision 1.6 2003/09/15 02:48:54 mdw
+ * Monoalphabetic match filter.
+ *
* Revision 1.5 2002/08/11 12:58:09 mdw
* Added support for regular expression matching, if supported by the C
* library.
-subgram WORD matches words which only use letters in WORD\n\
-wildcard PATTERN matches with wildcards `*' and `?'\n\
-trackword WORD matches words which can be found in a trackword\n\
+-mono PATTERN matches words isomorphic to the given PATTERN\n\
"
#ifdef HAVE_REGCOMP
"\
O_HELP, O_VERSION, O_USAGE,
O_FILE,
O_AND, O_OR, O_NOT, O_LPAREN, O_RPAREN,
- O_ANAG, O_SUBG, O_WILD, O_TRACK, O_REGEXP,
+ O_ANAG, O_SUBG, O_WILD, O_TRACK, O_REGEXP, O_MONO,
O_EOF
};
{ "subgram", 1, 0, O_SUBG },
{ "wildcard", 1, 0, O_WILD },
{ "trackword", 1, 0, O_TRACK },
+ { "mono", 1, 0, O_MONO },
#ifdef HAVE_REGCOMP
{ "regexp", 1, 0, O_REGEXP },
#endif
#ifdef HAVE_REGCOMP
case O_REGEXP: *nn = regexp(p->a + 1); break;
#endif
+ case O_MONO: *nn = mono(p->a + 1); break;
default: die("syntax error near `%s': unexpected token", *p->a);
}
p_next(p);