[antlr-interest] Languages within HTML

Darien Hager darien.hager at etelos-inc.com
Thu Jan 31 13:41:25 PST 2008


On 1/31/08, Stuart Watt <SWatt at infobal.com> wrote:
>
> An intriguing problem. I did not expect this work in PHP, and if the PHP
> was
> intended to be processable as XML it would be invalid, as the markup tags
> would cease to be processing instructions. PHP authors are usually
> encouraged to do <? echo("?".">"); ?> or similar. I
>
> This processing model implies that PHP may need to be the "root" grammar,
> with the HTML elements handed off to other grammars if and when needed.
>

It's a good question: Is the PHP parsing engine too lenient, and
should normatively
fail in that example to comply with XML processing instruction rules? I
don't think you can put CDATA inside PI blocks...

I'm not sure if the PHP language has "embeddable in accordance with XML" in
it's specs or whether it's just a happenstance similar naming from something
in SGML.

-- 
Darien Hager
Developer
Etelos, Inc.
darien at etelos.com

http://www.etelos.com
"Revolutionizing the way applications are developed, distributed and
consumed."

This e-mail message, including attachments, may contain confidential
information for the sole use of the intended recipient(s). If you are not
the intended recipient, then this is notice that any use, disclosure,
dissemination, distribution or copying is strictly prohibited. If you have
received this message in error please contact the sender by reply mail and
destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080131/418e9ca5/attachment.html 


More information about the antlr-interest mailing list