caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Camlp4 3.10 - antiquotations in keyword position?
@ 2007-04-24  0:07 Aleksey Nogin
  2007-04-24  0:12 ` [Caml-list] " Nicolas Pouillard
  0 siblings, 1 reply; 3+ messages in thread
From: Aleksey Nogin @ 2007-04-24  0:07 UTC (permalink / raw)
  To: Caml List

In 3.09 we used to allow defining "infix" keywords by using 
antiquotations in inside the "EXTEND" and "DELETE_RULE" directives as 
follows:

--------------------------------------------------------------

(*
  * The prefix version of the infix expression
  *)
let prefix_name op =
    "prefix_" ^ op

(*
  * Add an infix keyword.
  *)
let add_infix (keyword : string) =
    EXTEND
       GLOBAL: expr;

       expr: LEVEL "expr1"
          ["expr1" LEFTA
           [ e1 = expr; op = $keyword$; e2 = expr ->
                <:expr< $lid:prefix_name op$ $e1$ $e2$ >>
           ]];
    END

(*
  * Remove the infix keyword.
  *)
let remove_infix (keyword : string) =
    DELETE_RULE
       expr:
          expr; $keyword$; expr
    END
--------------------------------------------------------------

This does not seem to be supported in 3.10. Is there some other way to 
achieve a similar effect in 3.10? Thanks!

Aleksey


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-04-26 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-24  0:07 Camlp4 3.10 - antiquotations in keyword position? Aleksey Nogin
2007-04-24  0:12 ` [Caml-list] " Nicolas Pouillard
2007-04-26 16:25   ` Aleksey Nogin

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