"A " { $emphasis "vocabulary" } " is a named collection of words. Vocabularies are defined in the " { $vocab-link "vocabs" } " vocabulary."
$nl
"Vocabularies are stored in a global hashtable:"
{ $subsection dictionary }
"Vocabularies form a class."
{ $subsection vocab }
{ $subsection vocab? }
"Various vocabulary words are overloaded to accept a " { $emphasis "vocabulary specifier" } ", which is a string naming the vocabulary, the " { $link vocab } " instance itself, or a " { $link vocab-link } ":"
{ $subsection vocab-link }
{ $subsection >vocab-link }
"Looking up vocabularies by name:"
{ $subsection vocab }
"Accessors for various vocabulary attributes:"
{ $subsection vocab-name }
{ $subsection vocab-root }
{ $subsection vocab-main }
{ $subsection vocab-help }
"Looking up existing vocabularies and creating new vocabularies:"
{ $subsection vocab }
{ $subsection child-vocabs }
{ $subsection create-vocab }
"Getting words from a vocabulary:"
{ $subsection vocab-words }
{ $subsection words }
{ $subsection all-words }
{ $subsection words-named }
"Removing a vocabulary:"
{ $subsection forget-vocab }
{ $see-also "words""vocabs.loader" } ;
ABOUT: "vocabularies"
HELP:dictionary
{ $var-description "Holds a hashtable mapping vocabulary names to vocabularies." } ;
HELP:vocabs
{ $values { "seq""a sequence of strings" } }
{ $description "Outputs a sequence of all defined vocabulary names." } ;
{ $description "Outputs the name of a vocabulary." } ;
HELP:vocab-root
{ $values { "vocab""a vocabulary specifier" } { "root""a pathname string or " { $link f } } }
{ $description "Outputs the vocabulary root where the source code for a vocabulary is located, or " { $link f } " if the vocabulary is not defined in source files." } ;
{ $var-description "a quotation with stack effect " { $snippet "( name -- vocab )" } " which loads a vocabulary. This quotation is called by " { $link load-vocab } ". The default value should not need to be changed; this functinality is implemented via a hook stored in a variable to break a circular dependency which would otherwise exist from " { $vocab-link "vocabs" } " to " { $vocab-link "vocabs.loader" } " to " { $vocab-link "parser" } " back to " { $vocab-link "vocabs" } "." } ;
{ $class-description "Instances of this class identify vocabularies which are potentially not loaded. The " { $link vocab-name } " slot is the vocabulary name, and " { $link vocab-root } " is a pathname string identifying the vocabulary root where the sources to this vocabulary are located, or " { $link f } " if the root is not known."
$nl
"Vocabulary links are created by calling " { $link >vocab-link } "."