On 2/14/08, Daniel Kinzler <daniel(a)brightbyte.de> wrote:
That is, the grammar should NOT know about
<ref>, not what it does, not even
that it exists. It should simply have a facility that allows externam (php) code
to handle the characters (unchanged!) between (some specific) tags.
Right. The grammar will recognise the concept of an xml-style tag,
then use a lookup at runtime to decide whether that particular tag is
to be treated literally or fed to an extension. That's easy to do in
the ANTLR framework. That assumes, of course, that the extension can
work purely on the basis of the input it's fed, and doesn't need
access to the rest of the document in whatever state...
Steve