Existential Operator / Null Propagation Operator

Brendan Eich brendan at mozilla.org
Wed Apr 8 01:24:31 UTC 2015


joe wrote:
> That's a good point.  Are lexical non-DFA grammars allowed?  It would 
> be trivial to solve that with a regular expression lookahead.  
> Although I suppose at that point you might as well call it a cover 
> grammar.

We must avoid being too clever -- it complicates implementations and 
inevitably incurs future-hostility to extensions we may want, if not 
outright bugginess.

All of this suggests prefix ? is the better course. Anyone have 
counterexamples?

/be
>
> Joe
>
> On Mon, Apr 6, 2015 at 2:42 PM, Brendan Eich <brendan at mozilla.org 
> <mailto:brendan at mozilla.org>> wrote:
>
>     joe wrote:
>
>         By the way, I don't remember having grammar issues (I use a
>         LALR compiler-compiler).  Looking at my code, it looked like I
>         handled it in the tokenizer stage; I added a COND_DOT token:
>
>         COND_DOT : \?\.
>
>
>     Did you keep backward compatibility? `x?.1:y` must continue to work.
>
>     /be
>
>
> No, it looks like I didn't.


More information about the es-discuss mailing list