pspp-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lex function for values


From: John Darrington
Subject: Re: lex function for values
Date: Sat, 23 May 2009 07:17:11 +0800
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, May 22, 2009 at 08:03:36AM -0700, Ben Pfaff wrote:
     John Darrington <address@hidden> writes:
     
     > It struck me that the value-rep branch would lend itself to a function
     > of the form:
     >
     > bool lex_match_value (struct lexer* , union value *);
     >
     >
     > which would be useful for matching either a string or a number.
     
     (A width would also need to be passed in.)

The width could be infered from the length of the string. Although
typically, the width would have to match a variable which has already
been parsed.
     
     Is this useful very often?

Enough to make it worthwhile I think.  We currently have something
like this in t-test.q (for the grouping variable).  Similarly, I can
envisage that any procedure where grouping or categorical values are
involved, particularly dichotomous ones might need this.

J'

-- 
PGP Public key ID: 1024D/2DE827B3 
fingerprint = 8797 A26D 0854 2EAB 0285  A290 8A67 719C 2DE8 27B3
See http://pgp.mit.edu or any PGP keyserver for public key.


Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]