2009-02-11 20:58:28 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								USING:  accessors  arrays  combinators  definitions  generalizations 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								help help.markup help.topics kernel sequences sorting vocabs
							 
						 
					
						
							
								
									
										
										
										
											2009-04-22 05:46:47 -04:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								words combinators.smart tools.crossref ;
 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-11 20:58:28 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								IN:  annotations 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<PRIVATE
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								:  comment-word  (  base  --  word  )  "!"  prepend  "annotations"  lookup ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								:  comment-usage-word  (  base  --  word  )  "s"  append  "annotations"  lookup ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								:  comment-usage.-word  (  base  --  word  )  "s."  append  "annotations"  lookup ;  
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								PRIVATE>
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								:  $annotation  (  element  --  )
 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-18 22:13:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    first
 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    [ "!"  " your comment here"  surround  1array  $syntax ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    [ [ "Treats the rest of the line after the exclamation point as a code annotation that can be looked up with the "  \ $link  ] dip  comment-usage.-word 2array  " word."  3array  $description ]
							 
						 
					
						
							
								
									
										
										
										
											2009-02-22 13:35:18 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    [ ": foo ( x y z -- w )\n    !"  " --w-ó()ò-w-- kilroy was here\n    + * ;"  surround  1array  $code ]
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    tri  ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-22 13:35:18 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								:  <$annotation>  (  word  --  element  )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    \ $annotation  swap  2array  1array  ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								:  $annotation-usage.  (  element  --  )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    first
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    [ "Displays a list of words, help articles, and vocabularies that contain "  \ $link  ] dip  comment-word 2array  " annotations."  3array  $description ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-22 13:35:18 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								:  <$annotation-usage.>  (  word  --  element  )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    \ $annotation-usage.  swap  2array  1array  ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								:  $annotation-usage  (  element  --  )
 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-22 13:35:18 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								    first  [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [ "Returns a list of words, help articles, and vocabularies that contain "  ] dip
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            comment-word <$link>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            " annotations. For a more user-friendly display, use the " 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ] [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            comment-usage.-word <$link>
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								            " word." 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        ] bi
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    ] output>array $description ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								:  <$annotation-usage>  (  word  --  element  )
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    [ { $values { "usages"  sequence  } } ] dip
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    \ $annotation-usage  swap  2array
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    2array  ;
 
							 
						 
					
						
							
								
									
										
										
										
											2009-02-13 16:10:46 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2009-02-11 20:58:28 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								"Code annotations" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "The "  { $vocab-link "annotations"  } " vocabulary provides syntax for comment-like annotations that can be looked up with Factor's "  { $link usage } " mechanism." 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								annotation-tags natural-sort
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								[
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    [ \ $subsection  swap  comment-word 2array  ] map  append
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    "To look up annotations:"  suffix
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								] [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    [ \ $subsection  swap  comment-usage.-word 2array  ] map  append
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								] bi
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								<article> "annotations"  add-article
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								"annotations"  vocab "annotations"  >>help drop
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								annotation-tags [
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    {
							 
						 
					
						
							
								
									
										
										
										
											2009-02-22 13:35:18 -05:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								        [ [ <$annotation> ] [ comment-word set-word-help ] bi  ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [ [ <$annotation-usage> ] [ comment-usage-word set-word-help ] bi  ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								        [ [ <$annotation-usage.> ] [ comment-usage.-word set-word-help ] bi  ]
							 
						 
					
						
							
								
									
										
										
										
											2009-02-11 20:58:28 -05:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								        [ [ comment-word ] [ comment-usage-word ] [ comment-usage.-word ] tri  3array  related-words ]
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								    } cleave
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								] each