Avoid nonportable -i option in sed invocation.
[pspp-builds.git] / src / language / expressions / parse.inc.pl
index ea878c92ccec4fe8db8a603a416203803da78689..4e7243c16086b8c8efb0d1e6c6ce2f36c13c4ee2 100644 (file)
@@ -1,4 +1,8 @@
+use strict;
+use warnings 'all';
+
 do 'generate.pl';
+our (@types, @order, %ops);
 
 sub generate_output {
     my (@members) = ("\"\"", "\"\"", 0, 0, 0, "{}", 0, 0);
@@ -7,7 +11,10 @@ sub generate_output {
     for my $type (@types) {
        next if $type->{ROLE} eq 'fixed';
 
-       my (@members) = ("\"$type->{NAME}\"", "\"$type->{HUMAN_NAME}\"",
+       my ($human_name) = $type->{HUMAN_NAME};
+       $human_name = "" if !defined $human_name;
+       
+       my (@members) = ("\"$type->{NAME}\"", "\"\"",
                         0, "OP_$type->{NAME}", 0, "{}", 0, 0);
        print "{", join (', ', @members), "},\n";
     }
@@ -55,6 +62,8 @@ sub generate_output {
        push (@flags, "OPF_NONOPTIMIZABLE") if !$op->{OPTIMIZABLE};
        push (@flags, "OPF_EXTENSION") if $op->{EXTENSION};
        push (@flags, "OPF_UNIMPLEMENTED") if $op->{UNIMPLEMENTED};
+       push (@flags, "OPF_PERM_ONLY") if $op->{PERM_ONLY};
+       push (@flags, "OPF_NO_ABBREV") if $op->{NO_ABBREV};
        push (@members, @flags ? join (' | ', @flags) : 0);
 
        push (@members, "OP_$op->{RETURNS}{NAME}");