-@node q2c Input Format, GNU Free Documentation License, Data File Format, Top
+@node q2c Input Format
@appendix @code{q2c} Input Format
PSPP statistical procedures have a bizarre and somewhat irregular
* Grammar Rules:: Syntax of the grammar rules.
@end menu
-@node Invoking q2c, q2c Input Structure, q2c Input Format, q2c Input Format
+@node Invoking q2c
@section Invoking q2c
@example
output file name, respectively. @code{q2c} does not accept any
command-line options.
-@node q2c Input Structure, Grammar Rules, Invoking q2c, q2c Input Format
+@node q2c Input Structure
@section @code{q2c} Input Structure
@code{q2c} input files are divided into two sections: the grammar rules
@code{string} are used in the grammar rules.
@end table
-@node Grammar Rules, , q2c Input Structure, q2c Input Format
+@node Grammar Rules
@section Grammar Rules
The grammar rules describe the format of the syntax that the parser
The syntax of the grammar rules is as follows:
@example
-grammar-rules ::= ID : subcommands .
+grammar-rules ::= command-name opt-prefix : subcommands .
+command-name ::= ID
+ ::= STRING
+opt-prefix ::=
+ ::= ( ID )
subcommands ::= subcommand
::= subcommands ; subcommand
@end example
-The syntax begins with an ID or STRING token that gives the name of the
-procedure to be parsed. The rest of the syntax consists of subcommands
-separated by semicolons (@samp{;}) and terminated with a full stop
-(@samp{.}).
+The syntax begins with an ID token that gives the name of the
+procedure to be parsed. For command names that contain multiple
+words, a STRING token may be used instead, e.g.@: @samp{"FILE
+HANDLE"}. Optionally, an ID in parentheses specifies a prefix used
+for all file-scope identifiers declared by the emitted code.
+
+The rest of the syntax consists of subcommands separated by semicolons
+(@samp{;}) and terminated with a full stop (@samp{.}).
@example
subcommand ::= default-opt arity-opt ID sbc-defn
sbc-defn ::= opt-prefix = specifiers
::= [ ID ] = array-sbc
::= opt-prefix = sbc-special-form
-opt-prefix ::=
- ::= ( ID )
@end example
A subcommand that begins with an asterisk (@samp{*}) is the default
::= *
setting-value-type ::= N
::= D
+ ::= S
setting-value-restriction ::=
::= , STRING
@end example
Settings may have values. If the value must be enclosed in parentheses,
then enclose the value declaration in parentheses. Declare the setting
-type as @samp{n} or @samp{d} for integer or floating point type,
-respectively. The given @code{ID} is used to construct a variable name.
+type as @samp{n}, @samp{d}, or @samp{s} for integer, floating-point,
+or string type, respectively. The given @code{ID} is used to
+construct a variable name.
If option @samp{*} is given, then the value is optional; otherwise it
must be specified whenever the corresponding setting is specified. A
``restriction'' can also be specified which is a string giving a C