For the block NOTES statement, the symtax is
NOTES ( SYMBOL_TOK ( fvarlist BRACEDTEXT_TOK )+ )+ END NOTES ';'
Here I am using () as part of the meta-language to describe the syntax to you, they are not part of the formal grammer. An example is
NOTES 'text' a,b,c { Here is some text } d { Here is more text } 'html' SELF { <bold>html sucks</bold> } END NOTES;
Note that the only punctuation is the `,' between the members of the fvarlist and the closing `;'. Right now, the term `SELF' would be eaten in the fvarlist production. I'm not sure if this is what we should do (which requires having the notes processing do something special when it sees SELF in the fvarlist), or if we should create a SELF_TOK token. The latter is certainly easier to implement from the parser's perspective, which is why I did it that way.
The block NOTES statement doesn't do anything with its stuff either, the symbols and {bracedText} get dropped on the floor and I destroy the fvarlist, but that all that happens.
The `notes_body' and `noteslist' productions return `notes_ptr', which right now is a `void*' until we can decide what type of data structure we want to handle NOTES.
As an amusing side note, the parser will currently eat the following:
NOTES 'fun' name "put some text here" {put more text here} END NOTES;
Like I said, this is so the parser will eat them; it's not being real smart about what it does with them.
For debugging the NOTES stuff, set the DEBUG_NOTES macro to the following:
define DEBUG_NOTES(s) FPRINTF(stderr,"****DISCARDED NOTES:\n%s****\n",(s))
To completely ignore the NOTES, set DEBUG_NOTES to the following:
define DEBUG_NOTES(s) 0
Note that if you do the latter, you'll get `statement with no effect' warnings from gcc -Wall.
-- Mark Thomas Thursday, 13 March 1997
1.5.1