X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=src%2Flanguage%2Fexpressions%2Fgenerate.pl;h=c8fdf4c1d3b7e265412686310946040147b1f698;hb=0db42c2d683822e1252f17c2c81252a79e618d9c;hp=4ad1764b1c3c96152703b90e8a22afb85f8120db;hpb=ca31bef58d82ef1dfdb00a7a65667608ddc6ec9f;p=pspp diff --git a/src/language/expressions/generate.pl b/src/language/expressions/generate.pl index 4ad1764b1c..c8fdf4c1d3 100644 --- a/src/language/expressions/generate.pl +++ b/src/language/expressions/generate.pl @@ -16,7 +16,7 @@ init_all_types (); # Parse input file. our (%ops); -our (@funcs, @opers); +our (@funcs, @opers, @order); parse_input (); # Produce output. @@ -66,9 +66,9 @@ our ($toktype); 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', + ATOM => 'number', MANGLE => 'n', HUMAN_NAME => 'number', STACK => 'ns', MISSING_VALUE => 'SYSMIS'); - init_type ('string', 'any', C_TYPE => 'struct fixed_string', + init_type ('string', 'any', C_TYPE => 'struct substring', ATOM => 'string', MANGLE => 's', HUMAN_NAME => 'string', STACK => 'ss', MISSING_VALUE => 'empty_string'); init_type ('boolean', 'any', C_TYPE => 'double', @@ -99,6 +99,9 @@ sub init_all_types { init_type ('str_var', 'leaf', C_TYPE => 'const struct variable *', ATOM => 'variable', MANGLE => 'Vs', HUMAN_NAME => 'string_variable'); + init_type ('var', 'leaf', C_TYPE => 'const struct variable *', + ATOM => 'variable', MANGLE => 'V', + HUMAN_NAME => 'variable'); # Vectors. init_type ('vector', 'leaf', C_TYPE => 'const struct vector *', @@ -111,6 +114,8 @@ sub init_all_types { FIXED_VALUE => 'c'); init_type ('case_idx', 'fixed', C_TYPE => 'size_t', FIXED_VALUE => 'case_idx'); + init_type ('dataset', 'fixed', C_TYPE => 'struct dataset *', + FIXED_VALUE => 'ds'); # 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. @@ -243,6 +248,8 @@ sub parse_input { $op{ABSORB_MISS} = 1; } elsif (match ('perm_only')) { $op{PERM_ONLY} = 1; + } elsif (match ('no_abbrev')) { + $op{NO_ABBREV} = 1; } else { last; } @@ -373,7 +380,7 @@ sub parse_input { $ops{$a}->{OPNAME} cmp $ops{$b}->{OPNAME}} @funcs; @opers = sort {$ops{$a}->{NAME} cmp $ops{$b}->{NAME}} @opers; - our (@order) = (@funcs, @opers); + @order = (@funcs, @opers); } # Reads the next token into $token, $toktype.