From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id UAA05836; Thu, 11 Sep 2003 20:20:55 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA08456 for ; Thu, 11 Sep 2003 20:20:53 +0200 (MET DST) Received: from smtp.wp.pl (smtp.wp.pl [212.77.101.161]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h8BIKqT16774 for ; Thu, 11 Sep 2003 20:20:52 +0200 (MET DST) Received: (WP-SMTPD 19938 invoked from network); 11 Sep 2003 18:20:52 -0000 Received: from pc118.legnica.cvx.ppp.tpnet.pl (HELO ppp) (luk_stafi@[213.77.239.118]) (envelope-sender ) by smtp.wp.pl (wp-smtpd) with SMTP for ; 11 Sep 2003 18:20:51 -0000 Message-ID: <000001c37891$61b2ba80$c617fea9@ppp> From: "Lukasz Stafiniak" To: Subject: [Caml-list] OCaml extensions and Emacs indentation Date: Thu, 11 Sep 2003 20:18:51 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-AntiVirus: skaner antywirusowy poczty Wirtualnej Polski S. A. X-WP-ChangeAV: 0 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lukasz:01 luk:99 indentation:01 indentation:01 tuareg:01 genial:99 messes:01 camlp:01 tuareg:01 indent:01 generic:01 camlp:01 bison:01 indented:01 lukasz:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, How do you deal with indentation when using syntax extensions? Tuareg, otherwise genial, instead of helping, "messes" the source using them. By extensions I mean Meta OCaml, Fresh OCaml, user extensions using Camlp4. More, Tuareg fails to indent record types with polymorphic fields. One solution would be to use generic indentation and other goods a la Semantic's. It takes a BNF-style grammar. An ultimate solution would be to port Camlp4 to Semantic to parse the OCaml source and pass the (translated) parse-tree to Semantic. This would require incremental parsing by Camlp4. At present, Semantic 2.0 uses Bison. More straightforward solution is to make the syntax indented by Tuareg customizable. Cheers, Lukasz ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners