caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alain Frisch <Alain.Frisch@ens.fr>
To: Jeff Henrikson <jehenrik@yahoo.com>
Cc: Caml list <caml-list@inria.fr>
Subject: Re: [Caml-list] accidentally mutating caml grammar with camlp4?
Date: Sun, 15 Aug 2004 18:35:59 +0200 (MEST)	[thread overview]
Message-ID: <Pine.SOL.4.44.0408151829220.16742-100000@clipper.ens.fr> (raw)
In-Reply-To: <20040815161827.GB2742@respighi.local.>

On Sun, 15 Aug 2004, Jeff Henrikson wrote:

> The problem is that once I run all these, I somehow break the basic caml
> grammar.  I have used the keywords "int" and "float" as they are used in
> C, but somehow inadvertently I have made these valid caml expressions
> unparsable:

The occurences of "int" and "float" in the grammar have the side-effect of
registering these strings as keywords for the grammar lexer, but the Caml
grammar expect these to be regular identifiers, not keywords. Note that
you also register other keywords that could be used by OCaml code (e.g.
Type).

One possible solution is to use
  LIDENT "int"
instead of
  "int"
in your grammars (I didn't try it on your example, though).

Cheers,

 Alain

-------------------
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


      reply	other threads:[~2004-08-15 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-15 16:18 Jeff Henrikson
2004-08-15 16:35 ` Alain Frisch [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SOL.4.44.0408151829220.16742-100000@clipper.ens.fr \
    --to=alain.frisch@ens.fr \
    --cc=caml-list@inria.fr \
    --cc=jehenrik@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).