Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2004-04-16 11:47:07 -0700 (Fri, 16 Apr 2004)
Revision: 5659
Log message:

      Added a <:dform< ... >> quotation, so we can use doc-style notation
      in display forms.  Unlike <:doc< ... >> quotations, whitespace is
      ignored in dforms, unless enclosed in quotes or the space{'e} term.
      
      Here are some examples:
      
         dform if_df : If{'e1; 'e2; 'e3} =
            <:dform<
               @begin[it]
               @space{// This is a conditional}
               @end[it]
               @hspace
               @bf[if] " " @slot{'e1} " " @bf[then] " " @slot{'e2} @bf[" else"] @slot{'e2}
            >>
      
      So far, this is not obviously better than what we have already.
      However, it makes it easy to use the doc-style display forms.
      
         dform_my_table : Table[title:s]{'e1; 'e2; 'e3} =
            <:dform<
               (* This text comment is displayed with spacing *)
               @begin[space]
               Richard had a dog called Muffin.  He often
               spoke of Muffin in his fireside chats.
               @end[space]
      
               (* This is a nested term *)
               << Muffin{v. 'e1} >>
      
               (* Now display the table *)
               @begin[tabular, l]
               @line{@slot[title:s]}
               @hline
               @line{'e1}
               @line{'e2}
               @line{'e3}
               @end[tabular]
            >>
      

Changes  Path
+2 -2 metaprl/filter/filter/filter_parse.ml
+94 -63 metaprl/filter/filter/term_grammar.ml
+1 -0 metaprl/mllib/comment_parse.mli
+41 -15 metaprl/mllib/comment_parse.mll
+37 -25 metaprl/support/display/nuprl_font.ml
+1 -0 metaprl/support/display/nuprl_font.mli