Ignore:
Timestamp:
Oct 1, 2012, 5:58:58 PM (8 years ago)
Author:
campbell
Message:

Branch prototype so that there's a version with the matita output patch
preinstalled.

Location:
Deliverables/D2.2/8051-matita-out
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051-matita-out/src/languages.ml

    r1542 r2383  
    258258    [ASMPrinter.print_program p]
    259259
    260 let save asm_pretty exact_output filename suffix ast =
     260let string_output_matita = function
     261 | AstClight p ->
     262   [ClightPrintMatita.print_program p]
     263 | AstCminor p ->
     264   [CminorMatitaPrinter.print_program p]
     265 | AstRTLabs p ->
     266   [RTLabsPrinter.print_program p]
     267   (*[RTLabsMatitaPrinter.print_program p]*)
     268 | AstRTL p ->
     269   [RTLPrinter.print_program p]
     270 | AstERTL p ->
     271   [ERTLPrinter.print_program p]
     272 | AstLTL p ->
     273   [LTLPrinter.print_program p]
     274 | AstLIN p ->
     275   [LINPrinter.print_program p]
     276 | AstASM p ->
     277   [Pretty.print_program p ; ASMPrinter.print_program p]
     278
     279let save asm_pretty ?(matita=false) exact_output filename suffix ast =
    261280  let ext_chopped_filename =
    262281    if exact_output then filename
     
    266285  let ext_chopped_filename = ext_chopped_filename ^ suffix in
    267286  let ext_filenames =
    268     List.map (fun ext -> ext_chopped_filename ^ "." ^ ext)
     287    List.map (fun ext ->
     288        if matita then ext_chopped_filename ^ "." ^ ext ^ ".ma"
     289                  else ext_chopped_filename ^ "." ^ ext)
    269290      (extension (language_of_ast ast)) in
    270291  let output_filenames =
    271292    if exact_output then ext_filenames
    272293    else List.map Misc.SysExt.alternative ext_filenames in
    273   let output_strings = string_output asm_pretty ast in
     294  let output_strings =
     295    if matita then string_output_matita ast
     296              else string_output asm_pretty ast in
    274297  let f filename s =
    275298    let cout = open_out filename in
Note: See TracChangeset for help on using the changeset viewer.