X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fexpressions%2Fparse.inc.pl;h=4e7243c16086b8c8efb0d1e6c6ce2f36c13c4ee2;hb=8953baa61127d6d3b91f763663ea647bf3e4e793;hp=ea878c92ccec4fe8db8a603a416203803da78689;hpb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;p=pspp-builds.git diff --git a/src/language/expressions/parse.inc.pl b/src/language/expressions/parse.inc.pl index ea878c92..4e7243c1 100644 --- a/src/language/expressions/parse.inc.pl +++ b/src/language/expressions/parse.inc.pl @@ -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}");