2 # mk-src.in -- Input file for the Perl program to automatically
3 # generate interface code.
5 # This file is part of The New Aspell
6 # Copyright (C) 2001-2005 by Kevin Atkinson under the GNU LGPL
7 # license version 2.0 or 2.1. You should have received a copy of the
8 # LGPL license along with this library if you did not you can find it
9 # at http://www.gnu.org/.
13 The format of mk-src.in is as follows:
15 The following characters are literals: { } / '\ ' \n = >
18 <items> := (<item>\n)+
19 <items> := <category>:\ <name> {\n<details>\n} | <<tab>><details>
20 <details> := <options>\n /\n <items>
21 <options> := (<option>\n)*
22 <option> := <key> [=> <value>]
24 <<tab>> means everything should be indented by one tab
26 See MkSrc::Info for a description of the categories and options
52 # desc => Returns a pointer to an int which may be used
53 # for reference counting. It will default to 0.
54 # This integer is not used by the actual library
55 # but may be used my some of the front ends.
57 # c impl => return &ths->ref_count;
68 # desc => Two objects of the same pointer type may be
69 # assigned to each other only if their type ids
71 # cxx impl => return type_id_.num
79 # desc => Returns 0 if this object can not be copied,
80 # 1 if it may be copied, 2 if it should be
81 # copied. Used by some of the front ends to
82 # determine if a deep or shallow copy should be
84 # cxx impl => return copyable_
98 methods: can have error
101 headers => copy ptr, error
102 what => CopyPtr<Error> err_
107 c impl => return ths->err_ == 0 ? 0 : 1;
111 method: error message
114 c impl => return ths->err_ ? ths->err_->mesg : "";
121 c impl => return ths->err_;
125 methods: mutable container
126 c impl headers => posib err
128 public: mutable container
143 method: to mutable container
145 c impl => return ths;
149 group: mutable container
152 class: mutable container
154 mutable container methods
201 desc => The Key Info object is used for holding information
205 desc => The name of the key.
207 desc => The key type.
209 desc => The default value of the key.
211 desc => A brief description of the key or NULL if internal value.
219 class: key info enumeration
225 c impl headers => error
231 can have error methods
234 desc => Sets extra keys which this config class should
235 accept. begin and end are expected to point to
236 the beginning and ending of an array of Aspell
240 const key info: begin
245 desc => Returns the KeyInfo object for the
246 corresponding key or returns NULL and sets
247 error_num to PERROR_UNKNOWN_KEY if the key is
248 not valid. The pointer returned is valid for
249 the lifetime of the object.
254 method: possible elements
255 desc => Returns a newly allocated enumeration of all
256 the possible objects this config class uses.
263 desc => Returns the default value for given key which
264 may involve substituting variables, thus it is
265 not the same as keyinfo(key)->def returns NULL
266 and sets error_num to PERROR_UNKNOWN_KEY if
267 the key is not valid. Uses the temporary
274 desc => Returns a newly allocated enumeration of all
275 the key/value pairs. This DOES not include ones
276 which are set to their default values.
278 string pair enumeration
282 desc => Inserts an item, if the item already exists it
283 will be replaced. Returns TRUE if it succeeded
284 or FALSE on error. If the key is not valid it
285 sets error_num to PERROR_UNKNOWN_KEY, if the
286 value is not valid it will set error_num to
287 PERROR_BAD_VALUE, if the value can not be
288 changed it sets error_num to
289 PERROR_CANT_CHANGE_VALUE, and if the value is
290 a list and you are trying to set its directory,
291 it sets error_num to PERROR_LIST_SET
299 desc => Remove a key and returns TRUE if it exists
300 otherwise return FALSE. This effectively sets
301 the key to its default value. Calling replace
302 with a value of "<default>" will also call
303 remove. If the key does not exist then it sets
304 error_num to 0 or PERROR_NOT, if the key is
305 not valid then it sets error_num to
306 PERROR_UNKNOWN_KEY, if the value can not be
307 changed then it sets error_num to
308 PERROR_CANT_CHANGE_VALUE
321 desc => Returns NULL on error.
326 method: retrieve list
331 mutable container: lst
333 method: retrieve bool
335 desc => In "ths" Aspell configuration, search for a
336 character string matching "key" string.
337 If "key" is found then return 1 else return 0.
338 If error encountered, then return -1.
345 desc => In "ths" Aspell configuration, search for an
346 integer value matching "key" string.
352 # method: read_in_settings
357 # method: settings_read_in
367 const error info: err
376 const error info: isa
378 unsigned int: num parms
379 array 3 string: parms
381 group: can have error
384 class: can have error
385 c impl headers => error
388 cxx impl => : err_(e) {}
391 can have error methods
401 operation not supported
402 mesg => Operation Not Supported: %what
407 mesg => The method "%what" is unimplemented in "%where".
414 mesg => The file "%file" can not be opened
417 mesg => The file "%file" can not be opened for reading.
419 mesg => The file "%file" can not be opened for writing.
421 mesg => The file name "%file" is invalid.
423 mesg => The file "%file" is not in the proper format.
428 mesg => The directory "%dir" can not be opened for reading.
434 mesg => The key "%key" is unknown.
436 mesg => The value for option "%key" can not be changed.
438 mesg => The key "%key" is not %accepted and is thus invalid.
441 mesg => The value "%value" is not %accepted and is thus invalid for the key "%key".
442 parms => value, accepted
445 mesg => The key "%key" is not a string.
447 mesg => The key "%key" is not an integer.
449 mesg => The key "%key" is not a boolean.
451 mesg => The key "%key" is not a list.
453 mesg => The key "%key" does not take any parameters when prefixed by a "reset-".
455 mesg => The key "%key" does not take any parameters when prefixed by an "enable-".
457 mesg => The key "%key" does not take any parameters when prefixed by a "dont-" or "disable-".
459 mesg => The key "%key" does not take any parameters when prefixed by a "clear-".
465 mesg => The language "%lang" is not known.
467 mesg => The soundslike "%sl" is not known.
469 language not supported
470 mesg => The language "%lang" is not supported.
472 mesg => No word lists can be found for the language "%lang".
474 mesg => Expected language "%lang" but got "%prev".
479 mesg => Affix '%aff' is corrupt.
482 mesg => The condition "%cond" is invalid.
485 mesg => The condition "%cond" does not guarantee that "%strip" can always be stripped.
488 mesg => The file "%file" is not in the proper format. Expected the file to be in "%exp" not "%got".
489 parms => file, exp, got
494 mesg => The encoding "%encod" is not known.
495 encoding not supported
496 mesg => The encoding "%encod" is not supported.
497 conversion not supported
498 mesg => The conversion from "%encod" to "%encod2" is not supported.
507 mesg => The string "%str" is invalid.
510 mesg => The word "%word" is invalid.
513 mesg => The affix flag '%aff' is invalid for word "%word".
516 mesg => The affix flag '%aff' can not be applied to word "%word".
527 mesg => not a version number
531 mesg => dlopen returned "%return".
534 mesg => The file "%filter" does not contain any filters.
537 mesg => The filter "%filter" does not exist.
540 mesg => Confused by version control.
542 mesg => Aspell version does not match filter's requirement.
544 mesg => Filter option already exists.
546 mesg => Use option modifiers only within named option.
547 invalid option modifier
548 mesg => Option modifier unknown.
550 mesg => Error setting filter description.
554 mesg => Empty option specifier.
556 mesg => Option "%option" possibly specified prior to filter.
559 mesg => Unknown mode description key "%key".
562 mesg => Expecting "%modekey" key.
564 mode version requirement
565 mesg => Version specifier missing key: "aspell".
566 confusing mode version
567 mesg => Confused by version control.
569 mesg => Aspell version does not match mode's requirement.
570 missing magic expression
571 mesg => Missing magic mode expression.
573 mesg => Empty extension at char %char.
576 mesg => "%mode" error
580 mesg => Unknown mode: "%mode".
582 mesg => "%mode" error while extend Aspell modes. (out of memory?)
584 mesg = "%mode": bad magic "%magic"
588 mesg => "%mode": no start for magic search given for magic "%magic".
590 mesg => "%mode": no range for magic search given for magic "%magic".
592 mesg => "%mode": no magic expression available for magic "%magic".
594 mesg => "%mode": Magic "%magic": bad regular expression after location specifier; regexp reports: "%regerr".
600 mesg => "%expression" is not a valid regular expression.
608 c impl headers => error
610 # FIXME: make a "methods" of the next two contractors
611 # which will probably involve modifying mk-src.pl
613 constructor: new aspell speller
616 PosibErr<Speller *> ret = new_speller(config);
617 if (ret.has_err()) \{
618 return new CanHaveError(ret.release_err());
626 constructor: to aspell speller
627 c impl => return static_cast<Speller *>(obj);
633 can have error methods
642 desc => Returns 0 if it is not in the dictionary,
643 1 if it is, or -1 on error.
648 method: add to personal
651 desc => Add this word to your own personal word list.
656 method: add to session
659 desc => Add this word to the current spelling session.
664 method: personal word list
667 desc => This is your own personal word list file plus
668 any extra words added during this session to
669 your own personal word list.
673 method: session word list
676 desc => This is a list of words added to this session
677 that are not in the main word list or in your
678 own personal list but are considered valid for
679 this spelling session.
683 method: main word list
686 desc => This is the main list of words used during this
691 method: save all word lists
697 method: clear session
706 desc => Return NULL on error.
707 The word list returned by suggest is only
708 valid until the next call to suggest.
713 method: store replacement
728 c impl headers => error
732 can have error methods
734 # FIXME: make a "methods" of the next two contractors
736 # constructor: new aspell filter
739 # PosibErr<Filter *> ret = new_filter(config);
740 # if (ret.has_err()) \{
741 # return new CanHaveError(ret.release_err());
749 constructor: to aspell filter
750 c impl => return static_cast<Filter *>(obj);
780 group: document checker
789 class: document checker
790 c impl headers => error
794 can have error methods
796 # FIXME: make a "methods" of the next two contractors
798 constructor: new aspell document checker
801 PosibErr<DocumentChecker *> ret = new_document_checker(speller);
802 if (ret.has_err()) \{
803 return new CanHaveError(ret.release_err());
807 desc => Creates a new document checker.
808 The speller class is expected to last until
809 this class is destroyed.
810 If config is given it will be used to override
811 any relevent options set by this speller class.
812 The config class is not once this function is done.
813 If filter is given then it will take ownership of
814 the filter class and use it to do the filtering.
815 You are expected to free the checker when done.
820 constructor: to aspell document checker
821 c impl => return static_cast<DocumentChecker *>(obj);
827 desc => Reset the internal state of the filter.
828 Should be called whenever a new document is
835 desc => Process a string.
836 The string passed in should only be split on
837 white space characters. Furthermore, between
838 calls to reset, each string should be passed
839 in exactly once and in the order they appeared
840 in the document. Passing in strings out of
841 order, skipping strings or passing them in
842 more than once may lead to undefined results.
848 method: next misspelling
850 desc => Returns the next misspelled word in the
851 processed string. If there are no more
852 misspelled words, then token.word will be
853 NULL and token.size will be 0
859 desc => Returns the underlying filter class.
868 c impl headers => string enumeration
870 cxx member: from internal
871 what => class Convert * from_internal_
887 StringEnumeration * els = ths->elements();
888 els->from_internal_ = ths->from_internal_;
893 group: string enumeration
896 class: string enumeration
897 c impl headers => convert
907 const char * s = ths->next();
908 if (s == 0 || ths->from_internal_ == 0) \{
911 ths->temp_str.clear();
912 ths->from_internal_->convert(s,-1,ths->temp_str);
913 ths->from_internal_->append_null(ths->temp_str);
914 return ths->temp_str.data();
928 string list: dict dirs
929 string list: dict exts
934 desc => The Name to identify this dictionary by.
936 desc => The language code to identify this dictionary.
937 A two letter UPPER-CASE ISO 639 language code
938 and an optional two letter ISO 3166 country
939 code after a dash or underscore.
941 desc => Any extra information to distinguish this
942 variety of dictionary from other dictionaries
943 which may have the same language and size.
946 desc => A two char digit code describing the size of
947 the dictionary: 10=tiny, 20=really small,
948 30=small, 40=med-small, 50=med, 60=med-large,
949 70=large, 80=huge, 90=insane. Please check
950 the README in aspell-lang-200?????.tar.bz2 or
951 see SCOWL (http://wordlist.sourceforge.net)
952 for an example of how these sizes are used.
955 class: module info list
957 constructor: get aspell module info list
963 class: dict info list
965 constructor: get aspell dict info list
971 class: module info enumeration
976 class: dict info enumeration
991 mutable container methods
1003 mutable container methods
1007 list methods: string pair
1010 desc => Insert a new element.
1011 Will NOT overwrite an existing entry.
1012 Returns FALSE if the element already exists.
1019 desc => Insert a new element.
1020 Will overwrite an existing entry.
1021 Always returns TRUE.
1029 desc => Looks up an element and returns the value.
1030 Returns NULL if the element does not exist.
1031 Returns an empty string if the element exists
1032 but has a NULL value.
1049 group: string pair enumeration
1052 class: string pair enumeration
1061 desc => Reset the global cache(s) so that cache queries will
1062 create a new object. If existing objects are still in
1063 use they are not deleted. If which is NULL then all
1064 caches will be reset. Current caches are "encode",
1065 "decode", "dictionary", "language", and "keyboard".