On Dec 7, 2009, at 4:07 PM, Oliver Hunt wrote:
<snip>
OTOH, if we standardize an AST format, then presumably we'll be
adding
a source->AST API function that uses the implementation's existing
parser.
I'd be worried about assuming that this is an obvious/trivial thing
for implementations to do, you're effectively requiring that the
internal AST representation of an implementation be entirely
standardised. For example it is not possible for JSC's parser to
produce an AST that exactly matches the input code -- I would expect
similar problems with other implementations.
This is a good point, we've talked here before about bottom-up vs. top-
down parser trade-offs, left- vs. right-associativity for && and ||,
etc.
Also, some (at least Waldemar, IIRC) on TC39 have objected to
intermediating concrete syntax to semantics via an AST, since it
increases the size and complexity of the standard.
/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss