チェンジセット 1734

差分発生行の前後
無視リスト:
コミット日時:
2008/10/28 20:08:09 (3 年前)
コミッタ:
mzp
ログメッセージ:

起動用の関数を追加

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • ocaml/abc2xml/.ocamlinit

    r1651 r1734  
    1010#load "parsec.cmo";; 
    1111#load "byte.cmo";; 
    12 #load "asm.cmo";; 
     12#load "easyXml.cmo";; 
     13#load "disasm.cmo";; 
    1314#load "abc.cmo";; 
    14 #load "easyXml.cmo";; 
    1515#load "action.cmo";; 
  • ocaml/abc2xml/main.ml

    r1589 r1734  
    1 open Abc 
    2 let elem name child =  
    3   Xml.Element (name,[],child) 
    4  
    5 let pcdata name = 
    6   Xml.PCData name 
    7  
    8 let o = 
    9   {| name = "string" |} 
    10  
     1open Base 
    112let _ = 
    12   print_endline (o#name) 
     3  let argv =  
     4    Array.to_list Sys.argv in 
     5    match argv with 
     6      _::xs -> 
     7        xs +> List.iter (print_endline       $ 
     8                           Xml.to_string_fmt $ 
     9                           Swfmill.to_xml    $ 
     10                           Abc.of_stream     $  
     11                           Byte.of_channel   $  
     12                           open_in_bin) 
     13      | [] -> 
     14          failwith "must not happen" 
  • ocaml/abc2xml/swfmill.ml

    r1733 r1734  
    183183          elem_with "exceptions" of_exception m#exceptions; 
    184184          elem_with "traits"     of_trait     m#traits ]) xs 
    185  
    186 (*    <code> 
    187       <OpGetLocal0/> 
    188       <OpPushScope/> 
    189       <OpFindPropStrict name="2"/> 
    190       <OpPushString index="2"/> 
    191       <OpCallPropLex argc="1" name="2"/> 
    192       <OpPop/> 
    193       <OpReturnVoid/> 
    194     </code> 
    195   </MethodBody> 
    196   <exceptions/> 
    197   <traits/> 
    198 </methodBodies> b*) 
    199185     
    200186 
     
    212198     "majorVersion",string_of_int abc#major_version] 
    213199    [elem "constants" [of_cpool abc#constant_pool]; 
    214      of_methods abc#methods] 
     200     of_methods   abc#methods; 
     201     of_metadata  abc#metadata; 
     202     of_instances abc#instances; 
     203     of_classes   abc#classes; 
     204     of_script    abc#script; 
     205     of_method_bodies abc#method_body] 
    215206 
    216207let to_xml = 
     
    226217    open_in_bin "a.abc" in 
    227218    to_xml @@ Abc.of_stream @@ Byte.of_channel ch 
     219 
  • ocaml/abc2xml/test/swfmillTest.ml

    r1733 r1734  
    1616  Swfmill.of_methods abc#methods 
    1717 
     18let metadata = 
     19  Swfmill.of_metadata abc#metadata 
     20 
    1821let instances = 
    1922  Swfmill.of_instances abc#instances 
    20  
    21 let metadata = 
    22   Swfmill.of_metadata abc#metadata 
    2323 
    2424let classes =