Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/ml-nlffigen/gen.sml
ViewVC logotype

Diff of /sml/trunk/src/ml-nlffigen/gen.sml

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

revision 1059, Mon Feb 11 17:05:33 2002 UTC revision 1060, Mon Feb 11 20:55:09 2002 UTC
# Line 21  Line 21 
21                  dirname: string,                  dirname: string,
22                  cmfile: string,                  cmfile: string,
23                  prefix: string,                  prefix: string,
24                    gensym_stem: string,
25                  extramembers: string list,                  extramembers: string list,
26                  libraryhandle: string,                  libraryhandle: string,
27                  complete: bool,                  complete: bool,
# Line 88  Line 89 
89      fun Styp t = STstruct t ^ ".typ"      fun Styp t = STstruct t ^ ".typ"
90      fun Utyp t = UTstruct t ^ ".typ"      fun Utyp t = UTstruct t ^ ".typ"
91    
     fun isu_id (K, tag) = concat ["I", K, "_", tag]  
92      fun fieldtype_id n = "t_f_" ^ n      fun fieldtype_id n = "t_f_" ^ n
93      fun fieldrtti_id n = "typ_f_" ^ n      fun fieldrtti_id n = "typ_f_" ^ n
94      fun field_id (n, p) = concat ["f_", n, p]      fun field_id (n, p) = concat ["f_", n, p]
# Line 97  Line 97 
97      fun enum_id n = "e_" ^ n      fun enum_id n = "e_" ^ n
98    
99      fun gen args = let      fun gen args = let
100          val { cfiles, match, mkidlsource,          val { cfiles, match, mkidlsource, gensym_stem,
101                dirname, cmfile, prefix, extramembers, libraryhandle, complete,                dirname, cmfile, prefix, extramembers, libraryhandle, complete,
102                allSU, lambdasplit,                allSU, lambdasplit,
103                wid,                wid,
# Line 105  Line 105 
105                namedargs = doargnames,                namedargs = doargnames,
106                target = { name = archos, sizes, shift, stdcall } } = args                target = { name = archos, sizes, shift, stdcall } } = args
107    
108            val (gensym_prefix, gensym_suffix) =
109                if gensym_stem = "" then ("", "")
110                else (gensym_stem ^ "_", "_" ^ gensym_stem)
111            val isu_prefix = if complete then gensym_prefix else ""
112            fun isu_id (K, tag) = concat [isu_prefix, prefix, "I", K, "_", tag]
113    
114          fun SUstruct K t = concat [prefix, K, "_", t]          fun SUstruct K t = concat [prefix, K, "_", t]
115          val Sstruct = SUstruct "S"          val Sstruct = SUstruct "S"
116          val Ustruct = SUstruct "U"          val Ustruct = SUstruct "U"
# Line 130  Line 136 
136                                       idlsource                                       idlsource
137                   val s' =                   val s' =
138                       AstToSpec.build (astbundle, sizes, cfiles, match,                       AstToSpec.build (astbundle, sizes, cfiles, match,
139                                        allSU, shift)                                        allSU, shift, gensym_suffix)
140               in               in
141                   S.join (s', s)                   S.join (s', s)
142               end handle e => (OS.FileSys.remove idlsource handle _ => ();               end handle e => (OS.FileSys.remove idlsource handle _ => ();

Legend:
Removed from v.1059  
changed lines
  Added in v.1060

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