This is espretty.man in view mode; [Download] [Up]
ESPRETTY(1) UNIX Programmer's Manual ESPRETTY(1) NAME espretty - Eiffel source pretty printer SYNOPSIS espretty <filename> [ -lnsux ] [ -t | -2 | -3 | -4 ] [ -ascii | -ansi | -mif | -mime | -rtf ] DESCRIPTION _e_s_p_r_e_t_t_y can be used to produce `pretty-printed' versions of Eiffel class text files and thus make these easier to read. The _e_s_p_r_e_t_t_y program understands a substantial amount about the syntax of Eiffel, but it doesn't make any attempts to cope with incomplete and misformed syntax. However, whenever possible it tries to format the class text according to the layout standards in ETL Appendix A. _e_s_p_r_e_t_t_y parses the Eiffel class file given as an argument and prints the formated result on the standard output. This version for the _S_m_a_l_l_E_i_f_f_e_l compiler of _e_s_p_r_e_t_t_y can only process one file argument per run and has not the ability to read from STDIN (this means you can't pipe in a file). If you want to handle multiple input files at once, you have to use the supplied _e_s_p_p shell script, which is a sort of preprocessor or frontend for _e_s_p_r_e_t_t_y. _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 at once. The program'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_r_e_t_t_y 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 to STDOUT using plain ASCII with no embellishments. _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. _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. Notice that _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. _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. Notice that _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 The output of an input class file appears by default at STDOUT! To write the _e_s_p_r_e_t_t_y output into a file, you have to use STDOUT redirection. For example: espretty class1.e > myclass.e or to append to myclasses.e: espretty class7.e >> myclasses.e or for documentation purposes the short form in RTF format: espretty class1.e -s -rtf > myclass.e espretty class7.e -s -rtf >> myclasses.e Of course there are much more possibilities, try them out. SEE ALSO _e_s_p_p(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'_s argument handler only recorgnizes options if they are listed, after the supplied file argument. For example: espretty -l class.e <--- (wrong) won't work, it has to be called in the following order: espretty class.e -l <--- (correct) AUTHOR Valentino Kyriakides
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.