ftp.nice.ch/pub/next/developer/languages/eiffel/espretty.s.tar.gz#/espretty-se/espp.man

This is espp.man in view mode; [Download] [Up]



espp(1)             UNIX Programmer's Manual              espp(1)



NAME
     espp - A preprocessor for the Eiffel source pretty printer

SYNOPSIS
     espp [ -lnsux ] [ -t | -2 | -3 | -4 ] [ -ascii | -ansi | -mif |
     -mime | -rtf ] <files...>


DESCRIPTION
     _e_s_p_p is a shell script that works as a preprocessor for
     _e_s_p_r_e_t_t_y the (Eiffel source pretty printer).  It can be used
     to produce `pretty-printed' versions of Eiffel class text
     files and thus make these easier to read.

     The _e_s_p_p preprocessor shell script calls the _e_s_p_r_e_t_t_y pro-
     gram, which understands a substantial amount about the syn-
     tax of Eiffel, but which doesn't make any attempts to cope
     with incomplete and misformed syntax. However, whenever pos-
     sible it tries to format the class text according to the
     layout standards in ETL Appendix A.

     _e_s_p_p parses the given options and class file arguments and
     passes these to relevant _e_s_p_r_e_t_t_y calls. The main purpose of
     this _e_s_p_p preprocessor version for the _S_m_a_l_l_E_i_f_f_e_l compiler
     is, to pass multiple file arguments to _e_s_p_r_e_t_t_y calls and to
     _c_r_e_a_t_e always new _f_i_l_e_s instead of using STDOUT.

     _e_s_p_p gives you the ability to handle multiple input files at
     once, which the _e_s_p_r_e_t_t_y program by itself doesn't support.

     _e_s_p_p has the same options as _e_s_p_r_e_t_t_y but allows the han-
     dling of multiple input files on the command line.


     However, the preprocessor's execution can be interrupted at
     any time by pressing the _B_R_E_A_K _k_e_y (Ctrl-C) under most Unix
     systems.


OPTIONS
     -t|  -2| -3| -4

          Indent levels by _N_U_M blank characters, the _d_e_f_a_u_l_t is
          _3. This conforms to the code examples shown in ETL. The
          _N_U_M argument should be one of those listed above.  Use
          -_t (8 blanks) to emulate a tabstop. However, _e_s_p_p
          doesn't check for other values, so it is the responsi-
          bility of the user to provide one of those _N_U_M argu-
          ments shown above.

     -ascii|
          -ansi| -mif| -mime| -rtf

          Use one of these formatters for output, the _d_e_f_a_u_l_t is
          _A_S_C_I_I. Available formatters are:

          _A_S_C_I_I

          Text is printed using plain ASCII with no
          embellishments.  The new created (formated) files will
          have the extension *.e and the backups (processed ori-
          ginal files) the extension *.e~, this is handled as by
          the Emacs editor.

          _A_N_S_I

          As ASCII, but with keywords emboldened with the
          relevant ANSI escape sequences. For use if you have a
          terminal that supports ANSI bold codes under Unix, or
          under DOS if have included the ANSI.SYS driver in your
          DOS CONFIG.SYS file.  This format is supported by Unix
          pagers like _m_o_r_e , _l_e_s_s _o_r _m_o_s_t. The new created files
          will have the suffix of the formater appended, in this
          case *._e._a_n_s_i and the original files are kept with the
          "*.e" extension.


          _M_I_F

          Outputs the text including a minimal subset of
          FrameMaker Maker-Interchange-Format sequences. This
          format is recognised by the FrameMaker publishing
          software. If you load the output you should be able to
          print typeset Eiffel classes. The new created files
          will have the suffix of the formater appended, in this
          case *._e._m_i_f and the original files are kept with the
          "*.e" extension.

          _N_O_T_I_C_E: _e_s_p_r_e_t_t_y'_s implementation of this formatter has
          some _r_e_s_t_r_i_c_t_i_o_n_s and _l_i_m_i_t_a_t_i_o_n_s _i_n the proper _E_i_f_f_e_l
          _c_o_m_m_e_n_t _h_a_n_d_l_i_n_g , for more information about this see
          also the _C_A_V_E_A_T_S _s_e_c_t_i_o_n.

          _M_I_M_E

          Outputs the text including RFC 1341 Rich-Text
          sequences. If you have a MIME richtext reader or you
          wish to mail typeset Eiffel Classes to people, this
          formatter is for you.  Files created with this formater
          will have the suffix of the formater appended, in this
          case *._e._m_i_m_e , the original files are kept with the
          "*.e" extension.

          _R_T_F

          Outputs the text including a minimal subset of
          Microsoft's Rich-Text-Format sequences. This format is
          recognised by a lot of WordProcessors. If you load the
          output you should be able to print typeset Eiffel
          classes. Files created with this formater will have the
          suffix of the formater appended, in this case *._e._r_t_f ,
          the original files are kept with the "*.e" extension.

          _N_O_T_I_C_E: _e_s_p_r_e_t_t_y'_s implementation of this formatter has
          some _r_e_s_t_r_i_c_t_i_o_n_s and _l_i_m_i_t_a_t_i_o_n_s _i_n the proper _E_i_f_f_e_l
          _c_o_m_m_e_n_t _h_a_n_d_l_i_n_g , for more information about this see
          also the _C_A_V_E_A_T_S _s_e_c_t_i_o_n.

     -l   When this option is set, Eiffel identifiers (not types)
          are transformed into lower chars, this conforms to the
          ETL Appendix A layout guidelines.

     -n   Print output with line numbers and statement level,
          empty lines are ignored. This is not a bug, it's a
          feature. If combined together with the -x option, the
          output of empty lines without line numbers can be
          reduced.

     -s   Print output in a sort of short format, removes feature
          bodies.

     -u   When this option is set, (most) Eiffel types are
          transformed into upper chars, this might reduce the
          amount of shift or caps-lock presses under your key-
          board.

     -x   Start new line after `redefine, until ...', removes
          empty lines in routine bodies.


EXAMPLE USAGE
     _e_s_p_p can process multiple class files as arguments (thanks
     to the Unix shell expansion mechanism). For example:

           espp class1.e class2.e class3.e...

     or for lazy typists:

           espp *.e

     For documentation purposes to get a short form in RTF for-
     mat:

           espp -s -rtf  class1.e class2.e class3.e...
           espp -s -rtf  *.e

     Or:

               espp -t -u -n -mif class1.e class2.e class3.e...
               espp -t -u -n -mif *.e


     Of course there are much more possibilities, try them out.

SEE ALSO
     _e_s_p_r_e_t_t_y(1),

     [ETL92] Bertrand Meyer, Eiffel: The language, Prentice Hall

CAVEATS
     The _R_T_F and _M_I_F output formatters have some _l_i_m_i_t_a_t_i_o_n_s in
     the _E_i_f_f_e_l _c_o_m_m_e_n_t handling. So the user is forced to take
     care about the following _r_e_s_t_r_i_c_t_i_o_n_s when these formatters
     are used:

     Eiffel names of `features' or other `entity' appearing in a
     comment _m_u_s_t be enclosed in _e_x_a_c_t_l_y these single quotes (one
     _o_p_e_n_i_n_g _q_u_o_t_e -> ` <- and one _c_l_o_s_i_n_g _q_u_o_t_e -> ' <- ), as
     shown here with `_f_e_a_t_u_r_e' and `_e_n_t_i_t_y' , to be printed
     correctly in _i_t_a_l_i_c_s.

     _A_d_d_i_t_i_o_n_a_l you have to _a_v_o_i_d _g_e_n_e_r_a_l_l_y using this sort of
     single quotes for other purposes in Eiffel comments.  This
     is _i_m_p_o_r_t_a_n_t for the _R_T_F and _M_I_F formatters, to produce a
     correct output format, otherwise the output of their format
     sequences might not be correct.

     _E_n_d_i_n_g _c_o_m_m_e_n_t_s of _r_o_u_t_i_n_e_s and _c_l_a_s_s_e_s can not be printed
     in _i_t_a_l_i_c_s until now with this version for _S_m_a_l_l_E_i_f_f_e_l. So
     this doesn't conforms to the ETL Appendix A layout guide-
     lines.  This might be corrected in a future release.

     A correct example:

               feature

                  is_break (ch: CHARACTER): BOOLEAN is
                            -- Check if break-character is `ch' <--- (correct
                     do                                          quotes)
                        Result := true
                     end -- is_break



     A wrong example:

               feature
                                                             (wrong quotes)
                  is_break (ch: CHARACTER): BOOLEAN is          |
                        -- Check if break-character is 'ch' <----
                        -- Control characters aren't allowed for `ch`
                     do                           ^                ^
                        Result := false           |                |
                     end -- is_break              |______ (wrong quotes)




BUGS
     _e_s_p_r_e_t_t_y has shure some bugs, the _e_s_p_p shell script  is  (as
     far as I know) bugfree.



AUTHOR
     Valentino Kyriakides































These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.