[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Parser error with self-defined predicate symbol-or-markup? in markup
From: |
Reinhold Kainhofer |
Subject: |
Re: Parser error with self-defined predicate symbol-or-markup? in markup function |
Date: |
Mon, 31 Jan 2011 21:27:16 +0100 |
User-agent: |
KMail/1.13.5 (Linux/2.6.35-25-generic; KDE/4.6.0; i686; ; ) |
Am Mittwoch, 26. Januar 2011, um 20:00:31 schrieb David Kastrup:
> Reinhold Kainhofer <address@hidden> writes:
> > I'm defining my own predicate symbol-or-markup? for the argument of a
> > markup function.
[...]
> > but, as soon as I try to pass a markup, the parser complains that it
> > expects an SCM_IDENTIFIER or SCM_TOKEN:
> > \markup \mytest "test" \bold "f"
> >
> > markup-or-symbol.ly:15:21: Fehler: syntax error, unexpected STRING,
> > expecting SCM_IDENTIFIER or SCM_TOKEN
> > \markup \mytest "test
> > " \bold "f"
>
> markup? is specially detected and implemented in the parser. It is
> never actually called but rather used as a switch.
>
> markup-or-symbol? isn't. All predicates not recognized as markup? or
> markup-list? expect a Scheme expression that will then be checked for
> validity using the respective predicate.
Okay, so it is currently not possible to write a markup function that takes a
markup or symbol (or any other scheme expression) as its argument?
Cheers,
Reinhold
--
------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org