#|| VHDL Object Model 1.0 --------------------- Copyright (c) 1994 Ohio Board of Regents and the University of Cincinnati. All rights reserved. Authors: David Benz, Phillip Baraona E-Mail: dbenz@thor.ece.uc.edu, pbaraona@thor.ece.uc.edu ||# #|| File: load-vom.re Contains: compile and load functions for the VHDL Object Model. VHDL Object Model Source Code: global.re - global definitions not directly relating to object model class-defns.re - the domain model (class definitions) attr-defns.re - the domain model (attribute definitions) grammar.re - the VHDL-93 grammar lexer.re - a lexical analyzer for the VHDL-93 grammar test.re - test functions for the VHDL object model Test VHDL Source Code: test.1.vhd - a simple, correct VHDL description ||# !! in-package("RU") !! in-grammar('user) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Loading Functions %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% "Make the VOM package" form MAKE-VOM-PACKAGE make-user-package('vom-1-0) "The directory where VHDL lives. Customize this for your site. (end with a pathname separator)" var *VOM-DIRECTORY*: string = "./" "The files that make up the VHDL object model." var *VOM-FILES*: seq(string) = [ "global.re", "lexer.re", "class-defns.re", "attr-defns.re", "grammar.re", "test.re"] "Returns the full namestring for a VHDL file." function VOM-FULL-NAMESTRING (file-name: string): string = concat(*VOM-DIRECTORY*, file-name) "Returns the namestring for the compiled version of a file." function BINARY-NAMESTRING (file-name: string): string = lisp::namestring(lisp::make-pathname('::defaults, file-name, '::type, re::*BINARY-FILE-TYPE-STRING*)) "Compile and load each of the VOM files." function COMPILE-AND-LOAD-VOM () = f in *VOM-FILES* & source-name = vom-full-namestring(f) & bin-name = binary-namestring(source-name) --> ((if ~lisp::probe-file(bin-name) or lisp::file-write-date(source-name) > lisp::file-write-date(bin-name) then compile-file(source-name)); load(bin-name)) "Quick and dirty compile function." function COMPILE-VOM () = f in *VOM-FILES* & source-name = vom-full-namestring(f) & bin-name = binary-namestring(source-name) --> compile-file(source-name) "Load each of the VHDL files." function LOAD-VHDL-OBJECT-MODEL () = f in *VOM-FILES* --> load(binary-namestring(vom-full-namestring(f)))