From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by c5ff346549e7 (Postfix) with ESMTPS id 38A575D5 for ; Wed, 24 Jul 2019 15:31:59 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.64,303,1559512800"; d="scan'208";a="393178608" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 24 Jul 2019 17:31:57 +0200 Received: by sympa.inria.fr (Postfix, from userid 20132) id EA08182718; Wed, 24 Jul 2019 17:31:57 +0200 (CEST) Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id CD59F826CE for ; Wed, 24 Jul 2019 17:31:48 +0200 (CEST) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=daniil@baturin.org; spf=Pass smtp.mailfrom=daniil@baturin.org; spf=Pass smtp.helo=postmaster@baturin.org IronPort-PHdr: =?us-ascii?q?9a23=3ASIkyihXaHuyvFV613LzU63Yyx7zV8LGtZVwlr6E/?= =?us-ascii?q?grcLSJyIuqrYbBWFt8tkgFKBZ4jH8fUM07OQ7/m6HzxYqsbb+Fk5M7V0Hycfjs?= =?us-ascii?q?sXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aFRrwLxd6?= =?us-ascii?q?KfroEYDOkcu3y/qy+5rOaAlUmTaxe7x/IAiooQnLtcQanYRuJ6UvxhDUvnZGZu?= =?us-ascii?q?NayH9yK1mOhRj8/MCw/JBi8yRUpf0s8tNLXLv5caolU7FWFSwqPG8p6sLlsxnD?= =?us-ascii?q?VhaP6WAHUmoKiBpIAhPK4w/8U5zsryb1rOt92C2dPc3rUbA5XCmp4ql3RBP0ji?= =?us-ascii?q?oMKiU0+3/LhMNukK1boQqhpx1hzI7SfIGVL+d1cqfEcd8HWWZNQsNdWipcCY2+?= =?us-ascii?q?coQPFfIMM/tGoYnzp1UArhWwCgejC+zt1jBGiWT73bEj0+k7DQ3KwAItEtIIvX?= =?us-ascii?q?/JrNv1LqASUeWtwafG1zrDafJW2Tb56IPVbx0uu+2MXa9qccrQz0kkCgTIgUiK?= =?us-ascii?q?pozjPjOV1+ANvnOA4OV6SeKvlnQnqwB3ojS1wccskIbJi5sTx1vZ+yt5x4M1Ks?= =?us-ascii?q?e5SE59edOkH5pQtz2aN4trWcwuWX1nuCE/yrAApJW1fzAKxYwoyhPecfCLbYiF?= =?us-ascii?q?7xz5WOqPPTt0mmhpdK++ihuz6UStxezxWtOq3FtErydJiMTAu34D2hDJ9MSLV+?= =?us-ascii?q?dx80G80jiVzQ/T8PtLIUUsmKrbNZEhxrkwm4IIvkvZAi/2hV/2jK6Qdkk+/eio?= =?us-ascii?q?8evnbq3npp+aKYB0lhnzP6svl8ClH+g1MgYDU3KF9eigyrHv51D1TbRLg/Eul6?= =?us-ascii?q?nWqpHaJcAVpq6jBA9V154u5AulADeg0dQYnH0HIUledx2dk4jpJkvOIPH+Dful?= =?us-ascii?q?hFSsijhry+jcPrL9GpXNMmTDkLD5cLlh8UFczQ4zwclb55JVEbEBPOn+WlTxtd?= =?us-ascii?q?zdFh82KRa4w+fhCNVn14MRQ3iDAqGDMPCajVjdxOUkLu2dYrguOSz6N7Bx5fnl?= =?us-ascii?q?gHsonxkGcLOuwbMKY3n+EO4wcGuDZn+5rt4HEGYO9iA3UPHwiVvKBTJaYXezW4?= =?us-ascii?q?o27y0mEoOgS4DZSdb+0/S6wC6nE8gONSh9AVeWHCKtLt3cAqZeWGepOsZk1wc8?= =?us-ascii?q?e/2kQo4l2wupsVahmbBuMvfO+ytesojshoEsu7/j0Coq/DkxNPyzlnmXRjgvzG?= =?us-ascii?q?kBWyIs3aY5plZymA/ajPpIxsdAHNkW3MtnFwc3MZmFlL5wAszvQAPHONCTRwT/?= =?us-ascii?q?Tw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BTBACYeDhd/6bK/S5lhDBHJlIgEiqNG?= =?us-ascii?q?Il4LYNklxUJAQMBDCMJAQIBAYRAAgiCbQYBBDQTAQMBAQQBAQIBAwMBbIUeDII?= =?us-ascii?q?6KQGCZwEFQAEBNwEPCxgcElcGDQYCAQGDHgGCDgurboIjgnkBAQWFcYE/AwaBN?= =?us-ascii?q?IpDgTSBf4ERJ4JrPoJIGQICgV+FY5U7lTQJghthhXiIbAWEQCF0jTuJW4xYiCm?= =?us-ascii?q?QMoFnIYFYMxoIKAg7gmyCThcUgzqFFIVLMzOBBAGOJAEB?= X-IPAS-Result: =?us-ascii?q?A0BTBACYeDhd/6bK/S5lhDBHJlIgEiqNGIl4LYNklxUJAQM?= =?us-ascii?q?BDCMJAQIBAYRAAgiCbQYBBDQTAQMBAQQBAQIBAwMBbIUeDII6KQGCZwEFQAEBN?= =?us-ascii?q?wEPCxgcElcGDQYCAQGDHgGCDgurboIjgnkBAQWFcYE/AwaBNIpDgTSBf4ERJ4J?= =?us-ascii?q?rPoJIGQICgV+FY5U7lTQJghthhXiIbAWEQCF0jTuJW4xYiCmQMoFnIYFYMxoIK?= =?us-ascii?q?Ag7gmyCThcUgzqFFIVLMzOBBAGOJAEB?= X-IronPort-AV: E=Sophos;i="5.64,303,1559512800"; d="scan'208";a="393178460" X-MGA-submission: =?us-ascii?q?MDGZUgbQy3FhJrWAjL+X6f2ht68TPLE5dLBHde?= =?us-ascii?q?HYoo10fjaJvw5ISaS+1+td+SRklYTQAVzi8tnvt2D3SgveAbQwn3i+sX?= =?us-ascii?q?61qBqSlV4kXMPZrphGV7daDnSqIyql8S6HwGX3Wk4o8l71d/iSIK1Aa+?= =?us-ascii?q?+HjdymrdZmrz9u7Ncue4pM9Q=3D=3D?= Received: from srv.baturin.org (HELO baturin.org) ([46.253.202.166]) by mail2-smtp-roc.national.inria.fr with ESMTP; 24 Jul 2019 17:31:48 +0200 Received: from careless.baturin.tld (static-user-46-236-133-210.tomtelnet.ru [46.236.133.210]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by baturin.org (Postfix) with ESMTPSA id B74AC1A0112; Wed, 24 Jul 2019 11:31:46 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baturin.org; s=default; t=1563982306; bh=pj+tDvo1FIP+Twm/R+R8605MyGgmbkH8BU3/eiKVNTc=; h=Subject:To:Cc:References:From:Date:In-Reply-To; b=ZdEYgRKnaas8arBHpazgquDV0FpOG1osyVSPmNJ2JuEcvBQcLOCwEHMLnbetcw7lH y7OQf15mv6Cb9NhF0Vx9uyy+Ze2IZnc5bBByqMKQvWQZKBFOZFV4WhiLww+apcIs7i gN0TDsY2B51jjf/IuFBYKj9JubgHwRC5z/+afmuE= To: =?UTF-8?Q?Jocelyn_S=c3=a9rot?= Cc: caml users References: <20190627134517.hzhbmjkihidxlnkz@annexia.org> <45419C48-63D3-4981-B54C-3EEA1F4A6FE6@recoil.org> <7a79b78d-fac2-7e8e-bb82-680c1838149d@baturin.org> <5CE377AD-CB06-4261-BD26-A2A697253F02@uca.fr> <393603fa-0efa-5714-82da-ba4bc3e869b8@baturin.org> <8748682C-8208-4FF7-A632-D8E06B80960A@uca.fr> From: Daniil Baturin Openpgp: preference=signencrypt Autocrypt: addr=daniil@baturin.org; keydata= mQINBE/mdNsBEADyIlvJPoSb1a0sFJ9LVCxBN8E4yQjexL+5a/+hSqDSNKsppFnfJj/oBuP3 J4FCKvi03gea6CNo658JMFrKNE7yGO2fXpYJwQZgHonaX3j7oPYwI2lWgJbUleTs159pXkR7 OyboPIiL0mErOLLIaHjdtXDKY8zn/Jm14zrnjhXRJVcEDeLyup3iUYTPTjbfXqj04XrNypvn b9dDnZbJb5auGGrESnAzDoaw8FiwQERtQLmXAq34FqzHbp6Kk2dDXAMXF4K6wNe/hQ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slnZmt9uJybcodIIKg8O7pm taLYaBVzEfQdwQIsa8hBlx65cK1LQlEarDw4kUmER/WN3N7V/6tATgHBlHok9MCz84zwS5v7 T1c63YjOvDmMuFLaRm7tRyUNr++tqf1a0ZVp6R5T/3UYXpIZONvQkzzRe6PTRh8+5yGSUuzk J/pr2Sw+5x7qraWwKY0/aOltk4BPZ+cXSjqBXEWBijKJF0B7iyVRAI2f54vLe7XXw5+NutCX TF+yyU383feiSzcqc8/Ua/HcjrceFAXtSCcccwRXwiQ5qL8GSYmplH/MykiW0QU5cNL7HMKM G+yB+itXGgzbYekfVdfGI6sawQr7Qzd2U+pyTGrnausS5OC0RJTaqudvu0QUnGg9VsWZlQVi qjVeHIGu5c96CmO8LgzreRaLgXaq/h/y7mpk9pq7Amw2SpmBjltpgG/I4p00WK4mcCPtaPWM /cS9kBw+zWoo2l0Ld7Mwc0Q5xAbu7f3fX0MHCfvxqYf+pISrt8F069m94osHG65xo0U= Message-ID: Date: Wed, 24 Jul 2019 22:31:43 +0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <8748682C-8208-4FF7-A632-D8E06B80960A@uca.fr> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Content-Language: en-US Subject: Re: [Caml-list] Camlp4-free implementation of stream parsers (was camlp4 & OCaml 4.08) Reply-To: Daniil Baturin X-Loop: caml-list@inria.fr X-Sequence: 17704 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Hi Jocelyn, I've completed the first version of my project, so now I can start looking into this again! There's a third option: parser combinators like angstrom. My experience with Menhir is very positive though. After initial struggle, I came to like its new incremental API and declarative error reporting. Here's my parser for an extended BNF: Menhir grammar: https://github.com/dmbaturin/bnfgen/blob/master/src/bnf_parser.mly Parser driver that feeds it tokens: https://github.com/dmbaturin/bnfgen/blob/master/src/parse_bnf.ml Error messages: https://github.com/dmbaturin/bnfgen/blob/master/src/bnf_parser.messages Error message module build: https://github.com/dmbaturin/bnfgen/blob/master/src/dune#L6-L8 On 7/24/19 10:10 PM, Jocelyn S=E9rot wrote: > Hi Daniil (and everyone interested by the subject), > > Did you have a closer look at this ?=20 > > I=92m still hesitating between these three approaches for replacing the= implementation of the small arithm expression parser used in Lascar [1] = : > > i. rewrite it using the basic fns provided by the Stream library (pro: = no additionnal dependency, cons: not so trivial..) > > ii. replace camlp4 by camlp5 (pro: straightforward, cons: long term mai= ntainability of camlp5 (?))=20 > > iii. rewrite it using ocamlex/menhir and embed it in the main code (pro= : =AB standard =BB soon; cons: a bit heavy) > > Jocelyn > > [1] https://github.com/jserot/lascar/blob/master/src/lib/fsm_expr.ml, l= ines 70=96112 > > Le 2 juil. 2019 =E0 11:25, Daniil Baturin a =E9cri= t : > >> Hi Jocelyn, >> Camlp5 is still sort of maintained, but I don't think it's going to be= >> developed beyond compatibility updates. >> For syntax extensions, everyone is switching to PPX. >> >> From a quick look, it seems like the only bit of camlp4 you use is >> stream expressions. >> This is one of the things PPX can't do (on purpose, since it doesn't >> allow _arbitrary_ extensions), >> but I don't think just using streams directly is going to make code mu= ch >> longer. >> >> Or I missed some other camlp4 bits? >> >> I'm ready to work on a patch if you are open to it. >> >> On 7/2/19 1:44 PM, Jocelyn S=E9rot wrote: >>> Le 29 juin 2019 =E0 17:15, Daniil Baturin a =E9c= rit : >>> >>>> Perhaps we should make some coordinated effort to help them. >>>> I've just sent a pull request to the ocamldot maintainer that enable= s >>>> the graphviz files parsing and printing modules >>>> to build and work with 4.08. The GTK parts have their own issues. >>>> Next I'm going to look into LASCAR/RFSM (packages that interest me f= irst ;). >>>> >>> Hi Daniil, >>> >>> I=92ve been been thinking of removing the dependency of Lascar and RF= SM on camlp4 for a while. >>> Is switching to CamlP5 a good alternative ?=20 >>> >>> Jocelyn >>> >>> >>