+Thu Mar 3 22:06:19 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * configure.ac: Added AC_PROG_RANLIB --- needed by autoconf 1.9
+
Mon Feb 28 23:16:58 2005 Ben Pfaff <blp@gnu.org>
* configure.ac: Check for perl. Check for bool. Substitute
dnl Checks for programs.
AC_GNU_SOURCE
AC_PROG_CC
+AC_PROG_RANLIB
AM_CONDITIONAL(cc_is_gcc, test x"$GCC" = x"yes" )
+Thu Mar 3 22:06:54 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * expressions.texi: corrected some mismatched parentheses.
+
Mon Feb 28 23:19:34 2005 Ben Pfaff <blp@gnu.org>
* expressions.texi: Revise. Describe new functions.
The following continuous distributions are available:
-@deftypefn {Function} {} PDF.BETA (@var{x}
+@deftypefn {Function} {} PDF.BETA (@var{x})
@deftypefnx {Function} {} CDF.BETA (@var{x}, @var{a}, @var{b})
@deftypefnx {Function} {} IDF.BETA (@var{p}, @var{a}, @var{b})
@deftypefnx {Function} {} RV.BETA (@var{a}, @var{b})
The following discrete distributions are available:
-@deftypefn {Function} {} PDF.BERNOULLI (@var{x}
+@deftypefn {Function} {} PDF.BERNOULLI (@var{x})
@deftypefnx {Function} {} CDF.BERNOULLI (@var{x}, @var{p})
@deftypefnx {Function} {} RV.BERNOULLI (@var{p})
Bernoulli distribution with probability of success @var{p}.
msgstr ""
"Project-Id-Version: PSPP 0.3.1\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-02-15 20:42+0800\n"
+"POT-Creation-Date: 2005-03-03 06:08+0800\n"
"PO-Revision-Date: 2004-01-23 13:04+0800\n"
"Last-Translator: John Darrington <john@darrington.wattle.id.au>\n"
"Language-Team: John Darrington <john@darrington.wattle.id.au>\n"
msgid "Arguments to %s must be of same type as source variables."
msgstr ""
-#: src/aggregate.c:476 src/expr-prs.c:627
+#: src/aggregate.c:476
msgid "expecting `)'"
msgstr ""
msgid "Variable %s is %s in target file, but %s in source file."
msgstr ""
-#: src/apply-dict.c:71 src/apply-dict.c:72 src/expr-prs.c:1289
-#: src/expr-prs.c:1305 src/formats.c:96 src/pfm-read.c:609 src/print.c:695
-#: src/sfm-read.c:888 src/sfm-read.c:1017 src/sfm-read.c:1018
+#: src/apply-dict.c:71 src/apply-dict.c:72 src/formats.c:96 src/pfm-read.c:599
+#: src/print.c:695 src/sfm-read.c:882 src/sfm-read.c:1011 src/sfm-read.c:1012
msgid "string"
msgstr ""
-#: src/apply-dict.c:71 src/apply-dict.c:72 src/expr-prs.c:1286
-#: src/expr-prs.c:1303 src/formats.c:96 src/pfm-read.c:609 src/print.c:695
-#: src/sfm-read.c:888 src/sfm-read.c:1017 src/sfm-read.c:1018
+#: src/apply-dict.c:71 src/apply-dict.c:72 src/formats.c:96 src/pfm-read.c:599
+#: src/print.c:695 src/sfm-read.c:882 src/sfm-read.c:1011 src/sfm-read.c:1012
msgid "numeric"
msgstr ""
msgid "Source variable count (%d) does not match target variable count (%d)."
msgstr ""
-#: src/autorecode.c:139 src/command.c:780 src/compute.c:294
+#: src/autorecode.c:139 src/command.c:780 src/compute.c:277
#: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751
#: src/do-if.c:253 src/get.c:406 src/lexer.c:419 src/loop.c:241
#: src/matrix-data.c:527 src/print.c:335 src/print.c:1048 src/recode.c:405
msgid "Duplicate variable name %s among target variables."
msgstr ""
-#: src/casefile.c:189
+#: src/calendar.c:78
+#, c-format
+msgid "Month %d is not in acceptable range of 0 to 13."
+msgstr ""
+
+#: src/calendar.c:86
+#, c-format
+msgid "Day %d is not in acceptable range of 0 to 31."
+msgstr ""
+
+#: src/calendar.c:93
+#, c-format
+msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
+msgstr ""
+
+#: src/casefile.c:190
#, c-format
msgid "%s: Removing temporary file: %s."
msgstr ""
-#: src/casefile.c:336
+#: src/casefile.c:337
#, c-format
msgid "Error writing temporary file: %s."
msgstr ""
-#: src/casefile.c:478
+#: src/casefile.c:479
#, c-format
msgid "%s: Opening temporary file: %s."
msgstr ""
-#: src/casefile.c:504
+#: src/casefile.c:505
#, c-format
msgid "%s: Seeking temporary file: %s."
msgstr ""
-#: src/casefile.c:520
+#: src/casefile.c:521
#, c-format
msgid "%s: Reading temporary file: %s."
msgstr ""
-#: src/casefile.c:523
+#: src/casefile.c:524
#, c-format
msgid "%s: Temporary file ended unexpectedly."
msgstr ""
#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:202
-#: src/set.q:415 src/set.q:417 src/set.q:956
+#: src/set.q:425 src/set.q:427 src/set.q:994
#, c-format
msgid "%s is not yet implemented."
msgstr ""
msgid "This command is not valid in a syntax file."
msgstr ""
-#: src/compute.c:146 src/compute.c:210
+#: src/compute.c:141 src/compute.c:190
#, c-format
msgid ""
"When executing COMPUTE: SYSMIS is not a valid value as an index into vector %"
"s."
msgstr ""
-#: src/compute.c:149 src/compute.c:214
+#: src/compute.c:144 src/compute.c:197
#, c-format
msgid ""
"When executing COMPUTE: %g is not a valid value as an index into vector %s."
msgstr ""
-#: src/compute.c:356
+#: src/compute.c:339
#, c-format
msgid "There is no vector named %s."
msgstr ""
"as big as the number preceding THRU."
msgstr ""
-#: src/data-in.c:69
+#: src/data-in.c:59
msgid "data-file error: "
msgstr ""
-#: src/data-in.c:71
+#: src/data-in.c:61
#, c-format
msgid "(column %d"
msgstr ""
-#: src/data-in.c:73
+#: src/data-in.c:63
#, c-format
msgid "(columns %d-%d"
msgstr ""
-#: src/data-in.c:74
+#: src/data-in.c:64
#, c-format
msgid ", field type %s) "
msgstr ""
-#: src/data-in.c:225
+#: src/data-in.c:223
msgid "Field contents followed by garbage."
msgstr ""
-#: src/data-in.c:258
+#: src/data-in.c:256
msgid "Overflow in floating-point constant."
msgstr ""
-#: src/data-in.c:264
+#: src/data-in.c:262
msgid "Underflow in floating-point constant."
msgstr ""
-#: src/data-in.c:270
+#: src/data-in.c:268
msgid "Field does not form a valid floating-point constant."
msgstr ""
-#: src/data-in.c:296
+#: src/data-in.c:294
msgid "All characters in field must be digits."
msgstr ""
-#: src/data-in.c:321
+#: src/data-in.c:319
msgid "Unrecognized character in field."
msgstr ""
-#: src/data-in.c:339 src/data-in.c:589
+#: src/data-in.c:337 src/data-in.c:587
msgid "Field must have even length."
msgstr ""
-#: src/data-in.c:349 src/data-in.c:599
+#: src/data-in.c:347 src/data-in.c:597
msgid "Field must contain only hex digits."
msgstr ""
-#: src/data-in.c:387
+#: src/data-in.c:385
#, c-format
msgid ""
"Quality of zoned decimal (Z) input format code is suspect. Check your "
"results three times. Report bugs to %s."
msgstr ""
-#: src/data-in.c:399
+#: src/data-in.c:397
msgid "Zoned decimal field contains fewer than 2 characters."
msgstr ""
-#: src/data-in.c:407
+#: src/data-in.c:405
msgid "Bad sign byte in zoned decimal number."
msgstr ""
-#: src/data-in.c:424
+#: src/data-in.c:422
msgid "Format error in zoned decimal number."
msgstr ""
-#: src/data-in.c:438
+#: src/data-in.c:436
msgid "Error in syntax of zoned decimal number."
msgstr ""
-#: src/data-in.c:639
+#: src/data-in.c:637
msgid "Unexpected end of field."
msgstr ""
-#: src/data-in.c:665
+#: src/data-in.c:663
msgid "Digit expected in field."
msgstr ""
-#: src/data-in.c:690
+#: src/data-in.c:688
#, c-format
msgid "Day (%ld) must be between 1 and 31."
msgstr ""
-#: src/data-in.c:715
+#: src/data-in.c:713
msgid "Delimiter expected between fields in date."
msgstr ""
-#: src/data-in.c:812
+#: src/data-in.c:810
#, c-format
msgid "Month (%ld) must be between 1 and 12."
msgstr ""
-#: src/data-in.c:853
+#: src/data-in.c:851
#, c-format
msgid "Month (%s) must be between I and XII."
msgstr ""
-#: src/data-in.c:880
+#: src/data-in.c:878
#, c-format
msgid "Month name (%s...) is too long."
msgstr ""
-#: src/data-in.c:891
+#: src/data-in.c:889
#, c-format
msgid "Bad month name (%s)."
msgstr ""
-#: src/data-in.c:907
+#: src/data-in.c:905
#, c-format
msgid "Year (%ld) must be between 1582 and 19999."
msgstr ""
-#: src/data-in.c:918
+#: src/data-in.c:916
#, c-format
msgid "Trailing garbage \"%s\" following date."
msgstr ""
-#: src/data-in.c:933
+#: src/data-in.c:931
#, c-format
msgid "Julian day (%d) must be between 1 and 366."
msgstr ""
-#: src/data-in.c:945
+#: src/data-in.c:943
#, c-format
msgid "Year (%d) must be between 1582 and 19999."
msgstr ""
-#: src/data-in.c:961
+#: src/data-in.c:959
#, c-format
msgid "Quarter (%ld) must be between 1 and 4."
msgstr ""
-#: src/data-in.c:971
+#: src/data-in.c:969
msgid "`Q' expected between quarter and year."
msgstr ""
-#: src/data-in.c:987
+#: src/data-in.c:985
#, c-format
msgid "Week (%ld) must be between 1 and 53."
msgstr ""
-#: src/data-in.c:998
+#: src/data-in.c:996
msgid "`WK' expected between week and year."
msgstr ""
-#: src/data-in.c:1021
+#: src/data-in.c:1019
msgid "Delimiter expected between fields in time."
msgstr ""
-#: src/data-in.c:1033
+#: src/data-in.c:1031
#, c-format
msgid "Hour (%ld) must be positive."
msgstr ""
-#: src/data-in.c:1045
+#: src/data-in.c:1043
#, c-format
msgid "Minute (%ld) must be between 0 and 59."
msgstr ""
-#: src/data-in.c:1092
+#: src/data-in.c:1090
#, c-format
msgid "Hour (%ld) must be between 0 and 23."
msgstr ""
-#: src/data-in.c:1106 src/data-in.c:1141
+#: src/data-in.c:1104 src/data-in.c:1139
msgid "Day of the week expected in date value."
msgstr ""
-#: src/data-in.c:1192
-msgid "Date is not in valid range between 15 Oct 1582 and 31 Dec 19999."
-msgstr ""
-
-#: src/data-in.c:1514
+#: src/data-in.c:1477
#, c-format
msgid "Field too long (%d characters). Truncated after character %d."
msgstr ""
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
-#: src/data-out.c:235 src/sfm-read.c:432 src/sysfile-info.c:115
+#: src/data-out.c:235 src/sfm-read.c:426 src/sysfile-info.c:115
msgid "Unknown"
msgstr ""
msgid "Number %g too big to fit in field with format Z%d.%d."
msgstr ""
-#: src/data-out.c:867
+#: src/data-out.c:869
#, c-format
msgid "Time value %g too large in magnitude to convert to alphanumeric time."
msgstr ""
-#: src/data-out.c:918
+#: src/data-out.c:920
#, c-format
msgid "Weekday index %f does not lie between 1 and 7."
msgstr ""
-#: src/data-out.c:938
+#: src/data-out.c:940
#, c-format
msgid "Month index %f does not lie between 1 and 12."
msgstr ""
-#: src/data-out.c:1051
+#: src/data-out.c:1053
#, c-format
msgid ""
"Year %d cannot be represented in four digits for output formatting purposes."
msgid "DO IF %d: missing\n"
msgstr ""
-#: src/error.c:117
+#: src/error.c:93
msgid "Terminating NOW due to a fatal error!"
msgstr ""
-#: src/error.c:194
+#: src/error.c:170
msgid "Terminating execution of syntax file due to error."
msgstr ""
-#: src/error.c:196
+#: src/error.c:172
#, c-format
msgid "Errors (%d) exceeds limit (%d)."
msgstr ""
-#: src/error.c:199
+#: src/error.c:175
#, c-format
msgid "Warnings (%d) exceed limit (%d)."
msgstr ""
-#: src/error.c:261
+#: src/error.c:237
msgid "fatal"
msgstr ""
-#: src/error.c:263 src/error.c:270 src/error.c:273 src/expr-prs.c:1280
+#: src/error.c:239 src/error.c:246 src/error.c:249
msgid "error"
msgstr ""
-#: src/error.c:264 src/error.c:271 src/error.c:274
+#: src/error.c:240 src/error.c:247 src/error.c:250
msgid "warning"
msgstr ""
-#: src/error.c:265 src/error.c:275
+#: src/error.c:241 src/error.c:251
msgid "note"
msgstr ""
-#: src/error.c:267 src/error.c:268
+#: src/error.c:243 src/error.c:244
msgid "installation error"
msgstr ""
-#: src/expr-evl.c:635
-msgid "TIME.HMS cannot mix positive and negative in its arguments."
-msgstr ""
-
-#: src/expr-evl.c:699
-#, fuzzy
-msgid "Week argument to WKYR must be in range 0 to 53."
-msgstr "Text colour must be in range 0-15."
-
-#: src/expr-evl.c:850 src/expr-evl.c:906
-msgid "Argument 3 of RINDEX may not be system-missing."
-msgstr ""
-
-#: src/expr-evl.c:860 src/expr-evl.c:916
-msgid ""
-"Argument 3 of RINDEX must be between 1 and the length of argument 2, and it "
-"must evenly divide the length of argument 2."
-msgstr ""
-
-#: src/expr-evl.c:1102
-msgid ""
-"A number being treated as a Boolean in an expression was found to have a "
-"value other than 0 (false), 1 (true), or the system-missing value. The "
-"result was forced to 0."
-msgstr ""
-
-#: src/expr-evl.c:1143
-#, c-format
-msgid ""
-"SYSMIS is not a valid index value for vector %s. The result will be set to "
-"SYSMIS."
-msgstr ""
-
-#: src/expr-evl.c:1147
-#, c-format
-msgid ""
-"%g is not a valid index value for vector %s. The result will be set to "
-"SYSMIS."
-msgstr ""
-
-#: src/expr-evl.c:1166
-#, c-format
-msgid ""
-"SYSMIS is not a valid index value for vector %s. The result will be set to "
-"the empty string."
-msgstr ""
-
-#: src/expr-evl.c:1171
-#, c-format
-msgid ""
-"%g is not a valid index value for vector %s. The result will be set to the "
-"empty string."
-msgstr ""
-
-#: src/expr-opt.c:679
-msgid ""
-"When optimizing a constant expression, an integer that was being used as an "
-"Boolean value was found to have a constant value other than 0, 1, or SYSMIS."
-msgstr ""
-
-#: src/expr-prs.c:138
-msgid ""
-"Type mismatch: expression has string type, but a numeric value is required "
-"here."
-msgstr ""
-
-#: src/expr-prs.c:149
-msgid ""
-"Type mismatch: expression has numeric type, but a string value is required "
-"here."
-msgstr ""
-
-#: src/expr-prs.c:208
-#, c-format
-msgid "Type mismatch: operands of %s operator must be strings."
-msgstr ""
-
-#: src/expr-prs.c:211
-#, c-format
-msgid "Type mismatch: operands of %s operator must be numeric."
-msgstr ""
-
-#: src/expr-prs.c:392
-msgid ""
-"Chaining relational operators (e.g. \"a < b < c\") will not produce the "
-"mathematically expected result. Use the AND logical operator to fix the "
-"problem (e.g. \"a < b AND b < c\"). If chaining is really intended, "
-"parentheses will disable this warning (e.g. \"(a < b) < c\".)"
-msgstr ""
-
-#: src/expr-prs.c:472
-msgid ""
-"The exponentiation operator (\"**\") is left-associative, even though right-"
-"associative semantics are more useful. That is, \"a**b**c\" equals \"(a**b)"
-"**c\", not as \"a**(b**c)\". To disable this warning, insert parentheses."
-msgstr ""
-
-#: src/expr-prs.c:553
-#, c-format
-msgid "Unknown system variable %s."
-msgstr ""
-
-#: src/expr-prs.c:592 src/vars-prs.c:43
-msgid "expecting variable name"
-msgstr ""
-
-#: src/expr-prs.c:635
-msgid "in expression"
-msgstr ""
-
-#: src/expr-prs.c:731
-msgid "Argument 2 to LAG must be a small positive integer constant."
-msgstr ""
-
-#: src/expr-prs.c:812 src/expr-prs.c:851
-#, c-format
-msgid ""
-"Type mismatch in argument %d of %s, which was expected to be of %s type. It "
-"was actually of %s type. "
-msgstr ""
-
-#: src/expr-prs.c:838
-#, c-format
-msgid "%s cannot take Boolean operands."
-msgstr ""
-
-#: src/expr-prs.c:870
-msgid "in function call"
-msgstr ""
-
-#: src/expr-prs.c:884
-msgid "RANGE requires an odd number of arguments, but at least three."
-msgstr ""
-
-#: src/expr-prs.c:894
-#, c-format
-msgid "%s requires at least two arguments."
-msgstr ""
-
-#: src/expr-prs.c:909
-#, c-format
-msgid "%s.%d requires at least %d arguments."
-msgstr ""
-
-#: src/expr-prs.c:974
-#, c-format
-msgid ""
-"Argument %d to CONCAT is type %s. All arguments to CONCAT must be strings."
-msgstr ""
-
-#: src/expr-prs.c:1071
-#, c-format
-msgid ""
-"Argument %d to %s was expected to be of %s type. It was actually of type %s."
-msgstr ""
-
-#: src/expr-prs.c:1088
-#, c-format
-msgid "%s is not a numeric format."
-msgstr ""
-
-#: src/expr-prs.c:1126
-#, c-format
-msgid "Too few arguments to function %s."
-msgstr ""
-
-#: src/expr-prs.c:1159
-#, c-format
-msgid ""
-"Type mismatch in argument %d of %s. A string expression was supplied where "
-"only a numeric expression is allowed."
-msgstr ""
-
-#: src/expr-prs.c:1169
-#, c-format
-msgid "Missing comma following argument %d of %s."
-msgstr ""
-
-#: src/expr-prs.c:1207
-msgid "The index value after a vector name must be numeric."
-msgstr ""
-
-#: src/expr-prs.c:1214
-msgid "`)' expected after a vector index value."
-msgstr ""
-
-#: src/expr-prs.c:1247
-#, c-format
-msgid "There is no function named %s."
-msgstr ""
-
-#: src/expr-prs.c:1252
-#, c-format
-msgid "Function %s may not be given a minimum number of arguments."
-msgstr ""
-
-#: src/expr-prs.c:1261
-#, c-format
-msgid "expecting `)' after %s function"
-msgstr ""
-
-#: src/expr-prs.c:1283
-msgid "Boolean"
-msgstr ""
-
#: src/filename.c:221
#, c-format
msgid "Searching for `%s'..."
msgid "Unexpected end of file reading FLIP temporary file."
msgstr ""
-#: src/format.c:69
+#: src/format.c:70
msgid "X and T format specifiers not allowed here."
msgstr ""
-#: src/format.c:76
+#: src/format.c:78
#, c-format
msgid "%.*s is not a valid data format."
msgstr ""
-#: src/format.c:127
+#: src/format.c:130
#, c-format
msgid "Format %s may not be used as an input format."
msgstr ""
-#: src/format.c:132
+#: src/format.c:136
#, c-format
msgid ""
"Input format %s specifies a bad width %d. Format %s requires a width "
"between %d and %d."
msgstr ""
-#: src/format.c:139
+#: src/format.c:144
#, c-format
msgid ""
"Input format %s specifies an odd width %d, but format %s requires an even "
"width between %d and %d."
msgstr ""
-#: src/format.c:146
+#: src/format.c:152
#, c-format
msgid ""
"Input format %s specifies a bad number of implied decimal places %d. Input "
"format %s allows up to 16 implied decimal places."
msgstr ""
-#: src/format.c:169
+#: src/format.c:176
#, c-format
msgid ""
"Output format %s specifies a bad width %d. Format %s requires a width "
"between %d and %d."
msgstr ""
-#: src/format.c:179
+#: src/format.c:187
#, c-format
msgid ""
"Output format %s requires minimum width %d to allow %d decimal places. Try %"
"s%d.%d instead of %s."
msgstr ""
-#: src/format.c:187
+#: src/format.c:196
#, c-format
msgid ""
"Output format %s specifies an odd width %d, but output format %s requires an "
"even width between %d and %d."
msgstr ""
-#: src/format.c:194
+#: src/format.c:204
#, c-format
msgid ""
"Output format %s specifies a bad number of implied decimal places %d. "
"Output format %s allows a number of implied decimal places between 1 and 16."
msgstr ""
-#: src/format.c:211
+#: src/format.c:221
#, c-format
msgid "Can't display a string variable of width %d with format specifier %s."
msgstr ""
-#: src/format.c:329
+#: src/format.c:340
msgid "Format specifier expected."
msgstr ""
-#: src/format.c:340
+#: src/format.c:352
#, c-format
msgid "Data format %s does not specify a width."
msgstr ""
-#: src/format.c:357
+#: src/format.c:370
#, c-format
msgid "Data format %s is not valid."
msgstr ""
"END INPUT PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:288 src/inpt-pgm.c:418
+#: src/inpt-pgm.c:288 src/inpt-pgm.c:416
msgid ""
"This command may only be executed between INPUT PROGRAM and END INPUT "
"PROGRAM."
msgid "COLUMN subcommand multiply specified."
msgstr ""
-#: src/inpt-pgm.c:391
+#: src/inpt-pgm.c:389
msgid ""
"REREAD: Column numbers must be positive finite numbers. Column set to 1."
msgstr ""
msgid "<ERROR>"
msgstr ""
-#: src/lexer.c:1000 src/pfm-read.c:139 src/repeat.c:214
+#: src/lexer.c:1000 src/pfm-read.c:129 src/repeat.c:214
msgid "Unexpected end of file."
msgstr ""
msgid "Cannot change mode of %s: %s"
msgstr ""
-#: src/pfm-read.c:92
+#: src/pfm-read.c:82
#, c-format
msgid "portable file %s corrupt at offset %ld: "
msgstr ""
-#: src/pfm-read.c:118 src/pfm-write.c:490
+#: src/pfm-read.c:108 src/pfm-write.c:490
#, c-format
msgid "%s: Closing portable file: %s."
msgstr ""
-#: src/pfm-read.c:147
+#: src/pfm-read.c:137
msgid "Bad line end."
msgstr ""
-#: src/pfm-read.c:238
+#: src/pfm-read.c:228
#, c-format
msgid ""
"An error occurred while opening \"%s\" for reading as a portable file: %s."
msgstr ""
-#: src/pfm-read.c:261
+#: src/pfm-read.c:251
msgid "Data record expected."
msgstr ""
-#: src/pfm-read.c:358
+#: src/pfm-read.c:348
msgid "Missing numeric terminator."
msgstr ""
-#: src/pfm-read.c:395
+#: src/pfm-read.c:385
msgid "Bad integer format."
msgstr ""
-#: src/pfm-read.c:424
+#: src/pfm-read.c:414
#, c-format
msgid "Bad string length %d."
msgstr ""
-#: src/pfm-read.c:519
+#: src/pfm-read.c:509
#, c-format
msgid "Bad date string length %d."
msgstr ""
-#: src/pfm-read.c:523
+#: src/pfm-read.c:513
msgid "Bad character in date."
msgstr ""
-#: src/pfm-read.c:543
+#: src/pfm-read.c:533
#, c-format
msgid "Bad time string length %d."
msgstr ""
-#: src/pfm-read.c:547
+#: src/pfm-read.c:537
msgid "Bad character in time."
msgstr ""
-#: src/pfm-read.c:597 src/pfm-read.c:604 src/sfm-read.c:873 src/sfm-read.c:881
+#: src/pfm-read.c:587 src/pfm-read.c:594 src/sfm-read.c:867 src/sfm-read.c:875
#, c-format
msgid "%s: Bad format specifier byte (%d)."
msgstr ""
-#: src/pfm-read.c:606
+#: src/pfm-read.c:596
#, c-format
msgid "%s variable %s has %s format specifier %s."
msgstr ""
-#: src/pfm-read.c:607 src/print.c:607 src/sfm-read.c:886
+#: src/pfm-read.c:597 src/print.c:607 src/sfm-read.c:880
msgid "String"
msgstr ""
-#: src/pfm-read.c:607 src/print.c:607 src/sfm-read.c:886
+#: src/pfm-read.c:597 src/print.c:607 src/sfm-read.c:880
msgid "Numeric"
msgstr ""
-#: src/pfm-read.c:645
+#: src/pfm-read.c:635
msgid "Expected variable count record."
msgstr ""
-#: src/pfm-read.c:649
+#: src/pfm-read.c:639
#, c-format
msgid "Invalid number of variables %d."
msgstr ""
-#: src/pfm-read.c:659
+#: src/pfm-read.c:649
#, c-format
msgid "Unexpected flag value %d."
msgstr ""
-#: src/pfm-read.c:671
+#: src/pfm-read.c:661
#, c-format
msgid "Weight variable name (%s) truncated."
msgstr ""
-#: src/pfm-read.c:686
+#: src/pfm-read.c:676
msgid "Expected variable record."
msgstr ""
-#: src/pfm-read.c:692
+#: src/pfm-read.c:682
#, c-format
msgid "Invalid variable width %d."
msgstr ""
-#: src/pfm-read.c:710
+#: src/pfm-read.c:700
#, c-format
msgid "position %d: Variable name has %u characters."
msgstr ""
-#: src/pfm-read.c:714
+#: src/pfm-read.c:704
#, c-format
msgid "position %d: Variable name begins with invalid character."
msgstr ""
-#: src/pfm-read.c:718
+#: src/pfm-read.c:708
#, c-format
msgid "position %d: Variable name begins with lowercase letter %c."
msgstr ""
-#: src/pfm-read.c:731
+#: src/pfm-read.c:721
#, c-format
msgid "position %d: Variable name character %d is lowercase letter %c."
msgstr ""
-#: src/pfm-read.c:741
+#: src/pfm-read.c:731
#, c-format
msgid "position %d: character `\\%03o' is not valid in a variable name."
msgstr ""
-#: src/pfm-read.c:751
+#: src/pfm-read.c:741
#, c-format
msgid "Duplicate variable name %s."
msgstr ""
-#: src/pfm-read.c:795
+#: src/pfm-read.c:785
#, c-format
msgid "Bad missing values for %s."
msgstr ""
-#: src/pfm-read.c:818
+#: src/pfm-read.c:808
#, c-format
msgid "Weighting variable %s not present in dictionary."
msgstr ""
-#: src/pfm-read.c:889
+#: src/pfm-read.c:879
#, c-format
msgid "Unknown variable %s while parsing value labels."
msgstr ""
-#: src/pfm-read.c:892
+#: src/pfm-read.c:882
#, c-format
msgid ""
"Cannot assign value labels to %s and %s, which have different variable types "
"or widths."
msgstr ""
-#: src/pfm-read.c:925
+#: src/pfm-read.c:915
#, c-format
msgid "Duplicate label for value %g for variable %s."
msgstr ""
-#: src/pfm-read.c:928
+#: src/pfm-read.c:918
#, c-format
msgid "Duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/pfm-read.c:981
+#: src/pfm-read.c:971
msgid "End of file midway through case."
msgstr ""
msgid "Writing %d record(s) to the listing file."
msgstr ""
-#: src/print.c:1095
+#: src/print.c:1091
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr ""
+
+#: src/print.c:1094
#, c-format
-msgid ""
-"The expression on PRINT SPACE evaluated to %d. It's not possible to PRINT "
-"SPACE a negative number of lines."
+msgid "The expression on PRINT SPACE evaluated to %g."
msgstr ""
#: src/recode.c:283
msgid "Only last instance of this command is in effect."
msgstr ""
-#: src/sfm-read.c:140
+#: src/sfm-read.c:130
msgid "corrupt system file: "
msgstr ""
-#: src/sfm-read.c:157 src/sfm-write.c:808
+#: src/sfm-read.c:149 src/sfm-write.c:808
#, c-format
msgid "%s: Closing system file: %s."
msgstr ""
-#: src/sfm-read.c:240
+#: src/sfm-read.c:234
#, c-format
msgid ""
"An error occurred while opening \"%s\" for reading as a system file: %s."
msgstr ""
-#: src/sfm-read.c:258
+#: src/sfm-read.c:252
#, c-format
msgid ""
"%s: Weighting variable may not be a continuation of a long string variable."
msgstr ""
-#: src/sfm-read.c:261
+#: src/sfm-read.c:255
#, c-format
msgid "%s: Weighting variable may not be a string variable."
msgstr ""
-#: src/sfm-read.c:286
+#: src/sfm-read.c:280
#, c-format
msgid ""
"%s: Orphaned variable index record (type 4). Type 4 records must always "
"immediately follow type 3 records."
msgstr ""
-#: src/sfm-read.c:335
+#: src/sfm-read.c:329
#, c-format
msgid "%s: Unrecognized record type 7, subtype %d encountered in system file."
msgstr ""
-#: src/sfm-read.c:360
+#: src/sfm-read.c:354
#, c-format
msgid "%s: Unrecognized record type %d."
msgstr ""
-#: src/sfm-read.c:392
+#: src/sfm-read.c:386
#, c-format
msgid ""
"%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected "
"size %d, count 8."
msgstr ""
-#: src/sfm-read.c:403
+#: src/sfm-read.c:397
#, c-format
msgid ""
"%s: Floating-point representation in system file is not IEEE-754. PSPP "
"cannot convert between floating-point formats."
msgstr ""
-#: src/sfm-read.c:419
+#: src/sfm-read.c:413
#, c-format
msgid ""
"%s: File-indicated endianness (%s) does not match endianness intuited from "
"file header (%s)."
msgstr ""
-#: src/sfm-read.c:422 src/sfm-read.c:423
+#: src/sfm-read.c:416 src/sfm-read.c:417
msgid "big-endian"
msgstr ""
-#: src/sfm-read.c:422 src/sfm-read.c:423
+#: src/sfm-read.c:416 src/sfm-read.c:417
msgid "little-endian"
msgstr ""
-#: src/sfm-read.c:424
+#: src/sfm-read.c:418
msgid "unknown"
msgstr ""
-#: src/sfm-read.c:428
+#: src/sfm-read.c:422
#, c-format
msgid "%s: File-indicated character representation code (%s) is not ASCII."
msgstr ""
-#: src/sfm-read.c:432
+#: src/sfm-read.c:426
msgid "DEC Kanji"
msgstr ""
-#: src/sfm-read.c:448
+#: src/sfm-read.c:442
#, c-format
msgid ""
"%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected "
"size %d, count 8."
msgstr ""
-#: src/sfm-read.c:463
+#: src/sfm-read.c:457
#, c-format
msgid ""
"%s: File-indicated value is different from internal value for at least one "
"%g; LOWEST: %g, %g."
msgstr ""
-#: src/sfm-read.c:490
+#: src/sfm-read.c:484
#, c-format
msgid ""
"%s: Bad magic. Proper system files begin with the four characters `$FL2'. "
"This file will not be read."
msgstr ""
-#: src/sfm-read.c:532
+#: src/sfm-read.c:526
#, c-format
msgid ""
"%s: File layout code has unexpected value %d. Value should be 2, in big-"
"endian or little-endian format."
msgstr ""
-#: src/sfm-read.c:548
+#: src/sfm-read.c:542
#, c-format
msgid "%s: Number of elements per case (%d) is not between 1 and %d."
msgstr ""
-#: src/sfm-read.c:557
+#: src/sfm-read.c:551
#, c-format
msgid ""
"%s: Index of weighting variable (%d) is not between 0 and number of elements "
"per case (%d)."
msgstr ""
-#: src/sfm-read.c:564
+#: src/sfm-read.c:558
#, c-format
msgid "%s: Number of cases in file (%ld) is not between -1 and %d."
msgstr ""
-#: src/sfm-read.c:569
+#: src/sfm-read.c:563
#, c-format
msgid "%s: Compression bias (%g) is not the usual value of 100."
msgstr ""
-#: src/sfm-read.c:662
+#: src/sfm-read.c:656
#, c-format
msgid "%s: position %d: Bad record type (%d); the expected value was 2."
msgstr ""
-#: src/sfm-read.c:672
+#: src/sfm-read.c:666
#, c-format
msgid ""
"%s: position %d: String variable does not have proper number of continuation "
"records."
msgstr ""
-#: src/sfm-read.c:681
+#: src/sfm-read.c:675
#, c-format
msgid "%s: position %d: Superfluous long string continuation record."
msgstr ""
-#: src/sfm-read.c:687
+#: src/sfm-read.c:681
#, c-format
msgid "%s: position %d: Bad variable type code %d."
msgstr ""
-#: src/sfm-read.c:690
+#: src/sfm-read.c:684
#, c-format
msgid "%s: position %d: Variable label indicator field is not 0 or 1."
msgstr ""
-#: src/sfm-read.c:694
+#: src/sfm-read.c:688
#, c-format
msgid ""
"%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3."
msgstr ""
-#: src/sfm-read.c:700
+#: src/sfm-read.c:694
#, c-format
msgid "%s: position %d: Variable name begins with invalid character."
msgstr ""
-#: src/sfm-read.c:704
+#: src/sfm-read.c:698
#, c-format
msgid "%s: position %d: Variable name begins with lowercase letter %c."
msgstr ""
-#: src/sfm-read.c:708
+#: src/sfm-read.c:702
#, c-format
msgid ""
"%s: position %d: Variable name begins with octothorpe (`#'). Scratch "
"variables should not appear in system files."
msgstr ""
-#: src/sfm-read.c:723
+#: src/sfm-read.c:717
#, c-format
msgid "%s: position %d: Variable name character %d is lowercase letter %c."
msgstr ""
-#: src/sfm-read.c:732
+#: src/sfm-read.c:726
#, c-format
msgid ""
"%s: position %d: character `\\%03o' (%c) is not valid in a variable name."
msgstr ""
-#: src/sfm-read.c:741
+#: src/sfm-read.c:735
#, c-format
msgid "%s: Duplicate variable name `%s' within system file."
msgstr ""
-#: src/sfm-read.c:762
+#: src/sfm-read.c:756
#, c-format
msgid "%s: Variable %s indicates variable label of invalid length %d."
msgstr ""
-#: src/sfm-read.c:779
+#: src/sfm-read.c:773
#, c-format
msgid "%s: Long string variable %s may not have missing values."
msgstr ""
-#: src/sfm-read.c:804
+#: src/sfm-read.c:798
#, c-format
msgid ""
"%s: String variable %s may not have missing values specified as a range."
msgstr ""
-#: src/sfm-read.c:852
+#: src/sfm-read.c:846
#, c-format
msgid "%s: Long string continuation records omitted at end of dictionary."
msgstr ""
-#: src/sfm-read.c:856
+#: src/sfm-read.c:850
#, c-format
msgid ""
"%s: System file header indicates %d variable positions but %d were read from "
"file."
msgstr ""
-#: src/sfm-read.c:884
+#: src/sfm-read.c:878
#, c-format
msgid "%s: %s variable %s has %s format specifier %s."
msgstr ""
-#: src/sfm-read.c:963
+#: src/sfm-read.c:957
#, c-format
msgid ""
"%s: Variable index record (type 4) does not immediately follow value label "
"record (type 3) as it should."
msgstr ""
-#: src/sfm-read.c:974
+#: src/sfm-read.c:968
#, c-format
msgid ""
"%s: Number of variables associated with a value label (%d) is not between 1 "
"and the number of variables (%d)."
msgstr ""
-#: src/sfm-read.c:990
+#: src/sfm-read.c:984
#, c-format
msgid ""
"%s: Variable index associated with value label (%d) is not between 1 and the "
"number of values (%d)."
msgstr ""
-#: src/sfm-read.c:997
+#: src/sfm-read.c:991
#, c-format
msgid ""
"%s: Variable index associated with value label (%d) refers to a continuation "
"of a string variable, not to an actual variable."
msgstr ""
-#: src/sfm-read.c:1002
+#: src/sfm-read.c:996
#, c-format
msgid "%s: Value labels are not allowed on long string variables (%s)."
msgstr ""
-#: src/sfm-read.c:1013
+#: src/sfm-read.c:1007
#, c-format
msgid ""
"%s: Variables associated with value label are not all of identical type. "
"Variable %s has %s type, but variable %s has %s type."
msgstr ""
-#: src/sfm-read.c:1054
+#: src/sfm-read.c:1048
#, c-format
msgid "%s: File contains duplicate label for value %g for variable %s."
msgstr ""
-#: src/sfm-read.c:1058
+#: src/sfm-read.c:1052
#, c-format
msgid "%s: File contains duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/sfm-read.c:1093 src/sfm-read.c:1357
+#: src/sfm-read.c:1087 src/sfm-read.c:1351
#, c-format
msgid "%s: Reading system file: %s."
msgstr ""
-#: src/sfm-read.c:1096 src/sfm-read.c:1198 src/sfm-read.c:1240
+#: src/sfm-read.c:1090 src/sfm-read.c:1192 src/sfm-read.c:1234
#, c-format
msgid "%s: Unexpected end of file."
msgstr ""
-#: src/sfm-read.c:1113
+#: src/sfm-read.c:1107
#, c-format
msgid "%s: System file contains multiple type 6 (document) records."
msgstr ""
-#: src/sfm-read.c:1119
+#: src/sfm-read.c:1113
#, c-format
msgid "%s: Number of document lines (%ld) must be greater than 0."
msgstr ""
-#: src/sfm-read.c:1151
+#: src/sfm-read.c:1145
#, c-format
msgid "%s: Error reading file: %s."
msgstr ""
-#: src/sfm-read.c:1188
+#: src/sfm-read.c:1182
#, c-format
msgid "%s: Compressed data is corrupted. Data ends in partial case."
msgstr ""
-#: src/sfm-read.c:1360
+#: src/sfm-read.c:1354
#, c-format
msgid "%s: Partial record at end of system file."
msgstr ""
msgid "Truncating variable label to 255 characters."
msgstr ""
+#: src/vars-prs.c:43
+msgid "expecting variable name"
+msgstr ""
+
#: src/vars-prs.c:49
#, c-format
msgid "%s is not a variable name."
"assumed."
msgstr ""
-#: src/file-handle.q:271
+#: src/file-handle.q:272
#, c-format
msgid "Can't open %s as a %s because it is already open as a %s"
msgstr ""
-#: src/file-handle.q:275
+#: src/file-handle.q:276
#, c-format
msgid "Can't open %s as a %s for %s because it is already open for %s"
msgstr ""
-#: src/file-handle.q:280
+#: src/file-handle.q:281
#, c-format
msgid "Can't re-open %s as a %s for %s"
msgstr ""
-#: src/file-handle.q:332
+#: src/file-handle.q:333
msgid "expecting a file name or handle name"
msgstr ""
msgid "Does not assume equal"
msgstr ""
-#: src/set.q:218 src/set.q:290 src/set.q:333 src/set.q:388 src/set.q:390
-#: src/set.q:392 src/set.q:394 src/set.q:396 src/set.q:398 src/set.q:400
+#: src/set.q:221 src/set.q:300 src/set.q:343 src/set.q:398 src/set.q:400
#: src/set.q:402 src/set.q:404 src/set.q:406 src/set.q:408 src/set.q:410
-#: src/set.q:412 src/set.q:790 src/set.q:871 src/set.q:966
+#: src/set.q:412 src/set.q:414 src/set.q:416 src/set.q:418 src/set.q:420
+#: src/set.q:422 src/set.q:828 src/set.q:909 src/set.q:1004
#, c-format
msgid "%s is obsolete."
msgstr ""
-#: src/set.q:226
+#: src/set.q:229
msgid "LISTING is ON"
msgstr ""
-#: src/set.q:228
+#: src/set.q:231
msgid "LISTING is OFF"
msgstr ""
-#: src/set.q:254
+#: src/set.q:245
+#, c-format
+msgid "EPOCH is %d"
+msgstr ""
+
+#: src/set.q:264
msgid "Journalling is off"
msgstr ""
-#: src/set.q:421
+#: src/set.q:431
msgid ""
"CASE is not implemented and probably won't be. If you care, complain about "
"it."
msgstr ""
-#: src/set.q:426
+#: src/set.q:436
msgid "Active file compression is not yet implemented (and probably won't be)."
msgstr ""
-#: src/set.q:440
+#: src/set.q:450
#, c-format
msgid ""
"CC%c: Length of custom currency string `%s' (%d) exceeds maximum length of "
"16."
msgstr ""
-#: src/set.q:462
+#: src/set.q:472
#, c-format
msgid ""
"CC%c: Custom currency string `%s' does not contain exactly three periods or "
"commas (not both)."
msgstr ""
-#: src/set.q:515
+#: src/set.q:525
msgid "None"
msgstr ""
-#: src/set.q:521
+#: src/set.q:531
msgid "Disabled"
msgstr ""
-#: src/set.q:526
+#: src/set.q:536
msgid "Screen"
msgstr ""
-#: src/set.q:533
+#: src/set.q:543
msgid "Listing"
msgstr ""
-#: src/set.q:540
+#: src/set.q:550
msgid "Other"
msgstr ""
-#: src/set.q:649
+#: src/set.q:659
+msgid "EPOCH must be 1500 or later."
+msgstr ""
+
+#: src/set.q:666
+msgid "expecting AUTOMATIC or year"
+msgstr ""
+
+#: src/set.q:687
msgid "LENGTH must be at least 1."
msgstr ""
-#: src/set.q:688
+#: src/set.q:726
msgid "Missing identifier in RESULTS subcommand."
msgstr ""
-#: src/set.q:699
+#: src/set.q:737
msgid "Unrecognized identifier in RESULTS subcommand."
msgstr ""
-#: src/set.q:736
+#: src/set.q:774
msgid "WIDTH must be at least 1."
msgstr ""
-#: src/set.q:759
+#: src/set.q:797
#, c-format
msgid ""
"FORMAT requires numeric output format as an argument. Specified format %s "
"is of type string."
msgstr ""
-#: src/set.q:803
+#: src/set.q:841
msgid "Text color must be in range 0-15."
msgstr "Text colour must be in range 0-15."
-#: src/set.q:816
+#: src/set.q:854
msgid "Background color must be in range 0-7."
msgstr "Background colour must be in range 0-7."
-#: src/set.q:827
+#: src/set.q:865
msgid "Border color must be in range 0-7."
msgstr "Border colour must be in range 0-7."
-#: src/set.q:883
+#: src/set.q:921
msgid "Lower window color must be between 0 and 6."
msgstr "Lower window colour must be between 0 and 6."
-#: src/set.q:897
+#: src/set.q:935
msgid "Upper window color must be between 0 and 6."
msgstr "Upper window colour must be between 0 and 6."
-#: src/set.q:909
+#: src/set.q:947
msgid "Frame color must be between 0 and 6."
msgstr "Frame colour must be between 0 and 6."
-#: src/set.q:975
+#: src/set.q:1013
msgid "Drive letter expected in WORKDEV subcommand."
msgstr ""
-#: src/set.q:1007
+#: src/set.q:1045
msgid "Specify a terminal type with the TERM environment variable."
msgstr ""
-#: src/set.q:1013
+#: src/set.q:1051
msgid "Could not access the termcap data base."
msgstr ""
-#: src/set.q:1015
+#: src/set.q:1053
#, c-format
msgid "Terminal type `%s' is not defined."
msgstr ""
-#: src/set.q:1073
+#: src/set.q:1111
msgid "data> "
msgstr ""
msgid "%s & %s"
msgstr ""
+#, fuzzy
+#~ msgid "Week argument to WKYR must be in range 0 to 53."
+#~ msgstr "Text colour must be in range 0-15."
+
#, fuzzy
#~ msgid "Percentiles must be between 0 and 100."
#~ msgstr "Frame colour must be between 0 and 6."
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pspp-dev@gnu.org\n"
-"POT-Creation-Date: 2005-02-15 20:42+0800\n"
+"POT-Creation-Date: 2005-03-03 06:08+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "Arguments to %s must be of same type as source variables."
msgstr ""
-#: src/aggregate.c:476 src/expr-prs.c:627
+#: src/aggregate.c:476
msgid "expecting `)'"
msgstr ""
msgid "Variable %s is %s in target file, but %s in source file."
msgstr ""
-#: src/apply-dict.c:71 src/apply-dict.c:72 src/expr-prs.c:1289
-#: src/expr-prs.c:1305 src/formats.c:96 src/pfm-read.c:609 src/print.c:695
-#: src/sfm-read.c:888 src/sfm-read.c:1017 src/sfm-read.c:1018
+#: src/apply-dict.c:71 src/apply-dict.c:72 src/formats.c:96 src/pfm-read.c:599
+#: src/print.c:695 src/sfm-read.c:882 src/sfm-read.c:1011 src/sfm-read.c:1012
msgid "string"
msgstr ""
-#: src/apply-dict.c:71 src/apply-dict.c:72 src/expr-prs.c:1286
-#: src/expr-prs.c:1303 src/formats.c:96 src/pfm-read.c:609 src/print.c:695
-#: src/sfm-read.c:888 src/sfm-read.c:1017 src/sfm-read.c:1018
+#: src/apply-dict.c:71 src/apply-dict.c:72 src/formats.c:96 src/pfm-read.c:599
+#: src/print.c:695 src/sfm-read.c:882 src/sfm-read.c:1011 src/sfm-read.c:1012
msgid "numeric"
msgstr ""
msgid "Source variable count (%d) does not match target variable count (%d)."
msgstr ""
-#: src/autorecode.c:139 src/command.c:780 src/compute.c:294
+#: src/autorecode.c:139 src/command.c:780 src/compute.c:277
#: src/data-list.c:410 src/data-list.c:900 src/data-list.c:1751
#: src/do-if.c:253 src/get.c:406 src/lexer.c:419 src/loop.c:241
#: src/matrix-data.c:527 src/print.c:335 src/print.c:1048 src/recode.c:405
msgid "Duplicate variable name %s among target variables."
msgstr ""
-#: src/casefile.c:189
+#: src/calendar.c:78
+#, c-format
+msgid "Month %d is not in acceptable range of 0 to 13."
+msgstr ""
+
+#: src/calendar.c:86
+#, c-format
+msgid "Day %d is not in acceptable range of 0 to 31."
+msgstr ""
+
+#: src/calendar.c:93
+#, c-format
+msgid "Date %04d-%d-%d is before the earliest acceptable date of 1582-10-15."
+msgstr ""
+
+#: src/casefile.c:190
#, c-format
msgid "%s: Removing temporary file: %s."
msgstr ""
-#: src/casefile.c:336
+#: src/casefile.c:337
#, c-format
msgid "Error writing temporary file: %s."
msgstr ""
-#: src/casefile.c:478
+#: src/casefile.c:479
#, c-format
msgid "%s: Opening temporary file: %s."
msgstr ""
-#: src/casefile.c:504
+#: src/casefile.c:505
#, c-format
msgid "%s: Seeking temporary file: %s."
msgstr ""
-#: src/casefile.c:520
+#: src/casefile.c:521
#, c-format
msgid "%s: Reading temporary file: %s."
msgstr ""
-#: src/casefile.c:523
+#: src/casefile.c:524
#, c-format
msgid "%s: Temporary file ended unexpectedly."
msgstr ""
#: src/cmdline.c:142 src/cmdline.c:161 src/cmdline.c:173 src/command.c:202
-#: src/set.q:415 src/set.q:417 src/set.q:956
+#: src/set.q:425 src/set.q:427 src/set.q:994
#, c-format
msgid "%s is not yet implemented."
msgstr ""
msgid "This command is not valid in a syntax file."
msgstr ""
-#: src/compute.c:146 src/compute.c:210
+#: src/compute.c:141 src/compute.c:190
#, c-format
msgid ""
"When executing COMPUTE: SYSMIS is not a valid value as an index into vector %"
"s."
msgstr ""
-#: src/compute.c:149 src/compute.c:214
+#: src/compute.c:144 src/compute.c:197
#, c-format
msgid ""
"When executing COMPUTE: %g is not a valid value as an index into vector %s."
msgstr ""
-#: src/compute.c:356
+#: src/compute.c:339
#, c-format
msgid "There is no vector named %s."
msgstr ""
"as big as the number preceding THRU."
msgstr ""
-#: src/data-in.c:69
+#: src/data-in.c:59
msgid "data-file error: "
msgstr ""
-#: src/data-in.c:71
+#: src/data-in.c:61
#, c-format
msgid "(column %d"
msgstr ""
-#: src/data-in.c:73
+#: src/data-in.c:63
#, c-format
msgid "(columns %d-%d"
msgstr ""
-#: src/data-in.c:74
+#: src/data-in.c:64
#, c-format
msgid ", field type %s) "
msgstr ""
-#: src/data-in.c:225
+#: src/data-in.c:223
msgid "Field contents followed by garbage."
msgstr ""
-#: src/data-in.c:258
+#: src/data-in.c:256
msgid "Overflow in floating-point constant."
msgstr ""
-#: src/data-in.c:264
+#: src/data-in.c:262
msgid "Underflow in floating-point constant."
msgstr ""
-#: src/data-in.c:270
+#: src/data-in.c:268
msgid "Field does not form a valid floating-point constant."
msgstr ""
-#: src/data-in.c:296
+#: src/data-in.c:294
msgid "All characters in field must be digits."
msgstr ""
-#: src/data-in.c:321
+#: src/data-in.c:319
msgid "Unrecognized character in field."
msgstr ""
-#: src/data-in.c:339 src/data-in.c:589
+#: src/data-in.c:337 src/data-in.c:587
msgid "Field must have even length."
msgstr ""
-#: src/data-in.c:349 src/data-in.c:599
+#: src/data-in.c:347 src/data-in.c:597
msgid "Field must contain only hex digits."
msgstr ""
-#: src/data-in.c:387
+#: src/data-in.c:385
#, c-format
msgid ""
"Quality of zoned decimal (Z) input format code is suspect. Check your "
"results three times. Report bugs to %s."
msgstr ""
-#: src/data-in.c:399
+#: src/data-in.c:397
msgid "Zoned decimal field contains fewer than 2 characters."
msgstr ""
-#: src/data-in.c:407
+#: src/data-in.c:405
msgid "Bad sign byte in zoned decimal number."
msgstr ""
-#: src/data-in.c:424
+#: src/data-in.c:422
msgid "Format error in zoned decimal number."
msgstr ""
-#: src/data-in.c:438
+#: src/data-in.c:436
msgid "Error in syntax of zoned decimal number."
msgstr ""
-#: src/data-in.c:639
+#: src/data-in.c:637
msgid "Unexpected end of field."
msgstr ""
-#: src/data-in.c:665
+#: src/data-in.c:663
msgid "Digit expected in field."
msgstr ""
-#: src/data-in.c:690
+#: src/data-in.c:688
#, c-format
msgid "Day (%ld) must be between 1 and 31."
msgstr ""
-#: src/data-in.c:715
+#: src/data-in.c:713
msgid "Delimiter expected between fields in date."
msgstr ""
-#: src/data-in.c:812
+#: src/data-in.c:810
#, c-format
msgid "Month (%ld) must be between 1 and 12."
msgstr ""
-#: src/data-in.c:853
+#: src/data-in.c:851
#, c-format
msgid "Month (%s) must be between I and XII."
msgstr ""
-#: src/data-in.c:880
+#: src/data-in.c:878
#, c-format
msgid "Month name (%s...) is too long."
msgstr ""
-#: src/data-in.c:891
+#: src/data-in.c:889
#, c-format
msgid "Bad month name (%s)."
msgstr ""
-#: src/data-in.c:907
+#: src/data-in.c:905
#, c-format
msgid "Year (%ld) must be between 1582 and 19999."
msgstr ""
-#: src/data-in.c:918
+#: src/data-in.c:916
#, c-format
msgid "Trailing garbage \"%s\" following date."
msgstr ""
-#: src/data-in.c:933
+#: src/data-in.c:931
#, c-format
msgid "Julian day (%d) must be between 1 and 366."
msgstr ""
-#: src/data-in.c:945
+#: src/data-in.c:943
#, c-format
msgid "Year (%d) must be between 1582 and 19999."
msgstr ""
-#: src/data-in.c:961
+#: src/data-in.c:959
#, c-format
msgid "Quarter (%ld) must be between 1 and 4."
msgstr ""
-#: src/data-in.c:971
+#: src/data-in.c:969
msgid "`Q' expected between quarter and year."
msgstr ""
-#: src/data-in.c:987
+#: src/data-in.c:985
#, c-format
msgid "Week (%ld) must be between 1 and 53."
msgstr ""
-#: src/data-in.c:998
+#: src/data-in.c:996
msgid "`WK' expected between week and year."
msgstr ""
-#: src/data-in.c:1021
+#: src/data-in.c:1019
msgid "Delimiter expected between fields in time."
msgstr ""
-#: src/data-in.c:1033
+#: src/data-in.c:1031
#, c-format
msgid "Hour (%ld) must be positive."
msgstr ""
-#: src/data-in.c:1045
+#: src/data-in.c:1043
#, c-format
msgid "Minute (%ld) must be between 0 and 59."
msgstr ""
-#: src/data-in.c:1092
+#: src/data-in.c:1090
#, c-format
msgid "Hour (%ld) must be between 0 and 23."
msgstr ""
-#: src/data-in.c:1106 src/data-in.c:1141
+#: src/data-in.c:1104 src/data-in.c:1139
msgid "Day of the week expected in date value."
msgstr ""
-#: src/data-in.c:1192
-msgid "Date is not in valid range between 15 Oct 1582 and 31 Dec 19999."
-msgstr ""
-
-#: src/data-in.c:1514
+#: src/data-in.c:1477
#, c-format
msgid "Field too long (%d characters). Truncated after character %d."
msgstr ""
msgid "Unexpected end of file with %d repetitions remaining out of %d."
msgstr ""
-#: src/data-out.c:235 src/sfm-read.c:432 src/sysfile-info.c:115
+#: src/data-out.c:235 src/sfm-read.c:426 src/sysfile-info.c:115
msgid "Unknown"
msgstr ""
msgid "Number %g too big to fit in field with format Z%d.%d."
msgstr ""
-#: src/data-out.c:867
+#: src/data-out.c:869
#, c-format
msgid "Time value %g too large in magnitude to convert to alphanumeric time."
msgstr ""
-#: src/data-out.c:918
+#: src/data-out.c:920
#, c-format
msgid "Weekday index %f does not lie between 1 and 7."
msgstr ""
-#: src/data-out.c:938
+#: src/data-out.c:940
#, c-format
msgid "Month index %f does not lie between 1 and 12."
msgstr ""
-#: src/data-out.c:1051
+#: src/data-out.c:1053
#, c-format
msgid ""
"Year %d cannot be represented in four digits for output formatting purposes."
msgid "DO IF %d: missing\n"
msgstr ""
-#: src/error.c:117
+#: src/error.c:93
msgid "Terminating NOW due to a fatal error!"
msgstr ""
-#: src/error.c:194
+#: src/error.c:170
msgid "Terminating execution of syntax file due to error."
msgstr ""
-#: src/error.c:196
+#: src/error.c:172
#, c-format
msgid "Errors (%d) exceeds limit (%d)."
msgstr ""
-#: src/error.c:199
+#: src/error.c:175
#, c-format
msgid "Warnings (%d) exceed limit (%d)."
msgstr ""
-#: src/error.c:261
+#: src/error.c:237
msgid "fatal"
msgstr ""
-#: src/error.c:263 src/error.c:270 src/error.c:273 src/expr-prs.c:1280
+#: src/error.c:239 src/error.c:246 src/error.c:249
msgid "error"
msgstr ""
-#: src/error.c:264 src/error.c:271 src/error.c:274
+#: src/error.c:240 src/error.c:247 src/error.c:250
msgid "warning"
msgstr ""
-#: src/error.c:265 src/error.c:275
+#: src/error.c:241 src/error.c:251
msgid "note"
msgstr ""
-#: src/error.c:267 src/error.c:268
+#: src/error.c:243 src/error.c:244
msgid "installation error"
msgstr ""
-#: src/expr-evl.c:635
-msgid "TIME.HMS cannot mix positive and negative in its arguments."
-msgstr ""
-
-#: src/expr-evl.c:699
-msgid "Week argument to WKYR must be in range 0 to 53."
-msgstr ""
-
-#: src/expr-evl.c:850 src/expr-evl.c:906
-msgid "Argument 3 of RINDEX may not be system-missing."
-msgstr ""
-
-#: src/expr-evl.c:860 src/expr-evl.c:916
-msgid ""
-"Argument 3 of RINDEX must be between 1 and the length of argument 2, and it "
-"must evenly divide the length of argument 2."
-msgstr ""
-
-#: src/expr-evl.c:1102
-msgid ""
-"A number being treated as a Boolean in an expression was found to have a "
-"value other than 0 (false), 1 (true), or the system-missing value. The "
-"result was forced to 0."
-msgstr ""
-
-#: src/expr-evl.c:1143
-#, c-format
-msgid ""
-"SYSMIS is not a valid index value for vector %s. The result will be set to "
-"SYSMIS."
-msgstr ""
-
-#: src/expr-evl.c:1147
-#, c-format
-msgid ""
-"%g is not a valid index value for vector %s. The result will be set to "
-"SYSMIS."
-msgstr ""
-
-#: src/expr-evl.c:1166
-#, c-format
-msgid ""
-"SYSMIS is not a valid index value for vector %s. The result will be set to "
-"the empty string."
-msgstr ""
-
-#: src/expr-evl.c:1171
-#, c-format
-msgid ""
-"%g is not a valid index value for vector %s. The result will be set to the "
-"empty string."
-msgstr ""
-
-#: src/expr-opt.c:679
-msgid ""
-"When optimizing a constant expression, an integer that was being used as an "
-"Boolean value was found to have a constant value other than 0, 1, or SYSMIS."
-msgstr ""
-
-#: src/expr-prs.c:138
-msgid ""
-"Type mismatch: expression has string type, but a numeric value is required "
-"here."
-msgstr ""
-
-#: src/expr-prs.c:149
-msgid ""
-"Type mismatch: expression has numeric type, but a string value is required "
-"here."
-msgstr ""
-
-#: src/expr-prs.c:208
-#, c-format
-msgid "Type mismatch: operands of %s operator must be strings."
-msgstr ""
-
-#: src/expr-prs.c:211
-#, c-format
-msgid "Type mismatch: operands of %s operator must be numeric."
-msgstr ""
-
-#: src/expr-prs.c:392
-msgid ""
-"Chaining relational operators (e.g. \"a < b < c\") will not produce the "
-"mathematically expected result. Use the AND logical operator to fix the "
-"problem (e.g. \"a < b AND b < c\"). If chaining is really intended, "
-"parentheses will disable this warning (e.g. \"(a < b) < c\".)"
-msgstr ""
-
-#: src/expr-prs.c:472
-msgid ""
-"The exponentiation operator (\"**\") is left-associative, even though right-"
-"associative semantics are more useful. That is, \"a**b**c\" equals \"(a**b)"
-"**c\", not as \"a**(b**c)\". To disable this warning, insert parentheses."
-msgstr ""
-
-#: src/expr-prs.c:553
-#, c-format
-msgid "Unknown system variable %s."
-msgstr ""
-
-#: src/expr-prs.c:592 src/vars-prs.c:43
-msgid "expecting variable name"
-msgstr ""
-
-#: src/expr-prs.c:635
-msgid "in expression"
-msgstr ""
-
-#: src/expr-prs.c:731
-msgid "Argument 2 to LAG must be a small positive integer constant."
-msgstr ""
-
-#: src/expr-prs.c:812 src/expr-prs.c:851
-#, c-format
-msgid ""
-"Type mismatch in argument %d of %s, which was expected to be of %s type. It "
-"was actually of %s type. "
-msgstr ""
-
-#: src/expr-prs.c:838
-#, c-format
-msgid "%s cannot take Boolean operands."
-msgstr ""
-
-#: src/expr-prs.c:870
-msgid "in function call"
-msgstr ""
-
-#: src/expr-prs.c:884
-msgid "RANGE requires an odd number of arguments, but at least three."
-msgstr ""
-
-#: src/expr-prs.c:894
-#, c-format
-msgid "%s requires at least two arguments."
-msgstr ""
-
-#: src/expr-prs.c:909
-#, c-format
-msgid "%s.%d requires at least %d arguments."
-msgstr ""
-
-#: src/expr-prs.c:974
-#, c-format
-msgid ""
-"Argument %d to CONCAT is type %s. All arguments to CONCAT must be strings."
-msgstr ""
-
-#: src/expr-prs.c:1071
-#, c-format
-msgid ""
-"Argument %d to %s was expected to be of %s type. It was actually of type %s."
-msgstr ""
-
-#: src/expr-prs.c:1088
-#, c-format
-msgid "%s is not a numeric format."
-msgstr ""
-
-#: src/expr-prs.c:1126
-#, c-format
-msgid "Too few arguments to function %s."
-msgstr ""
-
-#: src/expr-prs.c:1159
-#, c-format
-msgid ""
-"Type mismatch in argument %d of %s. A string expression was supplied where "
-"only a numeric expression is allowed."
-msgstr ""
-
-#: src/expr-prs.c:1169
-#, c-format
-msgid "Missing comma following argument %d of %s."
-msgstr ""
-
-#: src/expr-prs.c:1207
-msgid "The index value after a vector name must be numeric."
-msgstr ""
-
-#: src/expr-prs.c:1214
-msgid "`)' expected after a vector index value."
-msgstr ""
-
-#: src/expr-prs.c:1247
-#, c-format
-msgid "There is no function named %s."
-msgstr ""
-
-#: src/expr-prs.c:1252
-#, c-format
-msgid "Function %s may not be given a minimum number of arguments."
-msgstr ""
-
-#: src/expr-prs.c:1261
-#, c-format
-msgid "expecting `)' after %s function"
-msgstr ""
-
-#: src/expr-prs.c:1283
-msgid "Boolean"
-msgstr ""
-
#: src/filename.c:221
#, c-format
msgid "Searching for `%s'..."
msgid "Unexpected end of file reading FLIP temporary file."
msgstr ""
-#: src/format.c:69
+#: src/format.c:70
msgid "X and T format specifiers not allowed here."
msgstr ""
-#: src/format.c:76
+#: src/format.c:78
#, c-format
msgid "%.*s is not a valid data format."
msgstr ""
-#: src/format.c:127
+#: src/format.c:130
#, c-format
msgid "Format %s may not be used as an input format."
msgstr ""
-#: src/format.c:132
+#: src/format.c:136
#, c-format
msgid ""
"Input format %s specifies a bad width %d. Format %s requires a width "
"between %d and %d."
msgstr ""
-#: src/format.c:139
+#: src/format.c:144
#, c-format
msgid ""
"Input format %s specifies an odd width %d, but format %s requires an even "
"width between %d and %d."
msgstr ""
-#: src/format.c:146
+#: src/format.c:152
#, c-format
msgid ""
"Input format %s specifies a bad number of implied decimal places %d. Input "
"format %s allows up to 16 implied decimal places."
msgstr ""
-#: src/format.c:169
+#: src/format.c:176
#, c-format
msgid ""
"Output format %s specifies a bad width %d. Format %s requires a width "
"between %d and %d."
msgstr ""
-#: src/format.c:179
+#: src/format.c:187
#, c-format
msgid ""
"Output format %s requires minimum width %d to allow %d decimal places. Try %"
"s%d.%d instead of %s."
msgstr ""
-#: src/format.c:187
+#: src/format.c:196
#, c-format
msgid ""
"Output format %s specifies an odd width %d, but output format %s requires an "
"even width between %d and %d."
msgstr ""
-#: src/format.c:194
+#: src/format.c:204
#, c-format
msgid ""
"Output format %s specifies a bad number of implied decimal places %d. "
"Output format %s allows a number of implied decimal places between 1 and 16."
msgstr ""
-#: src/format.c:211
+#: src/format.c:221
#, c-format
msgid "Can't display a string variable of width %d with format specifier %s."
msgstr ""
-#: src/format.c:329
+#: src/format.c:340
msgid "Format specifier expected."
msgstr ""
-#: src/format.c:340
+#: src/format.c:352
#, c-format
msgid "Data format %s does not specify a width."
msgstr ""
-#: src/format.c:357
+#: src/format.c:370
#, c-format
msgid "Data format %s is not valid."
msgstr ""
"END INPUT PROGRAM."
msgstr ""
-#: src/inpt-pgm.c:288 src/inpt-pgm.c:418
+#: src/inpt-pgm.c:288 src/inpt-pgm.c:416
msgid ""
"This command may only be executed between INPUT PROGRAM and END INPUT "
"PROGRAM."
msgid "COLUMN subcommand multiply specified."
msgstr ""
-#: src/inpt-pgm.c:391
+#: src/inpt-pgm.c:389
msgid ""
"REREAD: Column numbers must be positive finite numbers. Column set to 1."
msgstr ""
msgid "<ERROR>"
msgstr ""
-#: src/lexer.c:1000 src/pfm-read.c:139 src/repeat.c:214
+#: src/lexer.c:1000 src/pfm-read.c:129 src/repeat.c:214
msgid "Unexpected end of file."
msgstr ""
msgid "Cannot change mode of %s: %s"
msgstr ""
-#: src/pfm-read.c:92
+#: src/pfm-read.c:82
#, c-format
msgid "portable file %s corrupt at offset %ld: "
msgstr ""
-#: src/pfm-read.c:118 src/pfm-write.c:490
+#: src/pfm-read.c:108 src/pfm-write.c:490
#, c-format
msgid "%s: Closing portable file: %s."
msgstr ""
-#: src/pfm-read.c:147
+#: src/pfm-read.c:137
msgid "Bad line end."
msgstr ""
-#: src/pfm-read.c:238
+#: src/pfm-read.c:228
#, c-format
msgid ""
"An error occurred while opening \"%s\" for reading as a portable file: %s."
msgstr ""
-#: src/pfm-read.c:261
+#: src/pfm-read.c:251
msgid "Data record expected."
msgstr ""
-#: src/pfm-read.c:358
+#: src/pfm-read.c:348
msgid "Missing numeric terminator."
msgstr ""
-#: src/pfm-read.c:395
+#: src/pfm-read.c:385
msgid "Bad integer format."
msgstr ""
-#: src/pfm-read.c:424
+#: src/pfm-read.c:414
#, c-format
msgid "Bad string length %d."
msgstr ""
-#: src/pfm-read.c:519
+#: src/pfm-read.c:509
#, c-format
msgid "Bad date string length %d."
msgstr ""
-#: src/pfm-read.c:523
+#: src/pfm-read.c:513
msgid "Bad character in date."
msgstr ""
-#: src/pfm-read.c:543
+#: src/pfm-read.c:533
#, c-format
msgid "Bad time string length %d."
msgstr ""
-#: src/pfm-read.c:547
+#: src/pfm-read.c:537
msgid "Bad character in time."
msgstr ""
-#: src/pfm-read.c:597 src/pfm-read.c:604 src/sfm-read.c:873 src/sfm-read.c:881
+#: src/pfm-read.c:587 src/pfm-read.c:594 src/sfm-read.c:867 src/sfm-read.c:875
#, c-format
msgid "%s: Bad format specifier byte (%d)."
msgstr ""
-#: src/pfm-read.c:606
+#: src/pfm-read.c:596
#, c-format
msgid "%s variable %s has %s format specifier %s."
msgstr ""
-#: src/pfm-read.c:607 src/print.c:607 src/sfm-read.c:886
+#: src/pfm-read.c:597 src/print.c:607 src/sfm-read.c:880
msgid "String"
msgstr ""
-#: src/pfm-read.c:607 src/print.c:607 src/sfm-read.c:886
+#: src/pfm-read.c:597 src/print.c:607 src/sfm-read.c:880
msgid "Numeric"
msgstr ""
-#: src/pfm-read.c:645
+#: src/pfm-read.c:635
msgid "Expected variable count record."
msgstr ""
-#: src/pfm-read.c:649
+#: src/pfm-read.c:639
#, c-format
msgid "Invalid number of variables %d."
msgstr ""
-#: src/pfm-read.c:659
+#: src/pfm-read.c:649
#, c-format
msgid "Unexpected flag value %d."
msgstr ""
-#: src/pfm-read.c:671
+#: src/pfm-read.c:661
#, c-format
msgid "Weight variable name (%s) truncated."
msgstr ""
-#: src/pfm-read.c:686
+#: src/pfm-read.c:676
msgid "Expected variable record."
msgstr ""
-#: src/pfm-read.c:692
+#: src/pfm-read.c:682
#, c-format
msgid "Invalid variable width %d."
msgstr ""
-#: src/pfm-read.c:710
+#: src/pfm-read.c:700
#, c-format
msgid "position %d: Variable name has %u characters."
msgstr ""
-#: src/pfm-read.c:714
+#: src/pfm-read.c:704
#, c-format
msgid "position %d: Variable name begins with invalid character."
msgstr ""
-#: src/pfm-read.c:718
+#: src/pfm-read.c:708
#, c-format
msgid "position %d: Variable name begins with lowercase letter %c."
msgstr ""
-#: src/pfm-read.c:731
+#: src/pfm-read.c:721
#, c-format
msgid "position %d: Variable name character %d is lowercase letter %c."
msgstr ""
-#: src/pfm-read.c:741
+#: src/pfm-read.c:731
#, c-format
msgid "position %d: character `\\%03o' is not valid in a variable name."
msgstr ""
-#: src/pfm-read.c:751
+#: src/pfm-read.c:741
#, c-format
msgid "Duplicate variable name %s."
msgstr ""
-#: src/pfm-read.c:795
+#: src/pfm-read.c:785
#, c-format
msgid "Bad missing values for %s."
msgstr ""
-#: src/pfm-read.c:818
+#: src/pfm-read.c:808
#, c-format
msgid "Weighting variable %s not present in dictionary."
msgstr ""
-#: src/pfm-read.c:889
+#: src/pfm-read.c:879
#, c-format
msgid "Unknown variable %s while parsing value labels."
msgstr ""
-#: src/pfm-read.c:892
+#: src/pfm-read.c:882
#, c-format
msgid ""
"Cannot assign value labels to %s and %s, which have different variable types "
"or widths."
msgstr ""
-#: src/pfm-read.c:925
+#: src/pfm-read.c:915
#, c-format
msgid "Duplicate label for value %g for variable %s."
msgstr ""
-#: src/pfm-read.c:928
+#: src/pfm-read.c:918
#, c-format
msgid "Duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/pfm-read.c:981
+#: src/pfm-read.c:971
msgid "End of file midway through case."
msgstr ""
msgid "Writing %d record(s) to the listing file."
msgstr ""
-#: src/print.c:1095
+#: src/print.c:1091
+msgid "The expression on PRINT SPACE evaluated to the system-missing value."
+msgstr ""
+
+#: src/print.c:1094
#, c-format
-msgid ""
-"The expression on PRINT SPACE evaluated to %d. It's not possible to PRINT "
-"SPACE a negative number of lines."
+msgid "The expression on PRINT SPACE evaluated to %g."
msgstr ""
#: src/recode.c:283
msgid "Only last instance of this command is in effect."
msgstr ""
-#: src/sfm-read.c:140
+#: src/sfm-read.c:130
msgid "corrupt system file: "
msgstr ""
-#: src/sfm-read.c:157 src/sfm-write.c:808
+#: src/sfm-read.c:149 src/sfm-write.c:808
#, c-format
msgid "%s: Closing system file: %s."
msgstr ""
-#: src/sfm-read.c:240
+#: src/sfm-read.c:234
#, c-format
msgid ""
"An error occurred while opening \"%s\" for reading as a system file: %s."
msgstr ""
-#: src/sfm-read.c:258
+#: src/sfm-read.c:252
#, c-format
msgid ""
"%s: Weighting variable may not be a continuation of a long string variable."
msgstr ""
-#: src/sfm-read.c:261
+#: src/sfm-read.c:255
#, c-format
msgid "%s: Weighting variable may not be a string variable."
msgstr ""
-#: src/sfm-read.c:286
+#: src/sfm-read.c:280
#, c-format
msgid ""
"%s: Orphaned variable index record (type 4). Type 4 records must always "
"immediately follow type 3 records."
msgstr ""
-#: src/sfm-read.c:335
+#: src/sfm-read.c:329
#, c-format
msgid "%s: Unrecognized record type 7, subtype %d encountered in system file."
msgstr ""
-#: src/sfm-read.c:360
+#: src/sfm-read.c:354
#, c-format
msgid "%s: Unrecognized record type %d."
msgstr ""
-#: src/sfm-read.c:392
+#: src/sfm-read.c:386
#, c-format
msgid ""
"%s: Bad size (%d) or count (%d) field on record type 7, subtype 3.\tExpected "
"size %d, count 8."
msgstr ""
-#: src/sfm-read.c:403
+#: src/sfm-read.c:397
#, c-format
msgid ""
"%s: Floating-point representation in system file is not IEEE-754. PSPP "
"cannot convert between floating-point formats."
msgstr ""
-#: src/sfm-read.c:419
+#: src/sfm-read.c:413
#, c-format
msgid ""
"%s: File-indicated endianness (%s) does not match endianness intuited from "
"file header (%s)."
msgstr ""
-#: src/sfm-read.c:422 src/sfm-read.c:423
+#: src/sfm-read.c:416 src/sfm-read.c:417
msgid "big-endian"
msgstr ""
-#: src/sfm-read.c:422 src/sfm-read.c:423
+#: src/sfm-read.c:416 src/sfm-read.c:417
msgid "little-endian"
msgstr ""
-#: src/sfm-read.c:424
+#: src/sfm-read.c:418
msgid "unknown"
msgstr ""
-#: src/sfm-read.c:428
+#: src/sfm-read.c:422
#, c-format
msgid "%s: File-indicated character representation code (%s) is not ASCII."
msgstr ""
-#: src/sfm-read.c:432
+#: src/sfm-read.c:426
msgid "DEC Kanji"
msgstr ""
-#: src/sfm-read.c:448
+#: src/sfm-read.c:442
#, c-format
msgid ""
"%s: Bad size (%d) or count (%d) field on record type 7, subtype 4.\tExpected "
"size %d, count 8."
msgstr ""
-#: src/sfm-read.c:463
+#: src/sfm-read.c:457
#, c-format
msgid ""
"%s: File-indicated value is different from internal value for at least one "
"%g; LOWEST: %g, %g."
msgstr ""
-#: src/sfm-read.c:490
+#: src/sfm-read.c:484
#, c-format
msgid ""
"%s: Bad magic. Proper system files begin with the four characters `$FL2'. "
"This file will not be read."
msgstr ""
-#: src/sfm-read.c:532
+#: src/sfm-read.c:526
#, c-format
msgid ""
"%s: File layout code has unexpected value %d. Value should be 2, in big-"
"endian or little-endian format."
msgstr ""
-#: src/sfm-read.c:548
+#: src/sfm-read.c:542
#, c-format
msgid "%s: Number of elements per case (%d) is not between 1 and %d."
msgstr ""
-#: src/sfm-read.c:557
+#: src/sfm-read.c:551
#, c-format
msgid ""
"%s: Index of weighting variable (%d) is not between 0 and number of elements "
"per case (%d)."
msgstr ""
-#: src/sfm-read.c:564
+#: src/sfm-read.c:558
#, c-format
msgid "%s: Number of cases in file (%ld) is not between -1 and %d."
msgstr ""
-#: src/sfm-read.c:569
+#: src/sfm-read.c:563
#, c-format
msgid "%s: Compression bias (%g) is not the usual value of 100."
msgstr ""
-#: src/sfm-read.c:662
+#: src/sfm-read.c:656
#, c-format
msgid "%s: position %d: Bad record type (%d); the expected value was 2."
msgstr ""
-#: src/sfm-read.c:672
+#: src/sfm-read.c:666
#, c-format
msgid ""
"%s: position %d: String variable does not have proper number of continuation "
"records."
msgstr ""
-#: src/sfm-read.c:681
+#: src/sfm-read.c:675
#, c-format
msgid "%s: position %d: Superfluous long string continuation record."
msgstr ""
-#: src/sfm-read.c:687
+#: src/sfm-read.c:681
#, c-format
msgid "%s: position %d: Bad variable type code %d."
msgstr ""
-#: src/sfm-read.c:690
+#: src/sfm-read.c:684
#, c-format
msgid "%s: position %d: Variable label indicator field is not 0 or 1."
msgstr ""
-#: src/sfm-read.c:694
+#: src/sfm-read.c:688
#, c-format
msgid ""
"%s: position %d: Missing value indicator field is not -3, -2, 0, 1, 2, or 3."
msgstr ""
-#: src/sfm-read.c:700
+#: src/sfm-read.c:694
#, c-format
msgid "%s: position %d: Variable name begins with invalid character."
msgstr ""
-#: src/sfm-read.c:704
+#: src/sfm-read.c:698
#, c-format
msgid "%s: position %d: Variable name begins with lowercase letter %c."
msgstr ""
-#: src/sfm-read.c:708
+#: src/sfm-read.c:702
#, c-format
msgid ""
"%s: position %d: Variable name begins with octothorpe (`#'). Scratch "
"variables should not appear in system files."
msgstr ""
-#: src/sfm-read.c:723
+#: src/sfm-read.c:717
#, c-format
msgid "%s: position %d: Variable name character %d is lowercase letter %c."
msgstr ""
-#: src/sfm-read.c:732
+#: src/sfm-read.c:726
#, c-format
msgid ""
"%s: position %d: character `\\%03o' (%c) is not valid in a variable name."
msgstr ""
-#: src/sfm-read.c:741
+#: src/sfm-read.c:735
#, c-format
msgid "%s: Duplicate variable name `%s' within system file."
msgstr ""
-#: src/sfm-read.c:762
+#: src/sfm-read.c:756
#, c-format
msgid "%s: Variable %s indicates variable label of invalid length %d."
msgstr ""
-#: src/sfm-read.c:779
+#: src/sfm-read.c:773
#, c-format
msgid "%s: Long string variable %s may not have missing values."
msgstr ""
-#: src/sfm-read.c:804
+#: src/sfm-read.c:798
#, c-format
msgid ""
"%s: String variable %s may not have missing values specified as a range."
msgstr ""
-#: src/sfm-read.c:852
+#: src/sfm-read.c:846
#, c-format
msgid "%s: Long string continuation records omitted at end of dictionary."
msgstr ""
-#: src/sfm-read.c:856
+#: src/sfm-read.c:850
#, c-format
msgid ""
"%s: System file header indicates %d variable positions but %d were read from "
"file."
msgstr ""
-#: src/sfm-read.c:884
+#: src/sfm-read.c:878
#, c-format
msgid "%s: %s variable %s has %s format specifier %s."
msgstr ""
-#: src/sfm-read.c:963
+#: src/sfm-read.c:957
#, c-format
msgid ""
"%s: Variable index record (type 4) does not immediately follow value label "
"record (type 3) as it should."
msgstr ""
-#: src/sfm-read.c:974
+#: src/sfm-read.c:968
#, c-format
msgid ""
"%s: Number of variables associated with a value label (%d) is not between 1 "
"and the number of variables (%d)."
msgstr ""
-#: src/sfm-read.c:990
+#: src/sfm-read.c:984
#, c-format
msgid ""
"%s: Variable index associated with value label (%d) is not between 1 and the "
"number of values (%d)."
msgstr ""
-#: src/sfm-read.c:997
+#: src/sfm-read.c:991
#, c-format
msgid ""
"%s: Variable index associated with value label (%d) refers to a continuation "
"of a string variable, not to an actual variable."
msgstr ""
-#: src/sfm-read.c:1002
+#: src/sfm-read.c:996
#, c-format
msgid "%s: Value labels are not allowed on long string variables (%s)."
msgstr ""
-#: src/sfm-read.c:1013
+#: src/sfm-read.c:1007
#, c-format
msgid ""
"%s: Variables associated with value label are not all of identical type. "
"Variable %s has %s type, but variable %s has %s type."
msgstr ""
-#: src/sfm-read.c:1054
+#: src/sfm-read.c:1048
#, c-format
msgid "%s: File contains duplicate label for value %g for variable %s."
msgstr ""
-#: src/sfm-read.c:1058
+#: src/sfm-read.c:1052
#, c-format
msgid "%s: File contains duplicate label for value `%.*s' for variable %s."
msgstr ""
-#: src/sfm-read.c:1093 src/sfm-read.c:1357
+#: src/sfm-read.c:1087 src/sfm-read.c:1351
#, c-format
msgid "%s: Reading system file: %s."
msgstr ""
-#: src/sfm-read.c:1096 src/sfm-read.c:1198 src/sfm-read.c:1240
+#: src/sfm-read.c:1090 src/sfm-read.c:1192 src/sfm-read.c:1234
#, c-format
msgid "%s: Unexpected end of file."
msgstr ""
-#: src/sfm-read.c:1113
+#: src/sfm-read.c:1107
#, c-format
msgid "%s: System file contains multiple type 6 (document) records."
msgstr ""
-#: src/sfm-read.c:1119
+#: src/sfm-read.c:1113
#, c-format
msgid "%s: Number of document lines (%ld) must be greater than 0."
msgstr ""
-#: src/sfm-read.c:1151
+#: src/sfm-read.c:1145
#, c-format
msgid "%s: Error reading file: %s."
msgstr ""
-#: src/sfm-read.c:1188
+#: src/sfm-read.c:1182
#, c-format
msgid "%s: Compressed data is corrupted. Data ends in partial case."
msgstr ""
-#: src/sfm-read.c:1360
+#: src/sfm-read.c:1354
#, c-format
msgid "%s: Partial record at end of system file."
msgstr ""
msgid "Truncating variable label to 255 characters."
msgstr ""
+#: src/vars-prs.c:43
+msgid "expecting variable name"
+msgstr ""
+
#: src/vars-prs.c:49
#, c-format
msgid "%s is not a variable name."
"assumed."
msgstr ""
-#: src/file-handle.q:271
+#: src/file-handle.q:272
#, c-format
msgid "Can't open %s as a %s because it is already open as a %s"
msgstr ""
-#: src/file-handle.q:275
+#: src/file-handle.q:276
#, c-format
msgid "Can't open %s as a %s for %s because it is already open for %s"
msgstr ""
-#: src/file-handle.q:280
+#: src/file-handle.q:281
#, c-format
msgid "Can't re-open %s as a %s for %s"
msgstr ""
-#: src/file-handle.q:332
+#: src/file-handle.q:333
msgid "expecting a file name or handle name"
msgstr ""
msgid "Does not assume equal"
msgstr ""
-#: src/set.q:218 src/set.q:290 src/set.q:333 src/set.q:388 src/set.q:390
-#: src/set.q:392 src/set.q:394 src/set.q:396 src/set.q:398 src/set.q:400
+#: src/set.q:221 src/set.q:300 src/set.q:343 src/set.q:398 src/set.q:400
#: src/set.q:402 src/set.q:404 src/set.q:406 src/set.q:408 src/set.q:410
-#: src/set.q:412 src/set.q:790 src/set.q:871 src/set.q:966
+#: src/set.q:412 src/set.q:414 src/set.q:416 src/set.q:418 src/set.q:420
+#: src/set.q:422 src/set.q:828 src/set.q:909 src/set.q:1004
#, c-format
msgid "%s is obsolete."
msgstr ""
-#: src/set.q:226
+#: src/set.q:229
msgid "LISTING is ON"
msgstr ""
-#: src/set.q:228
+#: src/set.q:231
msgid "LISTING is OFF"
msgstr ""
-#: src/set.q:254
+#: src/set.q:245
+#, c-format
+msgid "EPOCH is %d"
+msgstr ""
+
+#: src/set.q:264
msgid "Journalling is off"
msgstr ""
-#: src/set.q:421
+#: src/set.q:431
msgid ""
"CASE is not implemented and probably won't be. If you care, complain about "
"it."
msgstr ""
-#: src/set.q:426
+#: src/set.q:436
msgid "Active file compression is not yet implemented (and probably won't be)."
msgstr ""
-#: src/set.q:440
+#: src/set.q:450
#, c-format
msgid ""
"CC%c: Length of custom currency string `%s' (%d) exceeds maximum length of "
"16."
msgstr ""
-#: src/set.q:462
+#: src/set.q:472
#, c-format
msgid ""
"CC%c: Custom currency string `%s' does not contain exactly three periods or "
"commas (not both)."
msgstr ""
-#: src/set.q:515
+#: src/set.q:525
msgid "None"
msgstr ""
-#: src/set.q:521
+#: src/set.q:531
msgid "Disabled"
msgstr ""
-#: src/set.q:526
+#: src/set.q:536
msgid "Screen"
msgstr ""
-#: src/set.q:533
+#: src/set.q:543
msgid "Listing"
msgstr ""
-#: src/set.q:540
+#: src/set.q:550
msgid "Other"
msgstr ""
-#: src/set.q:649
+#: src/set.q:659
+msgid "EPOCH must be 1500 or later."
+msgstr ""
+
+#: src/set.q:666
+msgid "expecting AUTOMATIC or year"
+msgstr ""
+
+#: src/set.q:687
msgid "LENGTH must be at least 1."
msgstr ""
-#: src/set.q:688
+#: src/set.q:726
msgid "Missing identifier in RESULTS subcommand."
msgstr ""
-#: src/set.q:699
+#: src/set.q:737
msgid "Unrecognized identifier in RESULTS subcommand."
msgstr ""
-#: src/set.q:736
+#: src/set.q:774
msgid "WIDTH must be at least 1."
msgstr ""
-#: src/set.q:759
+#: src/set.q:797
#, c-format
msgid ""
"FORMAT requires numeric output format as an argument. Specified format %s "
"is of type string."
msgstr ""
-#: src/set.q:803
+#: src/set.q:841
msgid "Text color must be in range 0-15."
msgstr ""
-#: src/set.q:816
+#: src/set.q:854
msgid "Background color must be in range 0-7."
msgstr ""
-#: src/set.q:827
+#: src/set.q:865
msgid "Border color must be in range 0-7."
msgstr ""
-#: src/set.q:883
+#: src/set.q:921
msgid "Lower window color must be between 0 and 6."
msgstr ""
-#: src/set.q:897
+#: src/set.q:935
msgid "Upper window color must be between 0 and 6."
msgstr ""
-#: src/set.q:909
+#: src/set.q:947
msgid "Frame color must be between 0 and 6."
msgstr ""
-#: src/set.q:975
+#: src/set.q:1013
msgid "Drive letter expected in WORKDEV subcommand."
msgstr ""
-#: src/set.q:1007
+#: src/set.q:1045
msgid "Specify a terminal type with the TERM environment variable."
msgstr ""
-#: src/set.q:1013
+#: src/set.q:1051
msgid "Could not access the termcap data base."
msgstr ""
-#: src/set.q:1015
+#: src/set.q:1053
#, c-format
msgid "Terminal type `%s' is not defined."
msgstr ""
-#: src/set.q:1073
+#: src/set.q:1111
msgid "data> "
msgstr ""
+Thu Mar 3 22:08:35 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * Makefile.am : Fixed up CLEANFILES target.
+
Mon Feb 28 23:49:56 2005 Ben Pfaff <blp@gnu.org>
* str.h: Changed `struct len_string' to `struct fixed_string', a
bin_PROGRAMS = pspp
-DISTCLEANFILES = foo
MAINTAINERCLEANFILES = Makefile.in
EXTRA_DIST = $(q_sources_q) q2c.c
ETAGS_ARGS = -l c $(q_sources_c)
q_sources_c = correlations.c crosstabs.c examine.c file-handle.c \
frequencies.c list.c means.c oneway.c set.c t-test.c
+CLEANFILES=$(q_sources_c)
+DISTCLEANFILES=version.c
+
q_sources_q = correlations.q crosstabs.q examine.q file-handle.q \
frequencies.q list.q means.q oneway.q set.q t-test.q
pspp_SOURCES = $(q_sources_c) $(chart_sources) \
aggregate.c algorithm.c algorithm.h \
alloc.c alloc.h apply-dict.c ascii.c autorecode.c bitvector.h \
+bool.h \
calendar.c calendar.h case.c case.h casefile.c casefile.h chart.c \
chart.h cmdline.c cmdline.h command.c command.def \
command.h compute.c copyleft.c copyleft.h count.c data-in.c data-in.h \
+Thu Mar 3 22:10:25 WST 2005 John Darrington <john@darrington.wattle.id.au>
+
+ * Makefile.am evaluate.h.pl evaluate.inc.pl operations.h.pl
+ optimize.inc.pl parse.inc.p:
+
+ Renamed generate.pl to PSPP_expressions.pm and adjusted *.pl
+ to suit.
+
+ Fixed everything so that it can be built from an arbitrary
+ directory.
+
+
Mon Feb 28 23:52:21 2005 Ben Pfaff <blp@gnu.org>
* New directory.
noinst_LIBRARIES = libexpressions.a
libexpressions_a_SOURCES = evaluate.c helpers.c helpers.h optimize.c \
-parse.c private.h public.h
+ parse.c private.h public.h \
+ evaluate.inc.pl PSPP_expressions.pm operations.def \
+ evaluate.h.pl operations.h.pl optimize.inc.pl parse.inc.pl
BUILT_SOURCES = evaluate.h evaluate.inc operations.h optimize.inc parse.inc
+CLEANFILES = evaluate.h evaluate.inc operations.h optimize.inc parse.inc
+
PERL = @PERL@
-evaluate.inc: evaluate.inc.pl generate.pl operations.def
- $(PERL) evaluate.inc.pl -o evaluate.inc
+helpers = $(srcdir)/PSPP_expressions.pm $(srcdir)/operations.def
+
+evaluate.inc: $(srcdir)/evaluate.inc.pl $(helpers)
+ $(PERL) -I $(srcdir) $< -o $@ -i $(srcdir)/operations.def
-evaluate.h: evaluate.h.pl generate.pl operations.def
- $(PERL) evaluate.h.pl -o evaluate.h
+evaluate.h: $(srcdir)/evaluate.h.pl $(helpers)
+ $(PERL) -I $(srcdir) $< -o $@ -i $(srcdir)/operations.def
-operations.h: operations.h.pl generate.pl operations.def
- $(PERL) operations.h.pl -o operations.h
+operations.h: $(srcdir)/operations.h.pl $(helpers)
+ $(PERL) -I $(srcdir) $< -o $@ -i $(srcdir)/operations.def
-optimize.inc: optimize.inc.pl generate.pl operations.def
- $(PERL) optimize.inc.pl -o optimize.inc
+optimize.inc: $(srcdir)/optimize.inc.pl $(helpers)
+ $(PERL) -I $(srcdir) $< -o $@ -i $(srcdir)/operations.def
-parse.inc: parse.inc.pl generate.pl operations.def
- $(PERL) parse.inc.pl -o parse.inc
+parse.inc: $(srcdir)/parse.inc.pl $(helpers)
+ $(PERL) -I $(srcdir) $< -o $@ -i $(srcdir)/operations.def
--- /dev/null
+use strict;
+use warnings 'all';
+
+use Getopt::Long;
+
+# Parse command line.
+our ($default_output_file) = $0;
+$default_output_file =~ s/\.pl//;
+our ($input_file);
+our ($output_file);
+parse_cmd_line ();
+
+# Initialize type system.
+our (%type, @types);
+init_all_types ();
+
+# Parse input file.
+our (%ops);
+our (@funcs, @opers);
+parse_input ();
+
+# Command line.
+
+# Parses the command line.
+#
+# Initializes $input_file, $output_file.
+sub parse_cmd_line {
+ GetOptions ("i|input=s" => \$input_file,
+ "o|output=s" => \$output_file,
+ "h|help" => sub { usage (); })
+ or exit 1;
+
+ $input_file = "operations.def" if !defined $input_file;
+ $output_file = $default_output_file if !defined $output_file;
+
+ open (INPUT, "<$input_file") or die "$input_file: open: $!\n";
+ open (OUTPUT, ">$output_file") or die "$output_file: create: $!\n";
+
+ select (OUTPUT);
+}
+
+sub usage {
+ print <<EOF;
+$0, for generating $default_output_file from definitions
+usage: generate.pl [-i INPUT] [-o OUTPUT] [-h]
+ -i INPUT input file containing definitions (default: operations.def)
+ -o OUTPUT output file (default: $default_output_file)
+ -h display this help message
+EOF
+ exit (0);
+}
+
+our ($token);
+our ($toktype);
+\f
+# Types.
+
+# Defines all our types.
+#
+# Initializes %type, @types.
+sub init_all_types {
+ # Common user-visible types used throughout evaluation trees.
+ init_type ('number', 'any', C_TYPE => 'double',
+ ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'num',
+ STACK => 'ns', MISSING_VALUE => 'SYSMIS');
+ init_type ('string', 'any', C_TYPE => 'struct fixed_string',
+ ATOM => 'string', MANGLE => 's', HUMAN_NAME => 'string',
+ STACK => 'ss', MISSING_VALUE => 'empty_string');
+ init_type ('boolean', 'any', C_TYPE => 'double',
+ ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'boolean',
+ STACK => 'ns', MISSING_VALUE => 'SYSMIS');
+
+ # Format types.
+ init_type ('format', 'atom');
+ init_type ('ni_format', 'leaf', C_TYPE => 'const struct fmt_spec *',
+ ATOM => 'format', MANGLE => 'f',
+ HUMAN_NAME => 'num_input_format');
+ init_type ('no_format', 'leaf', C_TYPE => 'const struct fmt_spec *',
+ ATOM => 'format', MANGLE => 'f',
+ HUMAN_NAME => 'num_output_format');
+
+ # Integer types.
+ init_type ('integer', 'leaf', C_TYPE => 'int',
+ ATOM => 'integer', MANGLE => 'n', HUMAN_NAME => 'integer');
+ init_type ('pos_int', 'leaf', C_TYPE => 'int',
+ ATOM => 'integer', MANGLE => 'n',
+ HUMAN_NAME => 'positive_integer_constant');
+
+ # Variable names.
+ init_type ('variable', 'atom');
+ init_type ('num_var', 'leaf', C_TYPE => 'const struct variable *',
+ ATOM => 'variable', MANGLE => 'Vn',
+ HUMAN_NAME => 'num_variable');
+ init_type ('str_var', 'leaf', C_TYPE => 'const struct variable *',
+ ATOM => 'variable', MANGLE => 'Vs',
+ HUMAN_NAME => 'string_variable');
+
+ # Vectors.
+ init_type ('vector', 'leaf', C_TYPE => 'const struct vector *',
+ ATOM => 'vector', MANGLE => 'v', HUMAN_NAME => 'vector');
+
+ # Fixed types.
+ init_type ('expression', 'fixed', C_TYPE => 'struct expression *',
+ FIXED_VALUE => 'e');
+ init_type ('case', 'fixed', C_TYPE => 'const struct ccase *',
+ FIXED_VALUE => 'c');
+ init_type ('case_idx', 'fixed', C_TYPE => 'size_t',
+ FIXED_VALUE => 'case_idx');
+
+ # One of these is emitted at the end of each expression as a sentinel
+ # that tells expr_evaluate() to return the value on the stack.
+ init_type ('return_number', 'atom');
+ init_type ('return_string', 'atom');
+
+ # Used only for debugging purposes.
+ init_type ('operation', 'atom');
+}
+
+# init_type has 2 required arguments:
+#
+# NAME: Type name.
+#
+# `$name' is the type's name in operations.def.
+#
+# `OP_$name' is the terminal's type in operations.h.
+#
+# `expr_allocate_$name()' allocates a node of the given type.
+#
+# ROLE: How the type may be used:
+#
+# "any": Usable as operands and function arguments, and
+# function and operator results.
+#
+# "leaf": Usable as operands and function arguments, but
+# not function arguments or results. (Thus, they appear
+# only in leaf nodes in the parse type.)
+#
+# "fixed": Not allowed either as an operand or argument
+# type or a result type. Used only as auxiliary data.
+#
+# "atom": Not allowed anywhere; just adds the name to
+# the list of atoms.
+#
+# All types except those with "atom" as their role also require:
+#
+# C_TYPE: The C type that represents this abstract type.
+#
+# Types with "any" or "leaf" role require:
+#
+# ATOM:
+#
+# `$atom' is the `struct operation_data' member name.
+#
+# get_$atom_name() obtains the corresponding data from a
+# node.
+#
+# MANGLE: Short string for name mangling. Use identical strings
+# if two types should not be overloaded.
+#
+# HUMAN_NAME: Name for a type when we describe it to the user.
+#
+# Types with role "any" require:
+#
+# STACK: Name of the local variable in expr_evaluate(), used for
+# maintaining the stack for this type.
+#
+# MISSING_VALUE: Expression used for the missing value of this
+# type.
+#
+# Types with role "fixed" require:
+#
+# FIXED_VALUE: Expression used for the value of this type.
+sub init_type {
+ my ($name, $role, %rest) = @_;
+ my ($type) = $type{"\U$name"} = {NAME => $name, ROLE => $role, %rest};
+
+ my (@need_keys) = qw (NAME ROLE);
+ if ($role eq 'any') {
+ push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME STACK MISSING_VALUE));
+ } elsif ($role eq 'leaf') {
+ push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME));
+ } elsif ($role eq 'fixed') {
+ push (@need_keys, qw (C_TYPE FIXED_VALUE));
+ } elsif ($role eq 'atom') {
+ } else {
+ die "no role `$role'";
+ }
+
+ my (%have_keys);
+ $have_keys{$_} = 1 foreach keys %$type;
+ for my $key (@need_keys) {
+ defined $type->{$key} or die "$name lacks $key";
+ delete $have_keys{$key};
+ }
+ scalar (keys (%have_keys)) == 0
+ or die "$name has superfluous key(s) " . join (', ', keys (%have_keys));
+
+ push (@types, $type);
+}
+
+# c_type(type).
+#
+# Returns the C type of the given type as a string designed to be
+# prepended to a variable name to produce a declaration. (That won't
+# work in general but it works well enough for our types.)
+sub c_type {
+ my ($type) = @_;
+ my ($c_type) = $type->{C_TYPE};
+ defined $c_type or die;
+
+ # Append a space unless (typically) $c_type ends in `*'.
+ $c_type .= ' ' if $c_type =~ /\w$/;
+
+ return $c_type;
+}
+\f
+# Input parsing.
+
+# Parses the entire input.
+#
+# Initializes %ops, @funcs, @opers.
+sub parse_input {
+ get_line ();
+ get_token ();
+ while ($toktype ne 'eof') {
+ my (%op);
+
+ $op{OPTIMIZABLE} = 1;
+ $op{UNIMPLEMENTED} = 0;
+ $op{EXTENSION} = 0;
+ for (;;) {
+ if (match ('extension')) {
+ $op{EXTENSION} = 1;
+ } elsif (match ('no_opt')) {
+ $op{OPTIMIZABLE} = 0;
+ } elsif (match ('absorb_miss')) {
+ $op{ABSORB_MISS} = 1;
+ } else {
+ last;
+ }
+ }
+
+ $op{RETURNS} = parse_type () || $type{NUMBER};
+ die "$op{RETURNS} is not a valid return type"
+ if !any ($op{RETURNS}, @type{qw (NUMBER STRING BOOLEAN)});
+
+ $op{CATEGORY} = $token;
+ if (!any ($op{CATEGORY}, qw (operator function))) {
+ die "`operator' or `function' expected at `$token'";
+ }
+ get_token ();
+
+ my ($name) = force ("id");
+
+ die "function name may not contain underscore"
+ if $op{CATEGORY} eq 'function' && $name =~ /_/;
+ die "operator name may not contain period"
+ if $op{CATEGORY} eq 'operator' && $name =~ /\./;
+
+ if (my ($prefix, $suffix) = $name =~ /^(.*)\.(\d+)$/) {
+ $name = $prefix;
+ $op{MIN_VALID} = $suffix;
+ $op{ABSORB_MISS} = 1;
+ }
+ $op{NAME} = $name;
+
+ force_match ('(');
+ @{$op{ARGS}} = ();
+ while (!match (')')) {
+ my ($arg) = parse_arg ();
+ push (@{$op{ARGS}}, $arg);
+ if (defined ($arg->{IDX})) {
+ last if match (')');
+ die "array must be last argument";
+ }
+ if (!match (',')) {
+ force_match (')');
+ last;
+ }
+ }
+
+ for my $arg (@{$op{ARGS}}) {
+ next if !defined $arg->{CONDITION};
+ my ($any_arg) = join ('|', map ($_->{NAME}, @{$op{ARGS}}));
+ $arg->{CONDITION} =~ s/\b($any_arg)\b/arg_$1/g;
+ }
+
+ my ($opname) = "OP_$op{NAME}";
+ $opname =~ tr/./_/;
+ if ($op{CATEGORY} eq 'function') {
+ my ($mangle) = join ('', map ($_->{TYPE}{MANGLE}, @{$op{ARGS}}));
+ $op{MANGLE} = $mangle;
+ $opname .= "_$mangle";
+ }
+ $op{OPNAME} = $opname;
+
+ if ($op{MIN_VALID}) {
+ my ($array_arg) = array_arg (\%op);
+ die "can't have minimum valid count without array arg"
+ if !defined $array_arg;
+ die "minimum valid count allowed only with double array"
+ if $array_arg->{TYPE} ne $type{NUMBER};
+ die "can't have minimum valid count if array has multiplication factor"
+ if $array_arg->{TIMES} != 1;
+ }
+
+ while ($toktype eq 'id') {
+ my ($type) = parse_type () or die "parse error";
+ die "`$type->{NAME}' is not allowed as auxiliary data"
+ unless $type->{ROLE} eq 'leaf' || $type->{ROLE} eq 'fixed';
+ my ($name) = force ("id");
+ push (@{$op{AUX}}, {TYPE => $type, NAME => $name});
+ force_match (';');
+ }
+
+ if ($op{OPTIMIZABLE}) {
+ die "random variate functions must be marked `no_opt'"
+ if $op{NAME} =~ /^RV\./;
+ for my $aux (@{$op{AUX}}) {
+ if (any ($aux->{TYPE}, @type{qw (CASE CASE_IDX)})) {
+ die "operators with $aux->{TYPE} aux data must be "
+ . "marked `no_opt'";
+ }
+ }
+ }
+
+ if ($op{RETURNS} eq $type{STRING} && !defined ($op{ABSORB_MISS})) {
+ my (@args);
+ for my $arg (@{$op{ARGS}}) {
+ if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) {
+ die "$op{NAME} returns string and has double or bool "
+ . "argument, but is not marked ABSORB_MISS";
+ }
+ if (defined $arg->{CONDITION}) {
+ die "$op{NAME} returns string but has argument with condition";
+ }
+ }
+ }
+
+ if ($toktype eq 'block') {
+ $op{BLOCK} = force ('block');
+ } elsif ($toktype eq 'expression') {
+ if ($token eq 'unimplemented') {
+ $op{UNIMPLEMENTED} = 1;
+ } else {
+ $op{EXPRESSION} = $token;
+ }
+ get_token ();
+ } else {
+ die "block or expression expected";
+ }
+
+ die "duplicate operation name $opname" if defined $ops{$opname};
+ $ops{$opname} = \%op;
+ if ($op{CATEGORY} eq 'function') {
+ push (@funcs, $opname);
+ } else {
+ push (@opers, $opname);
+ }
+ }
+ close(INPUT);
+
+ @funcs = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}
+ ||
+ $ops{$a}->{OPNAME} cmp $ops{$b}->{OPNAME}}
+ @funcs;
+ @opers = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}} @opers;
+ our (@order) = (@funcs, @opers);
+}
+
+# Reads the next token into $token, $toktype.
+sub get_token {
+ our ($line);
+ lookahead ();
+ return if defined ($toktype) && $toktype eq 'eof';
+ $toktype = 'id', return
+ if ($token) = $line =~ /\G([a-zA-Z_][a-zA-Z_.0-9]*)/gc;
+ $toktype = 'int', return if ($token) = $line =~ /\G[0-9]+/gc;
+ $toktype = 'punct', $token = $1, return if $line =~ /\G([][(),*;.])/gc;
+ if ($line =~ /\G=/gc) {
+ $toktype = "expression";
+ $line =~ /\G\s+/gc;
+ $token = accumulate_balanced (';');
+ } elsif ($line =~ /\G\{/gc) {
+ $toktype = "block";
+ $token = accumulate_balanced ('}');
+ $token =~ s/^\n+//;
+ } else {
+ die "bad character `" . substr ($line, pos $line, 1) . "' in input";
+ }
+}
+
+# Skip whitespace, then return the remainder of the line.
+sub lookahead {
+ our ($line);
+ die "unexpected end of file" if !defined ($line);
+ for (;;) {
+ $line =~ /\G\s+/gc;
+ last if pos ($line) < length ($line);
+ get_line ();
+ $token = $toktype = 'eof', return if !defined ($line);
+ }
+ return substr ($line, pos ($line));
+}
+
+# accumulate_balanced($chars)
+#
+# Accumulates input until a character in $chars is encountered, except
+# that balanced pairs of (), [], or {} cause $chars to be ignored.
+#
+# Returns the input read.
+sub accumulate_balanced {
+ my ($end) = @_;
+ my ($s) = "";
+ my ($nest) = 0;
+ our ($line);
+ for (;;) {
+ my ($start) = pos ($line);
+ if ($line =~ /\G([^][(){};,]*)([][(){};,])/gc) {
+ $s .= substr ($line, $start, pos ($line) - $start - 1)
+ if pos ($line) > $start;
+ my ($last) = substr ($line, pos ($line) - 1, 1);
+ if ($last =~ /[[({]/) {
+ $nest++;
+ $s .= $last;
+ } elsif ($last =~ /[])}]/) {
+ if ($nest > 0) {
+ $nest--;
+ $s .= $last;
+ } elsif (index ($end, $last) >= 0) {
+ return $s;
+ } else {
+ die "unbalanced parentheses";
+ }
+ } elsif (index ($end, $last) >= 0) {
+ return $s if !$nest;
+ $s .= $last;
+ } else {
+ $s .= $last;
+ }
+ } else {
+ $s .= substr ($line, pos ($line)) . "\n";
+ get_line ();
+ }
+ }
+}
+
+# Reads the next line from INPUT into $line.
+sub get_line {
+ our ($line);
+ $line = <INPUT>;
+ if (defined ($line)) {
+ chomp $line;
+ $line =~ s%//.*%%;
+ pos ($line) = 0;
+ }
+}
+
+# If the current token is an identifier that names a type,
+# returns the type and skips to the next token.
+# Otherwise, returns undef.
+sub parse_type {
+ if ($toktype eq 'id') {
+ foreach my $type (values (%type)) {
+ get_token (), return $type
+ if defined ($type->{NAME}) && $type->{NAME} eq $token;
+ }
+ }
+ return;
+}
+
+# force($type).
+#
+# Makes sure that $toktype equals $type, reads the next token, and
+# returns the previous $token.
+sub force {
+ my ($type) = @_;
+ die "parse error at `$token' expecting $type"
+ if $type ne $toktype;
+ my ($tok) = $token;
+ get_token ();
+ return $tok;
+}
+
+# force($tok).
+#
+# If $token equals $tok, reads the next token and returns true.
+# Otherwise, returns false.
+sub match {
+ my ($tok) = @_;
+ if ($token eq $tok) {
+ get_token ();
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+# force_match($tok).
+#
+# If $token equals $tok, reads the next token.
+# Otherwise, flags an error in the input.
+sub force_match {
+ my ($tok) = @_;
+ die "parse error at `$token' expecting `$tok'" if !match ($tok);
+}
+
+# Parses and returns a function argument.
+sub parse_arg {
+ my (%arg);
+ $arg{TYPE} = parse_type () || $type{NUMBER};
+ die "argument name expected at `$token'" if $toktype ne 'id';
+ $arg{NAME} = $token;
+
+ if (lookahead () =~ /^[[,)]/) {
+ get_token ();
+ if (match ('[')) {
+ die "only double and string arrays supported"
+ if !any ($arg{TYPE}, @type{qw (NUMBER STRING)});
+ $arg{IDX} = force ('id');
+ if (match ('*')) {
+ $arg{TIMES} = force ('int');
+ die "multiplication factor must be positive"
+ if $arg{TIMES} < 1;
+ } else {
+ $arg{TIMES} = 1;
+ }
+ force_match (']');
+ }
+ } else {
+ $arg{CONDITION} = $arg{NAME} . ' ' . accumulate_balanced (',)');
+ our ($line);
+ pos ($line) -= 1;
+ get_token ();
+ }
+ return \%arg;
+}
+\f
+# Output.
+
+# Prints the output file header.
+sub print_header {
+ print <<EOF;
+/* $output_file
+ Generated from $input_file by generate.pl.
+ Do not modify! */
+
+EOF
+}
+
+# Prints the output file trailer.
+sub print_trailer {
+ print <<EOF;
+
+/*
+ Local Variables:
+ mode: c
+ buffer-read-only: t
+ End:
+*/
+EOF
+}
+\f
+# Utilities.
+
+# any($target, @list)
+#
+# Returns true if $target appears in @list,
+# false otherwise.
+sub any {
+ $_ eq $_[0] and return 1 foreach @_[1...$#_];
+ return 0;
+}
+
+# make_sysmis_decl($op, $min_valid_src)
+#
+# Returns a declaration for a boolean variable called `force_sysmis',
+# which will be true when operation $op should be system-missing.
+# Returns undef if there are no such circumstances.
+#
+# If $op has a minimum number of valid arguments, $min_valid_src
+# should be an an expression that evaluates to the minimum number of
+# valid arguments for $op.
+sub make_sysmis_decl {
+ my ($op, $min_valid_src) = @_;
+ my (@sysmis_cond);
+ if (!$op->{ABSORB_MISS}) {
+ for my $arg (@{$op->{ARGS}}) {
+ my ($arg_name) = "arg_$arg->{NAME}";
+ if (!defined $arg->{IDX}) {
+ if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) {
+ push (@sysmis_cond, "!is_valid ($arg_name)");
+ }
+ } elsif ($arg->{TYPE} eq $type{NUMBER}) {
+ my ($a) = "$arg_name";
+ my ($n) = "arg_$arg->{IDX}";
+ push (@sysmis_cond, "count_valid ($a, $n) < $n");
+ }
+ }
+ } elsif (defined $op->{MIN_VALID}) {
+ my ($args) = $op->{ARGS};
+ my ($arg) = ${$args}[$#{$args}];
+ my ($a) = "arg_$arg->{NAME}";
+ my ($n) = "arg_$arg->{IDX}";
+ push (@sysmis_cond, "count_valid ($a, $n) < $min_valid_src");
+ }
+ for my $arg (@{$op->{ARGS}}) {
+ push (@sysmis_cond, "!($arg->{CONDITION})")
+ if defined $arg->{CONDITION};
+ }
+ return "bool force_sysmis = " . join (' || ', @sysmis_cond)
+ if @sysmis_cond;
+ return;
+}
+
+# array_arg($op)
+#
+# If $op has an array argument, return it.
+# Otherwise, returns undef.
+sub array_arg {
+ my ($op) = @_;
+ my ($args) = $op->{ARGS};
+ return if !@$args;
+ my ($last_arg) = $args->[@$args - 1];
+ return $last_arg if defined $last_arg->{IDX};
+ return;
+}
-do 'generate.pl';
+use PSPP_expressions ;
+
+# Produce output.
+print_header ();
+generate_output ();
+print_trailer ();
sub generate_output {
print "#include \"helpers.h\"\n\n";
-do 'generate.pl';
+use PSPP_expressions ;
+
+print_header ();
+generate_output ();
+print_trailer ();
+
sub generate_output {
for my $opname (@order) {
+++ /dev/null
-use strict;
-use warnings 'all';
-
-use Getopt::Long;
-
-# Parse command line.
-our ($default_output_file) = $0;
-$default_output_file =~ s/\.pl//;
-our ($input_file);
-our ($output_file);
-parse_cmd_line ();
-
-# Initialize type system.
-our (%type, @types);
-init_all_types ();
-
-# Parse input file.
-our (%ops);
-our (@funcs, @opers);
-parse_input ();
-
-# Produce output.
-print_header ();
-generate_output ();
-print_trailer ();
-\f
-# Command line.
-
-# Parses the command line.
-#
-# Initializes $input_file, $output_file.
-sub parse_cmd_line {
- GetOptions ("i|input=s" => \$input_file,
- "o|output=s" => \$output_file,
- "h|help" => sub { usage (); })
- or exit 1;
-
- $input_file = "operations.def" if !defined $input_file;
- $output_file = $default_output_file if !defined $output_file;
-
- open (INPUT, "<$input_file") or die "$input_file: open: $!\n";
- open (OUTPUT, ">$output_file") or die "$output_file: create: $!\n";
-
- select (OUTPUT);
-}
-
-sub usage {
- print <<EOF;
-$0, for generating $default_output_file from definitions
-usage: generate.pl [-i INPUT] [-o OUTPUT] [-h]
- -i INPUT input file containing definitions (default: operations.def)
- -o OUTPUT output file (default: $default_output_file)
- -h display this help message
-EOF
- exit (0);
-}
-
-our ($token);
-our ($toktype);
-\f
-# Types.
-
-# Defines all our types.
-#
-# Initializes %type, @types.
-sub init_all_types {
- # Common user-visible types used throughout evaluation trees.
- init_type ('number', 'any', C_TYPE => 'double',
- ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'num',
- STACK => 'ns', MISSING_VALUE => 'SYSMIS');
- init_type ('string', 'any', C_TYPE => 'struct fixed_string',
- ATOM => 'string', MANGLE => 's', HUMAN_NAME => 'string',
- STACK => 'ss', MISSING_VALUE => 'empty_string');
- init_type ('boolean', 'any', C_TYPE => 'double',
- ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'boolean',
- STACK => 'ns', MISSING_VALUE => 'SYSMIS');
-
- # Format types.
- init_type ('format', 'atom');
- init_type ('ni_format', 'leaf', C_TYPE => 'const struct fmt_spec *',
- ATOM => 'format', MANGLE => 'f',
- HUMAN_NAME => 'num_input_format');
- init_type ('no_format', 'leaf', C_TYPE => 'const struct fmt_spec *',
- ATOM => 'format', MANGLE => 'f',
- HUMAN_NAME => 'num_output_format');
-
- # Integer types.
- init_type ('integer', 'leaf', C_TYPE => 'int',
- ATOM => 'integer', MANGLE => 'n', HUMAN_NAME => 'integer');
- init_type ('pos_int', 'leaf', C_TYPE => 'int',
- ATOM => 'integer', MANGLE => 'n',
- HUMAN_NAME => 'positive_integer_constant');
-
- # Variable names.
- init_type ('variable', 'atom');
- init_type ('num_var', 'leaf', C_TYPE => 'const struct variable *',
- ATOM => 'variable', MANGLE => 'Vn',
- HUMAN_NAME => 'num_variable');
- init_type ('str_var', 'leaf', C_TYPE => 'const struct variable *',
- ATOM => 'variable', MANGLE => 'Vs',
- HUMAN_NAME => 'string_variable');
-
- # Vectors.
- init_type ('vector', 'leaf', C_TYPE => 'const struct vector *',
- ATOM => 'vector', MANGLE => 'v', HUMAN_NAME => 'vector');
-
- # Fixed types.
- init_type ('expression', 'fixed', C_TYPE => 'struct expression *',
- FIXED_VALUE => 'e');
- init_type ('case', 'fixed', C_TYPE => 'const struct ccase *',
- FIXED_VALUE => 'c');
- init_type ('case_idx', 'fixed', C_TYPE => 'size_t',
- FIXED_VALUE => 'case_idx');
-
- # One of these is emitted at the end of each expression as a sentinel
- # that tells expr_evaluate() to return the value on the stack.
- init_type ('return_number', 'atom');
- init_type ('return_string', 'atom');
-
- # Used only for debugging purposes.
- init_type ('operation', 'atom');
-}
-
-# init_type has 2 required arguments:
-#
-# NAME: Type name.
-#
-# `$name' is the type's name in operations.def.
-#
-# `OP_$name' is the terminal's type in operations.h.
-#
-# `expr_allocate_$name()' allocates a node of the given type.
-#
-# ROLE: How the type may be used:
-#
-# "any": Usable as operands and function arguments, and
-# function and operator results.
-#
-# "leaf": Usable as operands and function arguments, but
-# not function arguments or results. (Thus, they appear
-# only in leaf nodes in the parse type.)
-#
-# "fixed": Not allowed either as an operand or argument
-# type or a result type. Used only as auxiliary data.
-#
-# "atom": Not allowed anywhere; just adds the name to
-# the list of atoms.
-#
-# All types except those with "atom" as their role also require:
-#
-# C_TYPE: The C type that represents this abstract type.
-#
-# Types with "any" or "leaf" role require:
-#
-# ATOM:
-#
-# `$atom' is the `struct operation_data' member name.
-#
-# get_$atom_name() obtains the corresponding data from a
-# node.
-#
-# MANGLE: Short string for name mangling. Use identical strings
-# if two types should not be overloaded.
-#
-# HUMAN_NAME: Name for a type when we describe it to the user.
-#
-# Types with role "any" require:
-#
-# STACK: Name of the local variable in expr_evaluate(), used for
-# maintaining the stack for this type.
-#
-# MISSING_VALUE: Expression used for the missing value of this
-# type.
-#
-# Types with role "fixed" require:
-#
-# FIXED_VALUE: Expression used for the value of this type.
-sub init_type {
- my ($name, $role, %rest) = @_;
- my ($type) = $type{"\U$name"} = {NAME => $name, ROLE => $role, %rest};
-
- my (@need_keys) = qw (NAME ROLE);
- if ($role eq 'any') {
- push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME STACK MISSING_VALUE));
- } elsif ($role eq 'leaf') {
- push (@need_keys, qw (C_TYPE ATOM MANGLE HUMAN_NAME));
- } elsif ($role eq 'fixed') {
- push (@need_keys, qw (C_TYPE FIXED_VALUE));
- } elsif ($role eq 'atom') {
- } else {
- die "no role `$role'";
- }
-
- my (%have_keys);
- $have_keys{$_} = 1 foreach keys %$type;
- for my $key (@need_keys) {
- defined $type->{$key} or die "$name lacks $key";
- delete $have_keys{$key};
- }
- scalar (keys (%have_keys)) == 0
- or die "$name has superfluous key(s) " . join (', ', keys (%have_keys));
-
- push (@types, $type);
-}
-
-# c_type(type).
-#
-# Returns the C type of the given type as a string designed to be
-# prepended to a variable name to produce a declaration. (That won't
-# work in general but it works well enough for our types.)
-sub c_type {
- my ($type) = @_;
- my ($c_type) = $type->{C_TYPE};
- defined $c_type or die;
-
- # Append a space unless (typically) $c_type ends in `*'.
- $c_type .= ' ' if $c_type =~ /\w$/;
-
- return $c_type;
-}
-\f
-# Input parsing.
-
-# Parses the entire input.
-#
-# Initializes %ops, @funcs, @opers.
-sub parse_input {
- get_line ();
- get_token ();
- while ($toktype ne 'eof') {
- my (%op);
-
- $op{OPTIMIZABLE} = 1;
- $op{UNIMPLEMENTED} = 0;
- $op{EXTENSION} = 0;
- for (;;) {
- if (match ('extension')) {
- $op{EXTENSION} = 1;
- } elsif (match ('no_opt')) {
- $op{OPTIMIZABLE} = 0;
- } elsif (match ('absorb_miss')) {
- $op{ABSORB_MISS} = 1;
- } else {
- last;
- }
- }
-
- $op{RETURNS} = parse_type () || $type{NUMBER};
- die "$op{RETURNS} is not a valid return type"
- if !any ($op{RETURNS}, @type{qw (NUMBER STRING BOOLEAN)});
-
- $op{CATEGORY} = $token;
- if (!any ($op{CATEGORY}, qw (operator function))) {
- die "`operator' or `function' expected at `$token'";
- }
- get_token ();
-
- my ($name) = force ("id");
-
- die "function name may not contain underscore"
- if $op{CATEGORY} eq 'function' && $name =~ /_/;
- die "operator name may not contain period"
- if $op{CATEGORY} eq 'operator' && $name =~ /\./;
-
- if (my ($prefix, $suffix) = $name =~ /^(.*)\.(\d+)$/) {
- $name = $prefix;
- $op{MIN_VALID} = $suffix;
- $op{ABSORB_MISS} = 1;
- }
- $op{NAME} = $name;
-
- force_match ('(');
- @{$op{ARGS}} = ();
- while (!match (')')) {
- my ($arg) = parse_arg ();
- push (@{$op{ARGS}}, $arg);
- if (defined ($arg->{IDX})) {
- last if match (')');
- die "array must be last argument";
- }
- if (!match (',')) {
- force_match (')');
- last;
- }
- }
-
- for my $arg (@{$op{ARGS}}) {
- next if !defined $arg->{CONDITION};
- my ($any_arg) = join ('|', map ($_->{NAME}, @{$op{ARGS}}));
- $arg->{CONDITION} =~ s/\b($any_arg)\b/arg_$1/g;
- }
-
- my ($opname) = "OP_$op{NAME}";
- $opname =~ tr/./_/;
- if ($op{CATEGORY} eq 'function') {
- my ($mangle) = join ('', map ($_->{TYPE}{MANGLE}, @{$op{ARGS}}));
- $op{MANGLE} = $mangle;
- $opname .= "_$mangle";
- }
- $op{OPNAME} = $opname;
-
- if ($op{MIN_VALID}) {
- my ($array_arg) = array_arg (\%op);
- die "can't have minimum valid count without array arg"
- if !defined $array_arg;
- die "minimum valid count allowed only with double array"
- if $array_arg->{TYPE} ne $type{NUMBER};
- die "can't have minimum valid count if array has multiplication factor"
- if $array_arg->{TIMES} != 1;
- }
-
- while ($toktype eq 'id') {
- my ($type) = parse_type () or die "parse error";
- die "`$type->{NAME}' is not allowed as auxiliary data"
- unless $type->{ROLE} eq 'leaf' || $type->{ROLE} eq 'fixed';
- my ($name) = force ("id");
- push (@{$op{AUX}}, {TYPE => $type, NAME => $name});
- force_match (';');
- }
-
- if ($op{OPTIMIZABLE}) {
- die "random variate functions must be marked `no_opt'"
- if $op{NAME} =~ /^RV\./;
- for my $aux (@{$op{AUX}}) {
- if (any ($aux->{TYPE}, @type{qw (CASE CASE_IDX)})) {
- die "operators with $aux->{TYPE} aux data must be "
- . "marked `no_opt'";
- }
- }
- }
-
- if ($op{RETURNS} eq $type{STRING} && !defined ($op{ABSORB_MISS})) {
- my (@args);
- for my $arg (@{$op{ARGS}}) {
- if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) {
- die "$op{NAME} returns string and has double or bool "
- . "argument, but is not marked ABSORB_MISS";
- }
- if (defined $arg->{CONDITION}) {
- die "$op{NAME} returns string but has argument with condition";
- }
- }
- }
-
- if ($toktype eq 'block') {
- $op{BLOCK} = force ('block');
- } elsif ($toktype eq 'expression') {
- if ($token eq 'unimplemented') {
- $op{UNIMPLEMENTED} = 1;
- } else {
- $op{EXPRESSION} = $token;
- }
- get_token ();
- } else {
- die "block or expression expected";
- }
-
- die "duplicate operation name $opname" if defined $ops{$opname};
- $ops{$opname} = \%op;
- if ($op{CATEGORY} eq 'function') {
- push (@funcs, $opname);
- } else {
- push (@opers, $opname);
- }
- }
- close(INPUT);
-
- @funcs = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}
- ||
- $ops{$a}->{OPNAME} cmp $ops{$b}->{OPNAME}}
- @funcs;
- @opers = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}} @opers;
- our (@order) = (@funcs, @opers);
-}
-
-# Reads the next token into $token, $toktype.
-sub get_token {
- our ($line);
- lookahead ();
- return if defined ($toktype) && $toktype eq 'eof';
- $toktype = 'id', return
- if ($token) = $line =~ /\G([a-zA-Z_][a-zA-Z_.0-9]*)/gc;
- $toktype = 'int', return if ($token) = $line =~ /\G[0-9]+/gc;
- $toktype = 'punct', $token = $1, return if $line =~ /\G([][(),*;.])/gc;
- if ($line =~ /\G=/gc) {
- $toktype = "expression";
- $line =~ /\G\s+/gc;
- $token = accumulate_balanced (';');
- } elsif ($line =~ /\G\{/gc) {
- $toktype = "block";
- $token = accumulate_balanced ('}');
- $token =~ s/^\n+//;
- } else {
- die "bad character `" . substr ($line, pos $line, 1) . "' in input";
- }
-}
-
-# Skip whitespace, then return the remainder of the line.
-sub lookahead {
- our ($line);
- die "unexpected end of file" if !defined ($line);
- for (;;) {
- $line =~ /\G\s+/gc;
- last if pos ($line) < length ($line);
- get_line ();
- $token = $toktype = 'eof', return if !defined ($line);
- }
- return substr ($line, pos ($line));
-}
-
-# accumulate_balanced($chars)
-#
-# Accumulates input until a character in $chars is encountered, except
-# that balanced pairs of (), [], or {} cause $chars to be ignored.
-#
-# Returns the input read.
-sub accumulate_balanced {
- my ($end) = @_;
- my ($s) = "";
- my ($nest) = 0;
- our ($line);
- for (;;) {
- my ($start) = pos ($line);
- if ($line =~ /\G([^][(){};,]*)([][(){};,])/gc) {
- $s .= substr ($line, $start, pos ($line) - $start - 1)
- if pos ($line) > $start;
- my ($last) = substr ($line, pos ($line) - 1, 1);
- if ($last =~ /[[({]/) {
- $nest++;
- $s .= $last;
- } elsif ($last =~ /[])}]/) {
- if ($nest > 0) {
- $nest--;
- $s .= $last;
- } elsif (index ($end, $last) >= 0) {
- return $s;
- } else {
- die "unbalanced parentheses";
- }
- } elsif (index ($end, $last) >= 0) {
- return $s if !$nest;
- $s .= $last;
- } else {
- $s .= $last;
- }
- } else {
- $s .= substr ($line, pos ($line)) . "\n";
- get_line ();
- }
- }
-}
-
-# Reads the next line from INPUT into $line.
-sub get_line {
- our ($line);
- $line = <INPUT>;
- if (defined ($line)) {
- chomp $line;
- $line =~ s%//.*%%;
- pos ($line) = 0;
- }
-}
-
-# If the current token is an identifier that names a type,
-# returns the type and skips to the next token.
-# Otherwise, returns undef.
-sub parse_type {
- if ($toktype eq 'id') {
- foreach my $type (values (%type)) {
- get_token (), return $type
- if defined ($type->{NAME}) && $type->{NAME} eq $token;
- }
- }
- return;
-}
-
-# force($type).
-#
-# Makes sure that $toktype equals $type, reads the next token, and
-# returns the previous $token.
-sub force {
- my ($type) = @_;
- die "parse error at `$token' expecting $type"
- if $type ne $toktype;
- my ($tok) = $token;
- get_token ();
- return $tok;
-}
-
-# force($tok).
-#
-# If $token equals $tok, reads the next token and returns true.
-# Otherwise, returns false.
-sub match {
- my ($tok) = @_;
- if ($token eq $tok) {
- get_token ();
- return 1;
- } else {
- return 0;
- }
-}
-
-# force_match($tok).
-#
-# If $token equals $tok, reads the next token.
-# Otherwise, flags an error in the input.
-sub force_match {
- my ($tok) = @_;
- die "parse error at `$token' expecting `$tok'" if !match ($tok);
-}
-
-# Parses and returns a function argument.
-sub parse_arg {
- my (%arg);
- $arg{TYPE} = parse_type () || $type{NUMBER};
- die "argument name expected at `$token'" if $toktype ne 'id';
- $arg{NAME} = $token;
-
- if (lookahead () =~ /^[[,)]/) {
- get_token ();
- if (match ('[')) {
- die "only double and string arrays supported"
- if !any ($arg{TYPE}, @type{qw (NUMBER STRING)});
- $arg{IDX} = force ('id');
- if (match ('*')) {
- $arg{TIMES} = force ('int');
- die "multiplication factor must be positive"
- if $arg{TIMES} < 1;
- } else {
- $arg{TIMES} = 1;
- }
- force_match (']');
- }
- } else {
- $arg{CONDITION} = $arg{NAME} . ' ' . accumulate_balanced (',)');
- our ($line);
- pos ($line) -= 1;
- get_token ();
- }
- return \%arg;
-}
-\f
-# Output.
-
-# Prints the output file header.
-sub print_header {
- print <<EOF;
-/* $output_file
- Generated from $input_file by generate.pl.
- Do not modify! */
-
-EOF
-}
-
-# Prints the output file trailer.
-sub print_trailer {
- print <<EOF;
-
-/*
- Local Variables:
- mode: c
- buffer-read-only: t
- End:
-*/
-EOF
-}
-\f
-# Utilities.
-
-# any($target, @list)
-#
-# Returns true if $target appears in @list,
-# false otherwise.
-sub any {
- $_ eq $_[0] and return 1 foreach @_[1...$#_];
- return 0;
-}
-
-# make_sysmis_decl($op, $min_valid_src)
-#
-# Returns a declaration for a boolean variable called `force_sysmis',
-# which will be true when operation $op should be system-missing.
-# Returns undef if there are no such circumstances.
-#
-# If $op has a minimum number of valid arguments, $min_valid_src
-# should be an an expression that evaluates to the minimum number of
-# valid arguments for $op.
-sub make_sysmis_decl {
- my ($op, $min_valid_src) = @_;
- my (@sysmis_cond);
- if (!$op->{ABSORB_MISS}) {
- for my $arg (@{$op->{ARGS}}) {
- my ($arg_name) = "arg_$arg->{NAME}";
- if (!defined $arg->{IDX}) {
- if (any ($arg->{TYPE}, @type{qw (NUMBER BOOLEAN)})) {
- push (@sysmis_cond, "!is_valid ($arg_name)");
- }
- } elsif ($arg->{TYPE} eq $type{NUMBER}) {
- my ($a) = "$arg_name";
- my ($n) = "arg_$arg->{IDX}";
- push (@sysmis_cond, "count_valid ($a, $n) < $n");
- }
- }
- } elsif (defined $op->{MIN_VALID}) {
- my ($args) = $op->{ARGS};
- my ($arg) = ${$args}[$#{$args}];
- my ($a) = "arg_$arg->{NAME}";
- my ($n) = "arg_$arg->{IDX}";
- push (@sysmis_cond, "count_valid ($a, $n) < $min_valid_src");
- }
- for my $arg (@{$op->{ARGS}}) {
- push (@sysmis_cond, "!($arg->{CONDITION})")
- if defined $arg->{CONDITION};
- }
- return "bool force_sysmis = " . join (' || ', @sysmis_cond)
- if @sysmis_cond;
- return;
-}
-
-# array_arg($op)
-#
-# If $op has an array argument, return it.
-# Otherwise, returns undef.
-sub array_arg {
- my ($op) = @_;
- my ($args) = $op->{ARGS};
- return if !@$args;
- my ($last_arg) = $args->[@$args - 1];
- return $last_arg if defined $last_arg->{IDX};
- return;
-}
-do 'generate.pl';
+#!/usr/bin/perl
+
+use PSPP_expressions ;
+#
+# Produce output.
+print_header ();
+generate_output ();
+print_trailer ();
+
sub generate_output {
print "#include <stdlib.h>\n";
-do 'generate.pl';
+use PSPP_expressions ;
+
+# Produce output.
+print_header ();
+generate_output ();
+print_trailer ();
+
sub generate_output {
for my $opname (@order) {
-do 'generate.pl';
+use PSPP_expressions ;
+#
+#
+#
+# Produce output.
+print_header ();
+generate_output ();
+print_trailer ();
sub generate_output {
my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
EXTRA_DIST = $(TESTS) weighting.data data-list.data list.data \
bugs/computebug.stat bugs/computebug.out \
bugs/recode-copy-bug-1.stat bugs/recode-copy-bug-2.stat \
- bugs/recode-copy-bug-1.out bugs/recode-copy-bug-2.out
+ bugs/recode-copy-bug-1.out bugs/recode-copy-bug-2.out \
+ expressions/randist/beta.out \
+ expressions/randist/cauchy.out \
+ expressions/randist/chisq.out \
+ expressions/randist/exp.out \
+ expressions/randist/f.out \
+ expressions/randist/gamma.out \
+ expressions/randist/laplace.out \
+ expressions/randist/lnormal.out \
+ expressions/randist/logistic.out \
+ expressions/randist/normal.out \
+ expressions/randist/pareto.out \
+ expressions/randist/randist.pl \
+ expressions/randist/randist.txt \
+ expressions/randist/t.out \
+ expressions/randist/uniform.out \
+ expressions/randist/weibull.out
DISTCLEANFILES = *.save sort.data pspp.* foo* msgs *.actual
MAINTAINERCLEANFILES = Makefile.in
+