2 /* Copyright (C) 1989, 1990, 1991, 1992 Free Software Foundation, Inc.
3 Written by James Clark (jjc@jclark.com)
5 This file is part of groff.
7 groff is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
12 groff is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
17 You should have received a copy of the GNU General Public License along
18 with groff; see the file COPYING. If not, write to the Free Software
19 Foundation, 51 Franklin St - Fifth Floor, Boston, MA 02110-1301, USA. */
35 const char *other_case;
38 void set(token_type, const char *sk = 0, const char *oc = 0);
39 void lower_case(const char *start, const char *end, string &result) const;
40 void upper_case(const char *start, const char *end, string &result) const;
41 void sortify(const char *start, const char *end, string &result) const;
42 int sortify_non_empty(const char *start, const char *end) const;
45 int is_accent() const;
48 int is_hyphen() const;
49 int is_range_sep() const;
52 inline int token_info::is_upper() const
54 return type == TOKEN_UPPER;
57 inline int token_info::is_lower() const
59 return type == TOKEN_LOWER;
62 inline int token_info::is_accent() const
64 return type == TOKEN_ACCENT;
67 inline int token_info::is_other() const
69 return type == TOKEN_OTHER;
72 inline int token_info::is_punct() const
74 return type == TOKEN_PUNCT;
77 inline int token_info::is_hyphen() const
79 return type == TOKEN_HYPHEN;
82 inline int token_info::is_range_sep() const
84 return type == TOKEN_RANGE_SEP;
87 int get_token(const char **ptr, const char *end);
88 const token_info *lookup_token(const char *start, const char *end);