Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-11 - 43,50544/pretty.h32
There is 1 other file named pretty.h32 in the archive. Click here to see a list.
1 pretty
PRETTY is a utility program which accepts a BLISS  (-16,  -32,  or  -36)
source  file  and  produces  a reformatted source file (and optionally a
specially formatted listing file), using generally  accepted  guidelines
for  formatting rules.  The output file will have all whitespace (except
in strings, macro  definitions,  and  comments)  removed  and  replaced.
Control expressions are indented according to hierarchical structure.

Format:  PRETTY file-spec [,...]

where 'file-spec' is the source file specification.  The default type is
'.BLI'.

The input and output files are BLISS source  files;   the  listing  file
contains  the same data as the output file in an augmented format.  Only
the input file spec is required.

PRETTY must  be  defined  as  a  foreign  command  (preferably  in  your
LOGIN.COM) with a line of the form "PRETTY:==$PRETTY".

2 Parameters

file-spec [,...]

If only the input file spec is given, the only output  will  be  to  the
terminal:   module  and  routine  names plus error messages.  These will
appear only if /LOG has been used.  The default  (/NOLOG)  will  provide
the  user  with  no display other than an informational message if error
messages are discovered during parsing.  Pretty accepts comma lists, but
will not correctly handle the concatenation ('+') character.

2 Qualifiers

/NOLOG (D)

No module  or  routine  names,  or  syntactic  error  messages  will  be
displayed  to the terminal.  If errors are discovered during parsing, an
informational message will be displayed.

/LOG

The current PRETTY version number, module and routine names,  and  error
messages will be displayed on the terminal.

/LISTING [=file-spec] (D= file-spec.LIS)

Note:  Production of  the  listing  file  approximately  doubles  PRETTY
execution time.

/OUTPUT [=file-spec] (D= file-spec.BLI)

The output file-spec designates the new, reformatted source  file.   The
output file will default to the input file.

2 Directives
Formatting options  are  supplied  to  PRETTY  by  means  of  directives
inserted  as full-line comments into the source text.  The comments have
the general form
        !<BLF/directive>        example: !<BLF/remark:9>
where "directive" may be one of the following  (either  lower  or  upper
case may be used):

3 REQUIRE'file-spec'
Accesses the specified file for further options of the following  types.
The specified file must not contain another REQUIRE directive.

3 PAGE
Produces a page break (formfeed) after the comment line.

3 WIDTH:n (D= 110)
Causes the output file line width to be set to "n" columns, where
 71<n<141.

3 REMARK:n (D= 6)
Causes the remark column to be set to 8*n+1, i.e., "n" tabs  are  issued
to place the "!" in the proper column.  The range of n is 2<n<16.

3 NOFORMAT
Inhibits automatic formatting  until  a  PAGE  or  FORMAT  directive  is
encountered.

3 FORMAT (D)
Resumes automatic formatting.

3 NOMACRO (D)
Causes  formatting  of  macro  definitions  to  be  inhibited  until   a
subsequent MACRO directive is found.

3 MACRO
Causes macros to be formatted (which may  cause  error  messages  to  be
issued) until a subsequent NOMACRO directive is found.

3 NOERROR
Inhibits the insertion of error messages into  the  output  files  (they
will appear at the terminal only).

3 ERROR (D)
Resumes the insertion of error messages into the  output  files.   Error
messages are automatically deleted from source files on subsequent runs.

3 LOWERCASE_KEY
Causes BLISS keywords, builtins, and  predeclared  names  to  appear  in
lower case.

3 LOWERCASE_USER
Causes user names to appear in lower case.

3 LOWERCASE
Causes all names and keywords to appear in lower case.

3 UPPERCASE_KEY
Causes BLISS keywords, builtins, and  predeclared  names  to  appear  in
upper case.

3 UPPERCASE_USER
Causes user names to appear in upper case.

3 UPPERCASE
Causes all names and keywords to appear in upper case.

3 NOCASE_KEY
Causes BLISS keywords, builtins, and predeclared names to be left alone.

3 NOCASE_USER
Causes user names to be left alone.

3 NOCASE (D)
Causes all names and keywords to be left alone.

3 SYNONYM name = lexeme lexeme lexeme ...
Allows  PRETTY  to  associate  with  "name"  one  or  more  lexemes  for
formatting  and  syntax  checking.   The  general  use  is  for XPORT or
user-defined BLISS macros in instances where PRETTY would consider  such
macros  syntactically  incorrect.  Subsequent occurrences of "name" will
be treated as if the given  sequence  of  associated  lexemes  had  been
parsed.  The special token "*" can be used to indicate where to position
"name" with regard  to  the  normal  position  of  the  tokens  that  it
replaces.  This is for formatting purposes.  Only "name" will be output.

For example,
    !<BLF/SYNONYM ELIF = ELSE IF * >
permits the sequence
    IF expr THEN expr ELIF expr THEN expr;
to be formatted without error messages.  (The name, ELIF, is output, but
it is parsed and indented as though ELSE IF had been found there.)