1 USING: help kernel parser sequences ;
6 "This word should only be called from parsing words."
10 { $var-description "A variable holding the current vocabulary search path as a sequence of hashtables." }
11 { $see-also in use+ set-use POSTPONE: USING: POSTPONE: USE: } ;
14 { $var-description "A variable holding the current vocabulary for new definitions." }
15 { $see-also use set-in POSTPONE: IN: } ;
18 { $values { "name" "a string" } { "vocab" "a hashtable or " { $link f } } }
19 { $description "Outputs a named vocabulary. If the vocabulary does not exist, throws a restartable " { $link check-vocab } " error. If the user invokes the restart, this word outputs " { $link f } "." }
20 { $error-description "Thrown by " { $link POSTPONE: USE: } " and " { $link POSTPONE: USING: } " when a given vocabulary does not exist. Vocabularies must be created by " { $link POSTPONE: IN: } " before being used." } ;
23 { $values { "vocab" "a string" } }
24 { $description "Adds a new vocabulary at the front of the search path. Subsequent word lookups by the parser will search this vocabulary first." }
26 { $errors "Throws an error if the vocabulary does not exist." }
27 { $see-also in use add-use set-use POSTPONE: USE: } ;
30 { $values { "seq" "a sequence of strings" } }
31 { $description "Sets the vocabulary search path. Later vocabularies take precedence." }
32 { $errors "Throws an error if one of the vocabularies does not exist." }
34 { $see-also in use use+ add-use file-vocabs } ;
37 { $values { "seq" "a sequence of strings" } }
38 { $description "Adds multiple vocabularies to the search path, with later vocabularies taking precedence." }
39 { $errors "Throws an error if one of the vocabularies does not exist." }
41 { $see-also in use use+ set-use POSTPONE: USING: } ;
44 { $values { "name" "a string" } }
45 { $description "Sets the current vocabulary where new words will be defined, creating the vocabulary first if it does not exist." }
47 { $see-also in use POSTPONE: IN: } ;
50 { $values { "obj" "an object" } { "?" "a boolean" } }
51 { $description "Tests if an object is a parsing word." }
52 { $notes "Outputs " { $link f } " if the object is not a word." } ;
55 { $var-description "Variable stores the file name being parsed. This is the input parameter to " { $link parse-stream } "." } ;
58 { $var-description "Variable holds the line number being parsed." } ;
61 { $var-description "Variable holds the text of the line being parsed." } ;
64 { $var-description "Variable holds the column number being parsed." } ;
67 { $values { "word" "a word" } }
68 { $description "Sets the " { $snippet "\"file\"" } " and " { $snippet "\"line\"" } " word properties to the current parser location." }
72 { $values { "string" "a word name" } { "word" "a new word" } }
73 { $description "Creates a word in the current vocabulary. Until re-defined, the word throws an error when invoked." }
76 HELP: create-constructor
77 { $values { "class" "a word" } { "word" "a new word" } }
78 { $description "Creates a new word in the current vocabulary, named by surrounding " { $snippet "class" } " with angle brackets." }
80 { $example "SYMBOL: foo" "foo create-constructor ." "<foo>" }
84 { $error-description "Thrown when the parser encounters invalid input. A parse error wraps an underlying error and holds the file being parsed, line number, and column number." } ;