<br><br><div class="gmail_quote">On Thu, Jan 31, 2013 at 8:42 AM, Alain Frisch <span dir="ltr"><<a href="mailto:alain.frisch@lexifi.com" target="_blank">alain.frisch@lexifi.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>On 01/31/2013 02:32 PM, Hongbo Zhang wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Would you mind elaborating a bit why it will complex editor support?<br>
</blockquote>
<br></div>
The content of a quotation can use arbitrary grammar and even arbitrary lexical rules.<br>
<br>
If the editor cannot lex the content of the quotation, it cannot produce nice colors for lexical entities in it.  If emacs produce decent colors on some example with quotation, it is only because it does not know anything about quotation and the example is simple enough so that applying OCaml rules works quite well.  But if the content of the quotation follows other lexical rules, emacs gets confused. Write:<br>


<br>
  let x = foo << " >> bar<br>
<br></blockquote><div>This is unfair, how do you overcome this problem in ppx. The same thing, except that you don't use it</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


and emacs will color ">> bar" as if it were a string.  The only decent think an editor could do with a quotation is to understand where it stops and not try to do anything clever with it.  If we adapt the OCaml emacs mode to recognize camlp4's quotation and do that, you won't get any colors within quotations (correct behavior, but not if you write non-trivial multi-line OCaml expressions in it, as in your 'sedlex' version).<br>


<br>
Even if the lexical conventions are right, the editor cannot produce correct indentation if it doesn't know the grammar used inside the quotation.<span><font color="#888888"><br>
<br>
<br>
Alain<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>-- Regards, Hongbo