comparison src/cjr_print.sml @ 387:7abb28e9d51f

Binops; equality tested on int; lame 404 substitute
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 09:50:19 -0400
parents 168667cdaa95
children acaf9d19fbb7
comparison
equal deleted inserted replaced
386:ef43ed6cd1de 387:7abb28e9d51f
606 parenIf par (box [p_exp' true env f, 606 parenIf par (box [p_exp' true env f,
607 string "(ctx,", 607 string "(ctx,",
608 space, 608 space,
609 p_list_sep (box [string ",", space]) (p_exp env) args, 609 p_list_sep (box [string ",", space]) (p_exp env) args,
610 string ")"]) 610 string ")"])
611
612 | EUnop (s, e1) =>
613 parenIf par (box [string s,
614 space,
615 p_exp' true env e1])
616
617 | EBinop ("!strcmp", e1, e2) =>
618 box [string "!strcmp(",
619 p_exp env e1,
620 string ",",
621 space,
622 p_exp env e2,
623 string ")"]
624 | EBinop (s, e1, e2) =>
625 parenIf par (box [p_exp' true env e1,
626 space,
627 string s,
628 space,
629 p_exp' true env e2])
611 630
612 | ERecord (i, xes) => box [string "({", 631 | ERecord (i, xes) => box [string "({",
613 space, 632 space,
614 string "struct", 633 string "struct",
615 space, 634 space,
2058 newline, 2077 newline,
2059 string "void uw_handle(uw_context ctx, char *request) {", 2078 string "void uw_handle(uw_context ctx, char *request) {",
2060 newline, 2079 newline,
2061 p_list_sep newline (fn x => x) pds', 2080 p_list_sep newline (fn x => x) pds',
2062 newline, 2081 newline,
2082 string "uw_error(ctx, FATAL, \"Unknown page\");",
2083 newline,
2063 string "}", 2084 string "}",
2064 newline, 2085 newline,
2065 newline, 2086 newline,
2066 validate, 2087 validate,
2067 newline, 2088 newline,