[osis-core] Grain regex

Steve DeRose osis-core@bibletechnologieswg.org
Wed, 14 Aug 2002 08:02:31 -0400


At 02:56 PM -0600 08/13/02, Todd Tillinghast wrote:
>
>
>Isn't the string everything after the : until the end of the reference
>OR until the - in the case of the first value in a range reference.

Could -- but that makes the syntax non-extensible;  and undelimited 
strings make me nervous...

>
>How would we know when the number ends for the ch:number case?  Same
>rules.  Neither case requires [ ] to know when the start and end are.
>
>Todd

True; at the moment. But it seems cleaner to me to throw in the () or 
[], because

a) it makes the three parts (work/id/grain) parallel

b) it allows for later adding grains with >1 parameter, or adding 
length or other parameters to existing grains

c) it makes it clearer what the scope is in range references, so the 
'-' is less prone to look like it's part of the grain syntax

d) it makes the scope of the grain parameter visually obvious


-- 

Steve DeRose -- http://www.stg.brown.edu/~sjd
Chair, Bible Technologies Group -- http://www.bibletechnologies.net
Email: sderose@speakeasy.net
Backup email: sjd@stg.brown.edu