On Mon, Jul 07, 2003 at 03:27:27PM +0000, John Chambers wrote:
> Richard Robinson writes:
> | I was thinking about this over the weekend ...
> 
> Always a mistake. ;-)
> 
> | I needes an abc parser last autumn, for my tunes-comparison project,
> | and really didn't want to write my own. So I used James Allwright's -
> | he uses it with different backends, to generate ps, midi & abc, so it's
> | already separated out as necessary, all you need to do is supply the
> | event-handlers. But this created problems, since one of the bodies of music
> | I was most interested in looking at was the VMP, which mostly uses abc2win,
> | and it doesn't handle the "!" linebreaks ...
> |
> | In short, I agree. A "community parser" would be a good and useful
> | thing. I was away for the weekend and am still catching up (you busy
> | people !) so I haven't got round to looking at John's code, to have any
> | idea how hard it would be to carve it out of the surrounding code, or
> | what sort sort of interface it would need, but I get the impression it
> | could be a good starting point. The liberal approach (handle what's "out there")
> | would make it the most useful, plus that John's involved here.
> |
> | I'd be prepared to try & help with such a project. What do you think,
> | John, would you support this ?
> 
> Well, I'm not sure what "support" is needed.

I meant, if your code was to get worked over to carve the parser out so
that it was linkable with other peoples' code for other uses, would you
accept that in your code, or would it fork off into a separate line of
development (which imo would be less desirable) ? I still haven't got
round to looking, maybe it's like that anyway ...


> Actually, I do think this is a bit overblown.  The "kludge"  approach
> is  a  fairly small chunk of code, and seems to work pretty well.  We
> can probably construct some pathological cases (like !fff!fff!),  but
> they  will be so rare in practice that we can just shrug and look the
> other way.  I think the line-wrap problem is actually a bigger  mess,
> since it produces illegal abc.

Yes ... the presence of odd numbers of !s would be a dead giveaway (is
anyone proposing a "!thingy!" construct that could break across lines ?
heh heh ...) - in practice I imagine it would be hard to constuct
something that a kludge wouldn't catch.
> 
> One suggestion for a parser might be to bury this problem inside  the
> input  routine.   It  can easily implement the kludgery to detect the
> abc2win ! and replace it with a space.  The resulting abc  should  be
> amenable to systematic parsing.
> 
> I do wish that abc2win would itentify itself early in the headers.

An argument for preprocessor scripts, like "grep" ...

Or possibly for "canonicalising" mirror sites, though this could get
ugly.

-- 
Richard Robinson
"The whole plan hinged upon the natural curiosity of potatoes" - S. Lem

To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html

Reply via email to