Updated to dense switches generation
This commit is contained in:
parent
a717832bfb
commit
416944b293
|
@ -6,7 +6,16 @@ LLgen, an extended LL(1) parser generator
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBLLgen\fP
|
\fBLLgen\fP
|
||||||
[
|
[
|
||||||
\fB\-vVxX\fP
|
\fB\-vxjw\fP
|
||||||
|
]
|
||||||
|
[
|
||||||
|
\fB\-m\fP\fInum\fP
|
||||||
|
]
|
||||||
|
[
|
||||||
|
\fB\-l\fP\fInum\fP
|
||||||
|
]
|
||||||
|
[
|
||||||
|
\fB\-h\fP\fInum\fP
|
||||||
]
|
]
|
||||||
file ...
|
file ...
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
@ -62,35 +71,40 @@ an error reporting routine;
|
||||||
by
|
by
|
||||||
\fILLgen\fP.
|
\fILLgen\fP.
|
||||||
.PP
|
.PP
|
||||||
If the
|
\fILLgen\fP accepts the following flags:
|
||||||
\fB\-v\fP
|
.IP \fB\-v\fP
|
||||||
or the
|
create a file called
|
||||||
\fB\-V\fP
|
\fILL.output\fP,
|
||||||
flag is given, the file
|
which contains a description of the conflicts that
|
||||||
\fILL.output\fP
|
|
||||||
is prepared, which contains a description of the conflicts that
|
|
||||||
were not resolved.
|
were not resolved.
|
||||||
If it is given more than once,
|
If the flag is given more than once,
|
||||||
\fILLgen\fP
|
\fILLgen\fP
|
||||||
will be more "verbose".
|
will be more "verbose".
|
||||||
If it is given three times, a complete description of the
|
If it is given three times, a complete description of the
|
||||||
grammar will be supplied.
|
grammar will be supplied.
|
||||||
.PP
|
.IP \fB\-x\fP
|
||||||
If the
|
|
||||||
\fB\-x\fP
|
|
||||||
or the
|
|
||||||
\fB\-X\fP
|
|
||||||
flag is given,
|
|
||||||
the sets that are computed are extended with the nonterminal
|
the sets that are computed are extended with the nonterminal
|
||||||
symbols and these extended sets are also included in the
|
symbols and these extended sets are also included in the
|
||||||
\fILL.output\fP
|
\fILL.output\fP
|
||||||
file.
|
file.
|
||||||
.PP
|
.IP \fB\-w\fP
|
||||||
If the
|
no warnings are given.
|
||||||
\fB\-w\fP
|
.IP \fB\-j\fP
|
||||||
or the
|
when this flag is given, \fILLgen\fP will generate dense switches,
|
||||||
\fB\-W\fP
|
so that the compiler can generate a jump table for it. This will only be
|
||||||
flag is given, no warnings are given.
|
done for switches that have density between
|
||||||
|
\fIlow_percentage\fP and \fIhigh_percentage\fP, as explained below.
|
||||||
|
Usually, compilers generate a jumptable when the density of the switch
|
||||||
|
is above a certain threshold. If you want jump tables in more cases,
|
||||||
|
set \fIhigh_percentage\fP to this threshold, and \fIlow_percentage\fP to
|
||||||
|
a minimum threshold. There is a time-space trade-off here.
|
||||||
|
.IP \fB\-m\fP\fInum\fP
|
||||||
|
minimum number of cases in a switch for the \fB\-j\fP option to be
|
||||||
|
effective. The default value is 8.
|
||||||
|
.IP \fB\-l\fP\fInum\fP
|
||||||
|
The \fIlow_percentage\fP, as described above. Default value is 10.
|
||||||
|
.IP \fB\-h\fP\fInum\fP
|
||||||
|
The \fIhigh_percentage\fP, as described above. Default value is 30.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
LL.output verbose output file
|
LL.output verbose output file
|
||||||
.br
|
.br
|
||||||
|
|
Loading…
Reference in a new issue