|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: iSCSI: Re: range separatorOn Thu, 21 Mar 2002, Luben Tuikov wrote: > Eddy Quicksall wrote: > > > > That would be ok for something like an expression parser but our parser > > should be very simple minded and it is better if it is not context > > sensitive. It is the same idea as "don't use two characters". > > Context: are you parsing ``MaxConnections=3'' > or ``3''. You see, your parser is already > context sensitive. > > As iSCSI grows, undoubtedly each parameter/variable > will be handled by it's own string value parser, Well, there probably won't be that many parsers. One set-of-numbers parser can be used for all the number-expecting cases. > and _THEN_ you'd abstractize into > integer value, or > string value, or > range. > > Note, that a range is > a string (we know this already) of > <integer><range symbol><integer> to use context > free grammar (stripped down version :-). > > Philosophically, the debate is whether to use > 1 character or many. > > I vote for just a single char. Anywhich one. Agreed. > Using a different character to tell us that > this string denotes a range is not quite a > solution here. E.g.: > > MaxConnections=3<your range symbol here>10 > > So the Target will know that it is a range, > but it doesn't matter... it will have to check > the context anyway... Won't the parser already have to have figured out the context anyway? We have to know if the key is: 1) valid, and 2) appropriate for this phase already, don't we? After figuring that out, is it hard to know if we expect a string or one or more numbers? Take care, Bill
Home Last updated: Thu Mar 21 21:18:14 2002 9264 messages in chronological order |