[PMCMS-discuss] MP4H with entity support
Status: Beta
Brought to you by:
dinsen
|
From: Anders D. <an...@di...> - 2001-09-28 12:40:12
|
Hi Denis I've begun adding support for user defined entities to MP4H, i.e. argument less macros that are invoked with ¯o-name; To do it, I've changed the parser and added a new builtin <define-entity>...</define-entity> similar to define-tag. There's also a new symbol table for entities. It works mostly, but evaluates the body of the define-entity builtin too early. I cannot track the problem. Can you help me. I've attached a patch, that can be applied against mp4h-1.2.0. Try ``make test'' and watch the second entity test fail. It fails because the following input to mp4h <define-entity foo>hello</define-entity> <define-entity bar>&foo;</define-entity>&bar; <define-entity foo>hello world</define-entity>&bar; should produce: hello hello world but produces: hello hello The trouble seems to be that the body of the define entity macro is evaluated at the time the entity is defined, which is too early. It should not be evaluated until the macro is evaluated. That's the way define-tag works. Can you spot the obvious problem with my code? - Anders -- Anders Dinsen an...@di... http://dinsen.net/anders/ |