Fwd: Re: [sword-devel] request

Troy A. Griffitts sword-devel@crosswire.org
Sun, 25 Feb 2001 14:56:50 -0700


> Thank you Troy for the information.
> To fully support the ThML spec it would be nice if the parsing mechanism
> could handle roman numberings like xii etc.

Anyone willing to write a roman numeral parser?  

int romanParse(const char *romanNumberString);

that returns a -1 if the string is not a roman numeral, otherwise the
integer representation of the number.

I'd be happy to try to integrate it into the verse parser.



> This example is taken directly from the ThML definition of the scripRef
> tag:
> passage="Rom. viii. 27,28; x. 8-13"
> At the moment sword would not be able to parse this because it is not in the
> book chapter:verse format. Am I right?


Well, kindof.  With the above function, it should work.  If you replace
the viii. with 8 and the x. with 10, the sword parser should already get
what you want.  It does pretty good with trying to figure out what the
user is trying to say.

To try it in real-time, in the Windows frontend, from the search dialog,
custom range, define custom range, you can type in verse references and
see how the parser interprets them as you type.

	-Troy.