Why would it?

Someone posited a nested stack of parsers, this thread is discussing the
abandonment of  one parser when going to the next.  Really, the claim
that it should be up to the invoked parser to determine where to go next
allows the invoked parser to have syntax to return to the prior parser
if it chooses to provide that option.

So  #!endcomment  could be a perfectly valid termination of  #!comment
even if there is no #!endpython as much as we might like one.

It also seems like the case of the outer parser determining the end of
the text to which the inner parser is to be applied would be a useful
one, but since the outer parser doesn't know the details of the syntax
interpreted by the inner parser, it would be inappropriate to require
that all parser switches be so delimited.

So it seems like it would be useful to have a form of eval that has a
parser specification parameter (or indirect object?) in addition to the
usual string parameter.

    eval python "gibberish";

This would complement the parser switching syntax, and provide for text
that is delimited and escaped by the rules of the outer parser to be
interpreted by an inner parser.  Of course, not all parsers necessarily
would provide that feature, but if the standard perl6 parser did, that
would allow it to be the meta-language (which would please most of us).

"David L. Nicol" wrote:

> Brent Dax wrote:
>
> Yes, that is exactly what I had in mind, thanks for
> the validation.  Only the comment syntax would have to
> come back to a designated module, with another hashbang.
>
>
>         #!comment
>         yadda yadda yadda
>         blah blah blah
>         foo bar baz
>         #!VB6
>         foor=bar & frob()

--
Glenn
=====
Due to the current economic situation, the light at the
end of the tunnel will be turned off until further notice.


Reply via email to