Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/gen/fragments/mkfrags.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/gen/fragments/mkfrags.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 5554, Mon May 7 02:41:55 2018 UTC revision 5555, Tue May 8 17:32:59 2018 UTC
# Line 1  Line 1 
1  (* mkfrags.sml  (* mkfrags.sml
2   *   *
  * This code is part of the Diderot Project (http://diderot-language.cs.uchicago.edu)  
  *  
  * COPYRIGHT (c) 2016 The University of Chicago  
  * All rights reserved.  
  *  
3   * Program to generate a file "fragments.sml" containing a fragments structure   * Program to generate a file "fragments.sml" containing a fragments structure
4   * from a CATALOG file.  A CATALOG file has the following layout   * from a CATALOG file.  A CATALOG file has the following layout
5   *   *
# Line 21  Line 16 
16   * is parsed as a JSON value (see the SML/NJ JSON library) and the resulting   * is parsed as a JSON value (see the SML/NJ JSON library) and the resulting
17   * value in the output will be SML code that defines the corresponding JSON.value   * value in the output will be SML code that defines the corresponding JSON.value
18   * value.   * value.
19     *
20     * COPYRIGHT (c) 2017 John Reppy (http://cs.uchicago.edu/~jhr)
21     *
22     * Permission is hereby granted, free of charge, to any person obtaining a copy
23     * of this software and associated documentation files (the "Software"), to deal
24     * in the Software without restriction, including without limitation the rights
25     * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
26     * copies of the Software, and to permit persons to whom the Software is
27     * furnished to do so, subject to the following conditions:
28     *
29     * The above copyright notice and this permission notice shall be included in all
30     * copies or substantial portions of the Software.
31     *
32     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37     * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38     * SOFTWARE.
39     *
40     * This code is part of the SML Compiler Utilities, which can be found at
41     *
42     *      https://github.com/JohnReppy/sml-compiler-utils
43     *
44     * This file has been specialized for the Diderot project.
45     *
46     * COPYRIGHT (c) 2018 The University of Chicago
47     * All rights reserved.
48   *)   *)
49    
50  structure MkFrags : sig  structure MkFrags : sig
51    
52      (* `mkFragments dir` generates the file `dir/fragments.sml` using the catalog
53       * file `dir/fragments/CATALOG`.
54       *)
55      val mkFragments : string -> unit      val mkFragments : string -> unit
56    
57      (* `mkMakefile dir` generates the file `dir/fragments.gmk` using the catalog
58       * file `dir/fragments/CATALOG`.
59       *)
60      val mkMakefile : string -> unit      val mkMakefile : string -> unit
61    
62    end = struct    end = struct
# Line 67  Line 97 
97                handle ex => (TextIO.closeIn inS; raise ex)                handle ex => (TextIO.closeIn inS; raise ex)
98            end            end
99    
100      (* header for the generated SML file *)
101      val smlHead = "\      val smlHead = "\
102            \(* %s\n\            \(* %s\n\
103            \ *\n\            \ *\n\
# Line 82  Line 113 
113            \  struct\n\            \  struct\n\
114            \"            \"
115    
116      (* footer for the generated SML file *)
117      val smlFoot = "\      val smlFoot = "\
118            \\n\            \\n\
119            \  end\n\            \  end\n\
# Line 179  Line 211 
211              TextIO.closeOut outS              TextIO.closeOut outS
212            end            end
213    
214      (* header for the generated Makefile file *)
215      val mkHead = "\      val mkHead = "\
216            \# fragments.gmk\n\            \# fragments.gmk\n\
217            \#\n\            \#\n\

Legend:
Removed from v.5554  
changed lines
  Added in v.5555

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0