From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 B9F1C7F7B4 for ; Thu, 13 Feb 2014 21:55:41 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of agarwal1975@gmail.com) identity=pra; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of agarwal1975@gmail.com designates 209.85.216.53 as permitted sender) identity=mailfrom; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="agarwal1975@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qa0-f53.google.com) identity=helo; client-ip=209.85.216.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="agarwal1975@gmail.com"; x-sender="postmaster@mail-qa0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsCAPUw/VLRVdg1lGdsb2JhbABZhBWCQb4fCBYOAQEBAQcLCwkSKoIcUAEbHgMSCAECBV0BEQEFARYMiAMBAxGWd4MKjF6DDpUkChknDWSHWBEBBQyTLASJSI5kkDYYKYR3Hg X-IPAS-Result: AnsCAPUw/VLRVdg1lGdsb2JhbABZhBWCQb4fCBYOAQEBAQcLCwkSKoIcUAEbHgMSCAECBV0BEQEFARYMiAMBAxGWd4MKjF6DDpUkChknDWSHWBEBBQyTLASJSI5kkDYYKYR3Hg X-IronPort-AV: E=Sophos;i="4.95,840,1384297200"; d="scan'208";a="58376621" Received: from mail-qa0-f53.google.com ([209.85.216.53]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 13 Feb 2014 21:55:41 +0100 Received: by mail-qa0-f53.google.com with SMTP id cm18so16732259qab.26 for ; Thu, 13 Feb 2014 12:55:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=IL/wOwrqxxONPdvFffCPZSxwy4IWj4tWomj5JQKmCWs=; b=XRbEuV671IWLtkYRsHIKt/LO4XYdrQb1/OK9AWDZQyNkuJ9d2cK1Qj4L6uyaW5CV5+ 0DAjicjeD2fPCeYidc2gFyfEC9obugHBMGPCKVUO2fTbky++sZIqdScLRJ0+Kjs35pb8 xuTna+mNtyC5sduOAUb6LTXbU/2J63epQiMThYyH5lCaaG3toBTqCi5e0/olaQsZkJ2e 8EOiQM6ipg5gr3sDDzLXRUdvsa16GVt9I0nd6cVf1DDPB/nAo5VmEwFTIeneF1nhdkJy 0huMuRHbDeNowzGOmNblA1qvitMyp0eOEgYTCsI1xEmgiujUk4f+ZQ+LIYAbAKFfCdh5 MGzA== X-Received: by 10.140.83.112 with SMTP id i103mr6084131qgd.100.1392324939939; Thu, 13 Feb 2014 12:55:39 -0800 (PST) MIME-Version: 1.0 Received: by 10.229.67.131 with HTTP; Thu, 13 Feb 2014 12:55:19 -0800 (PST) From: Ashish Agarwal Date: Thu, 13 Feb 2014 15:55:19 -0500 Message-ID: To: Caml List Content-Type: multipart/alternative; boundary=001a11c12c607506c504f24fe97a Subject: [Caml-list] menhir types cannot be open polymorphic variant --001a11c12c607506c504f24fe97a Content-Type: text/plain; charset=ISO-8859-1 $ cat parser.mly %token INT %start <[> `Got_int]> main %% main: INT {`Got_int} $ menhir parser.mly File "parser.mly", line 2, characters 11-11: Error: unexpected character(s). If I make the type exact [`Got_int], it works fine. Is there any way to get around this? I need an open type. --001a11c12c607506c504f24fe97a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
$ cat parser.mly
%token INT
%star= t <[> `Got_int]> main
%%
main: INT {`Got_int}<= /div>

$ menhir parser.mly
File "pars= er.mly", line 2, characters 11-11:
Error: unexpected character(s).

If I ma= ke the type exact [`Got_int], it works fine. Is there any way to get around= this? I need an open type.

--001a11c12c607506c504f24fe97a--