mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
973 B
973 B
Benchmark suite for pretty printing
Files:
p.ml-- an implementation of pretty-printer in meta-languagepp_default.m4-- macro that convertsp.mlinto strightforward pretty printerpp_gt.m4-- a macro that convertsp.mlinto GT-based pretty printerbench_main.ml-- runner of benhcmark1demo_infix.ml-- demo about infix operator pretty printing
Compilation: hit make.
Benchmark bench.exe
Searches for input files in ../stdlib or ./stdlib and measures two pretty-printers:
- straightforward one from
Pprint_default.ml(generated bypp_default.m4fromp.ml) - the one using our approach:
Pprint_gt.ml(generated bypp_gt.m4fromp.ml)
demo demo_infix.exe
Pretty prints a small piece of code by two approaches:
- generated using our approach:
Pprint_gt.ml - modified
Pprint_gt.ml: we are printing infix names in a prettier way. It is not possible to modify straightforward approach without pain