2008-12-15 01:01:06 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								USING:  help.markup  help.syntax  vocabs.loader  io.pathnames  strings  
						 
					
						
							
								
									
										
										
										
											2008-01-09 04:52:08 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								definitions quotations compiler.units ;
 
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								IN:  source-files  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ARTICLE: "source-files"  "Source files" 
							 
						 
					
						
							
								
									
										
										
										
											2009-05-04 07:44:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								"Words in the "  { $vocab-link "source-files"  } " vocabulary are used to keep track of loaded source files. This is used to implement "  { $link "vocabs.refresh"  } "."  
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								$nl
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								"The source file database:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections source-files }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								"The class of source files:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections source-file }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								"Words intended for the parser:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    record-checksum
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    record-definitions
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								"Removing a source file from the database:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections forget-source }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								"Updating the database:"  
						 
					
						
							
								
									
										
										
										
											2009-10-01 15:56:36 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $subsections reset-checksums }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								"The "  { $link pathname } " class implements the definition protocol by working with the corresponding source file; see "  { $link "definitions"  } "."  ;
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ABOUT: "source-files" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  source-files  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $var-description "An assoc mapping pathname strings to "  { $link source-file } " instances, representing loaded source files."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  source-file  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "path"  "a pathname string"  } { "source-file"  source-file } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Outputs the source file associated to a path name, creating the source file first if it doesn't exist. Source files are retained in the "  { $link source-files } " variable."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $class-description "Instances retain information about loaded source files, and have the following slots:" 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    { $list
							 
						 
					
						
							
								
									
										
										
										
											2008-08-30 13:34:37 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        { { $snippet "path"  } " - a pathname string."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { { $snippet "checksum"  } " - the CRC32 checksum of the source file's contents at the time it was most recently loaded."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { { $snippet "uses"  } " - an assoc whose keys are words referenced from this source file's top level form."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        { { $snippet "definitions"  } " - a pair of assocs, containing definitions and classes defined in this source file, respectively"  }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								} ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  record-checksum  
						 
					
						
							
								
									
										
										
										
											2009-10-21 18:40:43 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $values { "lines"  "a sequence of strings"  } { "source-file"  source-file } }
							 
						 
					
						
							
								
									
										
										
										
											2011-01-04 12:10:19 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Records the CRC32 checksum of the source file's contents."  }
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								$low-level-note ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  reset-checksums  
						 
					
						
							
								
									
										
										
										
											2009-05-04 07:44:17 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Resets recorded modification times and CRC32 checksums for all loaded source files, creating a checkpoint for "  { $link "vocabs.refresh"  } "."  } ;
 
							 
						 
					
						
							
								
									
										
										
										
											2007-09-20 18:09:08 -04:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  forget-source  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "path"  "a pathname string"  } }
							 
						 
					
						
							
								
									
										
										
										
											2008-01-09 19:13:26 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $description "Forgets all information known about a source file."  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $notes "This word must be called from inside "  { $link with-compilation-unit } "."  } ;
 
							 
						 
					
						
							
								
									
										
										
										
											2007-12-21 21:18:24 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  record-definitions  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "file"  source-file } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Records that all "  { $link new-definitions } " were defined in "  { $snippet "file"  } "."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  rollback-source-file  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $values { "file"  source-file } }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{ $description "Records information to the source file after an incomplete parse which ended with an error."  } ;
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								HELP:  file  
						 
					
						
							
								
									
										
										
										
											2008-08-30 13:34:37 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{ $var-description "Stores the "  { $link source-file } " being parsed. The "  { $snippet "path"  } " of this object comes from the input parameter to "  { $link with-source-file } "."  } ;