forked from fesch/Structorizer.Desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Structorizer.1
224 lines (224 loc) · 7.36 KB
/
Structorizer.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
.TH Structorizer 1 "7 August 2019" "version 3.29-13" "User's Manual"
.SH NAME
Structorizer \- Editor for Nassi-Shneiderman diagrams (NSD)
and tool for algorithm design and analysis based on them.
.SH SYNOPSIS
.B Structorizer
[ \fIoptions\fP ]
.RI "[ " input\-file " ] ..."
.br
.B Structorizer \-x \fIgenerator\fP
[ \fIoptions\fP ]
\fIinput\-file\fP ...
.br
.B Structorizer -p
[
.I parser
]
[
\fIoptions\fP
]
\fIsource\-file\fP ...
.br
.B Structorizer \-h
.br
.SH DESCRIPTION
\fBStructorizer\fP can be used as a powerful and easy-to-use interactive
graphical editor for Nassi-Shneiderman diagrams or as a command-line tool
to convert files between the XML-based diagram format and program source code.
.br
With no argument, just an \fB\-s\fP option, and/or a sequence of \fIinput\-file\fP
names as argument, \fBStructorizer\fP will start in interactive mode. It allows
to create, edit, and save algorithm descriptions as Nassi-Shneiderman diagrams.
They may be exported as pictures in various graphics file formats. Adhering to
some syntactic rules, the diagrams may even be executed, debugged, and analysed
(see the home page for a full description of the features and the user interface).
\fBStructorizer\fP can also export the algorithms as program stubs to different
programming languages, and it may import source code of some programming languages
and display the algorithmic conetnt as Nassi-Shneiderman diagram.
.br
Used as a command-line tool, \fBStructorizer\fP either converts saved NSD files
(or ARR or ARRZ files, respecively) to program source in one of several available
programming languages (option \fB\-x\fP) or, conversely, generates NSD files by
parsing source code (option \fB\-p\fP, by now only from Pascal, C, or COBOL sources)
in batch mode.
.br
By default, the resulting file will have the same name as the (first) input file name
but with a different extension (NSD files will have extension .nsd, Pascal source
files extension .p etc.). With option \fB\-o\fP a different output file name may be
specified. By option \fB\-\fP the translation result may be directed to the standard
output instead.
.br
For the conversions the parser preferences configurable in the interactive mode of
\fBStructorizer\fP are relevant, whereas other preferences, particularly the export
options are invalid and may only be controlled by the command line options described
below. Alternatively, a settings file containing the relevant options may be specified
via the \fB\-s\fP option. If both a settings file and specific export switches are
given then the specific switches ovverride the respective settings from the settings file.
.SH OPTIONS
.TP
\fB\-\fP
Write generated program code directly to StdOut instead of eporting it to the default
output file (if \fB-o\fP is also used then the code will be written both to standard
output and to the specified output file). (For export mode.)
.TP
.B \-a
Also export attributes like author, creation date, license. (For export mode only.)
.TP
.B \-b
Place opening braces for a compound instruction block at next line below the keyword. (For export mode only.)
.TP
.B \-c
Simple instructions will be exported as comments. (For export mode only.)
.TP
.BI \-e " encoding"
Select a character encoding for the imported/exported code (default is UTF-8).
.TP
.B \-f
Force overwriting an existing output file with same name (otherwise a new name
will be derived by inserting or appending an integer number to the base name).
.TP
.B \-g
Writes the complete grammar tree of the parsed source file to a text file with
on successful parsing.
.TP
.B \-h
Specifies \fBH\fPelp mode: Give a short help and a list of names of supported
generators and parsers (must be the first and only option in order to work).
.TP
.B \-i
Generate source code in free format (informal) - for languages like COBOL.
(For export mode only.)
.TP
.B \-l
Generate line numbers for BASIC or COBOL export. (For export mode only.)
.TP
.BI \-o " output\-file
Use the given name / path for the output file instead of the default.
(For export or parse mode.)
.TP
\fB\-open\fP
May be used for the interactive mode, preceding the names of the files to be
opened in interactive mode.
(Actually redundant.)
.TP
\fB\-p\fP [ \fIparser\fP ]
Specifies \fBp\fParse mode: Generate an NSD file or an arranger archive file from
source code. This option must be the first argument.
The source language is automatically identified via file the extension if no
\fIparser\fP is specified. If the parser might be ambiguous, then the user is
prompted to choose among the parser candidates. If a parser is specified and
it is valid then this will override all automatic guesses.
.TP 10
Accepted names (case-insensitive) of parsers are:
.RS 3
.B Pascal
.br
.B D7Parser
.br
.B "ANSI-C73"
.br
.B CParser
.br
.B "ANSI-C99"
.br
.B C99Parser
.br
.B COBOL
.br
.B COBOLParser
.RE
.TP
.BI \-s " setting\-file"
Read \fBs\fPettings from the specified property (ini) file. (For interactive,
export, or parsing mode.)
.TP
.B \-t
Export instructions as they are written i.e. nearly without \fBt\fPranslation/interpretation.
(For export mode only.)
.TP
\fB\-v\fP [ \fIlogdir\fP ]
\fBV\fPerbose import: writes a logging file to the specified (or by default the
current) directory during code import.
(For parse mode only.)
.TP
.BI \-x " generator"
Specifies e\fBx\fPport mode: Generate program code for the specified language.
This option must be the first argument.
.TP 10
Accepted names (case-insensitive) of generators are:
.RS 3
.B Pascal
.br
.B Delphi
.br
.B Oberon
.br
.B C
.br
.B "C++"
.br
.B C#
.br
.B Java
.br
.B Perl
.br
.B PHP
.br
.B Python
.br
.B Basic
.br
.B COBOL
.br
.B KSH
.br
.B BASH
.br
.B StrucTeX
.RE
.TP
\fB\-z\fP
Specifies that the resulting diagrams from parsing one source file (may contain
several routines, for each of which a diagram will emerge) are to be compressed
into an \fBarrz\-file\fP rather than be saved as a loose bunch of \fBnsd\-file\fPs.
(For parse mode only.)
.TP
.I arr\-file
An arrangement list file generated by the Arranger component of Structorizer
as a text file listing paths of \fBnsd\-file\fPs. (May be used as consistent input
for code export.)
.TP
.I arrz\-file
An arrangement archive generated by the Arranger component of Structorizer as a
compressed file containing an \fBarr\-file\fP and the referenced \fBnsd\-file\fPs.
(May be used as consistent input for code export or result from source code parsing.)
.TP
.I input\-file
A file of one of the types \fBnsd\-file\fPs, \fBarr\-file\fP, or \fBarrz\-file\fP.
A sequence of files of any of these types can be specified to be opened in interactive
mode or to be translated in export mode.
.TP
.I nsd\-file
A file generated by Structorizer representing a Nassi-Shneiderman diagram as input for \fB-x\fP.
.SS "Supported elements"
Structorizer supports all standard algorithm elements of Nassi-Shneiderman diagrams
(e.g. according to DIN 66261) including Parallel sections (i.e. instructions, alternatives,
case selections, FOOR loops - both as counting and as for-each or for-in loop -, WHILE loops,
REPEAT-UNTIL loops, endless loops, subroutine calls, exit jumps, and parallel sections).
Additionally it supports TRY/CATCH/FINALLY blocks.
.SH "SEE ALSO"
.TP
Website of Structorizer:
https://structorizer.fisch.lu/
.TP
User Guide:
https://help.structorizer.fisch.lu/index.php
.TP
Description of Nassi-Shneiderman diagrams
https://en.wikipedia.org/wiki/Nassi-Shneiderman_diagram
.SH AUTHORS
Bob Fisch and Kay Gürtzig
.SH CONTRIBUTORS
Rolf Schmidt and Simon Sobisch