Nested Quasis

Brendan Eich brendan at
Tue Feb 7 16:40:38 PST 2012

I like Erik's way, but it makes a strange loop from lexical to syntactic 
grammar. It all works, I believe.

The loop is here:

     QuasiHole ::
         { Spacing* Expression Spacing* }

Expression is a syntactic grammar non-terminal, yet here we are in a 
lexical production.

Waldemar, is this sound?


Mark S. Miller wrote:
> On Tue, Feb 7, 2012 at 3:47 PM, Waldemar Horwat <waldemar at 
> <mailto:waldemar at>> wrote:
> [...]
>     To illustrate the problem, consider a simpler lexer rule:
>     TokenSequence ::
>      Token*
>     This will lex ainb as many things, including for example a in b.
> I now understand your objection. Rather than trying to repair my way 
> of saying this, do you find Erik's approach clear? If so, let's just 
> start there. It does correspond exactly to what I've been trying to 
> explain.
> -- 
>     Cheers,
>     --MarkM
> _______________________________________________
> es-discuss mailing list
> es-discuss at

More information about the es-discuss mailing list