mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-05 22:38:44 +00:00
| .. | ||
| .gitignore | ||
| bench_main.ml | ||
| demo.lama | ||
| demo_infix.ml | ||
| Makefile | ||
| p.ml | ||
| pp_default.m4 | ||
| pp_gt.m4 | ||
| README.md | ||
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