On Tuesday 02 October 2007, Francisco Vila wrote: > I'm sorry, cannot find an earlier message where Mr. percival asked if "e'1" > is an expression. He was aswered yes, just as "1" is a (minimal) math > expression. > > IMO this is not so easy. [Numerical or symbolical] math expressions can > substitute another expressions as long as sintaxis allows it. But, can e'1 > without curly braces substitute a true expression as { e'1 } ? > > It would be fine if the sintax diagrams of the LP input language were > easily available. I remember that Pascal lenguage tutorials were completely > based in these diagrams. This would be too much for someone, but always > served as a reference.
You may want to look at the parser, the file lily/parser.yy IIRC. You can probably find some tool to automatically visualize the parser somehow. There are two problems with creating a detailed documenting over the grammar: 1. It would require maintenance. 2. The .ly language is currently quite dirty, so a diagram would still be confusing in some places. Regarding your question, { e'1 } vs e'1: Those expressions are semantically equivalent. In some situations, the parser expects a 'composite' music expression (on the form { ... } or << ... >> or similar). This only has syntactical reasons, it is easier to find the end of an expression if it's composite. Erik _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel