X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=include%2Fyaz%2Fnfa.h;h=6880c701dce9d35561615f06336703333ef63e6a;hp=76c131ebb79f6a13ce966d1b8f621030659a6852;hb=065092597b2e0234d65b25b31930cbe98ec59738;hpb=440f23de23b0c2bce38451617cd69eb106b5c2df diff --git a/include/yaz/nfa.h b/include/yaz/nfa.h index 76c131e..6880c70 100644 --- a/include/yaz/nfa.h +++ b/include/yaz/nfa.h @@ -1,6 +1,6 @@ /* Copyright (C) 2006, Index Data ApS * See the file LICENSE for details. - * $Id: nfa.h,v 1.5 2006-05-05 09:14:42 heikki Exp $ + * $Id: nfa.h,v 1.6 2006-05-05 14:02:27 heikki Exp $ */ /** @@ -258,6 +258,24 @@ yaz_nfa_converter *yaz_nfa_create_backref_converter ( yaz_nfa *n, int backref_no ); +/** \brief Create a charcater range converter + * \param n the nfa + * \param backref_no The backreference to reproduce + * \param from_char the first character of the original range + * \param to_char the first character of the target range + * + * This converter takes a backreference, and shifts the characters + * by a constant value. For example, translating a-z to A-Z. + * Note that backref 0 is always the last character that matched a + * range, even if no backrefs were defined in teh nfa. This makes + * it pretty useful with this converter. + * + */ +yaz_nfa_converter *yaz_nfa_create_range_converter ( + yaz_nfa *n, int backref_no, + yaz_nfa_char from_char, + yaz_nfa_char to_char); + /** \brief Connects converters in a chain. * \param n the nfa (mostly for nmem access)