On Wed, 10 Mar 2004, Steven Bennett wrote: > I'm in the process of writing Yet Another ABC Parser > as part of a larger project I've been working on for > a while.
Hi Steve, As the person responsible for the ABC 2.0 draft spec, I find it great that you are investing time in the development of ABC. Unfortunately, since last August I haven't had much time to work on the further clarification of the spec. (I'm afraid this will have to wait for summer again...); basically all I've been doing is lurking this list and taking notes for my todo list. Although the current draft is clearer and more comprehensive than 1.7.6, I'm the first to admit that there are still quite a lot of things in the draft that need to be ironed out. One of the main issues that need to be dealt with is an detailed analysis and determination of the allowed syntactical groupings in ABC. For example: should it be possible to have multiple voices [V:] within one part [P:], or should it be possible to have multiple parts in one voice? Personally I would opt for the first grouping, but the draft says nothing about it at present. Maybe Henrik Norbeck would still be willing to give some help in this part of the job? Furthermore, feedback from people (like you) who are writing a grammar for a real-life ABC parser would be very useful. Other things on the todo list: - proper definition of technical terms used (someone noticed that I never specified what I meant with the term "note group") - explicitly stating the differences between s: and w: lines (symbols can be aligned with barlines and rests, words cannot). - editing the section on stylesheets - editing the examples at the end of the spec > The quirk I'm wrestling with today is Continuation Lines, which seems to be > the biggest single area (and the biggest can of worms on the list archive) > where the 1.6 & 1.76 specs seriously conflict with the 2.0 draft spec. This is very true; conversely it was one of the biggest improvements in clarity of 2.0 over 1.76 > So I'm going to implement both and allow the user to decide which to > use via a runtime switch. This seems to be the only feasible option. > And this too %%and this isn't an xcommand %%-style commands may only appear at the start of a line, i.e. on a line by themselves. > % But is this a comment? If you display > % the history field, is it included? > % I believe the answer should be No... Correct. > And what about this? X \ > Would this appear on the same line as the "X" \ > If the history was displayed to the user? (IMHO, Yes) It would form one logical line. How the logical line is formatted on the display is up to the program. > And here's the real challenge: \ % oh boy > O: Is this the Origin or part of the History? > > I think it's part of the history myself > And that *this* line is the last line of the history. > O: This is the real origin... Both correct. > As for the 1.6 and 1.7.6 specifications, regardless of what program X, Y, or > Z does, the written spec is awfully vague. I have several possible > approaches to different elements of this, but the basic concept appears to > be that "\" at the end of a line isn't so much a continuation, but a "don't > break the staff here if you would normally". No. In 1.* it basically meant: continue on the next line of the same type. (Whereas in 2.0 it means: continue on the next physical line, regardless of the context) > The question becomes how to deal with comments. I saw plenty of discussion > of whether the "\" is ignored if it follows a comment, or whether it's > invalid if it isn't the very last character on the line. I guess it depends > on whether you look for the "\" first or the comment first. Is there any > consensus out there as to which is the proper approach when you are parsing > files using pre-2.0 continuations? (Or should I make *that* a user switch > as well...) The 2.0 spec is quite clear about this: first remove any end-of-line comments and whitespace, than look if there is a "\" at the end of the line and handle it. On the other hand, the 1.* spec did not allow anything to appear between the "\" and the end-of-line; it is not clear if it would allow a comment to appear before the continuation mark. Groeten, Irwin Oppenheim [EMAIL PROTECTED] ~~~* ABC Standard: http://abc.sourceforge.net/standard/ Chazzanut Online: http://www.chazzanut.com/ Synagogue Choir: http://www.ask-choir.org/ Business: http://www.amsterdamhotelspecials.com/ To subscribe/unsubscribe, point your browser to: http://www.tullochgorm.com/lists.html
