[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Denemo-devel] BarNumberCheck
From: |
Richard Shann |
Subject: |
[Denemo-devel] BarNumberCheck |
Date: |
Sat, 14 Aug 2010 10:13:03 +0100 |
The music function thing we have come across (eg \BarNumberCheck DIGIT)
is a feature that has come in since I did the denemo lex/yacc (in 2002?)
It works by pushing tokens (called EXPECT_xxx) back so that the lexer
then sees them; it pushes a number of these tokens, one for each
parameter to the music function, and a token EXPECT_NO_MORE_ARGS to end.
We should avoid all this for now by treating them as keywords. It does
mean adding in denemo-special parser rules, as you surmised. I think the
place for \BarNumberCheck is before this rule:
{NOTECOMMAND} {
return scan_escaped_word (YYText () + 1);
}
This rule is the one that will go and find \BarNumberCheck and so before
it we can put in things like
{"\\BarNumberCheck" DIGIT} { return $1 concatenated with $2}
in some suitable syntax.
This is the rule for the <notes, figures> states, music functions found
elsewhere will need rules elsewhere, but this may not happen for the
musicxml2ly output. In fact that may be the only one. And, as you say we
could just do yycontinue for it.
Richard
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Denemo-devel] BarNumberCheck,
Richard Shann <=