|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] iSCSI: Re: range separatorEddy 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, 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. 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... That is, the context really matters! (AI anyone?) P.S. It would also be nice to see keys' values in context free grammar (EBNF will do the trick, or even BNF)... Then everything will be easier. :-) -- Luben
Home Last updated: Thu Mar 21 15:18:24 2002 9255 messages in chronological order |