Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Conglun Yao <yaoconglun@gmail.com>
Cc: Caml_mailing list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] camlp4 questions
Date: Fri, 04 Apr 2008 15:42:57 +0200	[thread overview]
Message-ID: <1207316493-sup-1017@ausone.inria.fr> (raw)
In-Reply-To: <f7b50d2a0804040059j68074f09xea2dd02407508ce0@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 963 bytes --]

Excerpts from Conglun Yao's message of Fri Apr 04 09:59:09 +0200 2008:
> Hi,

Hi,

> While doing my little camlp4 (3.10) practice, I had the following questions:
> 

[...]

> (2) How to extend operators like '@', for example if I want to change the
> expression
> list_1 @ list_2 => List.append list_1 list_2
> 
> In 3.09, it could be achieved by deleting rules
> DELETE_RULE Gram expr: SELF; "@"; SELF END
> 
> however, in 3.10, it seems I can't find the above grammar, only can find in
> Camlp4OCamlParser.ml
> expr: AFTER "^"
> [ "::" RIGHTA
> [ e1 = SELF; "::"; e2 = SELF -> <:expr< [$e1$ :: $e2$] >> ]
> ];

You   should   have   to  also  check  in  Camlp4OCamlRevisedParser.ml,  since
Camlp4OCamlParser.ml is now just an extension of the former.

> Furthermore, if I want to extend the expr: "["; sem_expr_for_list; "]",
> where to find the rule definition.
> In 3.09, all of these exist in pa_o.ml

Same answer.

Regards,

-- 
Nicolas Pouillard aka Ertai

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

  parent reply	other threads:[~2008-04-04 13:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  7:59 Conglun Yao
2008-04-04  8:38 ` [Caml-list] " Richard Jones
2008-04-04  9:56   ` Conglun Yao
2008-04-04 13:42 ` Nicolas Pouillard [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-08-06 14:57 [Camlp4] questions Raphael Proust
2010-08-09  7:04 ` [Caml-list] " Hendrik Tews
2007-07-23  9:46 camlp4 questions Christophe Raffalli
2007-07-25  8:29 ` [Caml-list] " Nicolas Pouillard
2002-02-08 21:24 [Caml-list] Camlp4 questions Harrison, John R
2002-02-09 10:30 ` Daniel de Rauglaudre

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=1207316493-sup-1017@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=yaoconglun@gmail.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