The Graphical User Interface for Parafrase-2
A new graphical user interface (GUI) has been designed for Parafrase-2.
This GUI will allow user to configure/save pass files and invoke
Parafrase-2 from a single environment. The GUI is written in the Tcl7.3
scripting language with Tk3.6. It also uses "Embedded Tk" ET1.0.
These file can be found at the following public ftp sites.
- ftp.aud.alcatel.com:/tcl -- official site of Tcl/Tk
- ftp.cs.berkeley.edu:/ucb/tcl -- tcl*.tar.Z and tk*.tar.Z
- ftp.std.com:/pub/drh -- et*.tar.gz
A brief description of the functionality of this GUI is given below.
Main Menu Tool Bar
Editor
- Global Preferences: This menu contains options
which control the Parafrase-2 GUI environment. These options
include positioning of dialogue boxes, scroll bar placement,
printer definition, etc.
- Color Preferences: This menu contains options
which control coloring information, undo levels, etc.
- Mode Preferences: This menu contains options
which are specific to the editor. These options include
line wrapping, font selection, etc.
- Issue Tcl Command: Execute tcl command to
be executed.
- Issue Unix Command: Execute a unix command.
- Quit: Exit from the Parafrase-2 environment.
File
- Load: Loads a file into the editor.
- Save: Saves the current edited file.
- Save as: Saves the current edited file with a given
file name.
- Print: Print the current file to the printer
defined in the Global Preferences menu.
- Insert File: Insert a file at the cursor.
Edit
- Cut: Cut out the highlighted text and put into buffer.
- Copy: Copy the highlighted into buffer.
- Paste: Copy the buffer to the cursor.
- Select All: Highlight all the text.
- Find: Find/Replace a string in the text.
- Find Again: Repeats the find/replacement above.
- Go to Line: Set the cursor to the line specified.
- Show Current Position: Displays the current line
and column numbers.
Pipe
- Format Lines with 'fmt': Format the highlighted lines
with the unix 'fmt' command.
- Indent: Indent the highlighted lines.
- Unindent: Unindent the highlighted text.
- Capitalize: Capitalize the highlighted text.
- Lowercase: Make the highlighted text lower case.
- Toggle Case: Toggle the case of the highlighted text.
- Sort by ASCII Sequence: Sort each line of the
highlighted text its ASCII sequence.
- Sort Numerically: Sort each line of the
highlighted text numerically.
- Sort Alphabetically: Sort each line of the
highlighted text alphabetically.
- Pipe Through ...: Pipe the highlighted text through
a specialized function.
- Insert Output of ...: Insert the output a
unix command.
Passes
- Reset Passes: Remove all the selected passes and
start configuration from scratch.
- Configure Passes: Select passes to include to the
pass list. Also allows for specification of debug value and output
file.
- Show Passes: Show the current configuration of passes
with their corresponding debug value and output file name.
- Save Passes: Save the current configuration of passes
to a file, which will be later be used by Parafrase-2.
Parafrase-2
- Set Binary Directory: The default directory
which contains the Parafrase-2 binaries will be set to the
environment variable P2_BIN. If P2_BIN is not defined, Parafrase-2
will assume that the binaries are on the path. This menu allows
the user to dynamically configure the location of the binaries.
This is done by selecting the binary in the particular directory
which you want to run Parafrase-2 from.
- Set Parafrase-2 Binary Prefix Name: This allows
users to change between different versions of Parafrase-2. All
Parafrase-2 binaries should have the same suffixes ("fpp" for fortran,
"cpp" for K & R C, "acpp" for ANSI C). This option allows the user
to change the prefix of the Parafrase-2 binaries.
Default value
is "p2".
Example: This allows the user to differentiate
between "p2fpp" and "nsfpp".
- Run on Fortran: Run Parafrase-2 on a FORTRAN file.
This option queries the user for the pass file to be used. The user
can either select a pass file from the file manager, or select "Default".
The default pass will be selected from the environment variable
P2LIB. This variable is defined in the file "parafrase2_defaults.h",
which resides in the "include" directory of Parafrase-2.
- Run on K & R C: Same as above, but invokes Parafrase-2
on a K & R C file.
- Run on ANSI C: Same as above, but invokes Parafrase-2
on a ANSI C file.
The authors of Parafrase-2 would like that thank Dr. Mario Furnari for his
assistance in developing the GUI. Also sections of code was written by
Jay Sekora.