On Tue, Dec 16, 2014 at 4:15 PM, Kevin Smith <[email protected]> wrote:
>
> We cannot tell with just two tokens of lookahead whether we need to parse
> a concise method or a function declaration.
>
[...]

> Otherwise, are there any other parsing tricks which might help out?  (I'm
> not 100% sure what our constraints are with respect to lookahead or rewind.)
>

Um, use three tokens of lookahead?

It doesn't seem like this is actually an ambiguous grammar, but maybe I'm
missing something.

I can recommend both ANTLR and peg.js as robust solutions that can handle
arbitrary lookahead.
  --scott
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to