Compiling E: Phases of Transformations

Dan Bornstein danfuzz@milk.com
Wed, 9 Aug 2000 13:02:13 -0700 (PDT)


Mark S. Miller writes:
>Actually, using the previous quasi-parser example, I think we can
>disqualify comments for the same reason we disqualified #line-like
>directives. It is unreasonably burdensome on the definition of each
>quasi-grammar that they must understand any one universal (among
>quasi-grammars) commenting convention. Better to put the mapping on the
>side, in a separate argument to the compiler, than to impose this burden
>on all quasi-grammars. Making them all recognize ${<integer>} and such was
>bad enough.

So I have to ask: Why make quasiparsers recognize it? Why not just pass in
an array of hole locations as a separate argument to the quasiparser, the
same way you propose to pass on span information? (You'd presumably also do
the conversion of $$ before the quasiparser saw it.)

-dan