Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Nicolas Pouillard" <nicolas.pouillard@gmail.com>
To: Richard Jones <rich@annexia.org>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] camlp4 - can you customize the lexer?
Date: Sat, 10 May 2008 22:38:24 +0200	[thread overview]
Message-ID: <1210451796-sup-4649@ausone.local> (raw)
In-Reply-To: <20080509094036.GA30038@annexia.org>

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

Excerpts from Richard Jones's message of Fri May 09 11:40:36 +0200 2008:
> 
> The Camlp4 wiki contains an intriguing line "Connecting your own
> Lexer.", but no link or information.  I want to modify the OCaml lexer
> to add a syntax for integer literals of my own type.  Can this be
> done?  How?

Since  Camlp4,  is  now  a  lot  more  modular.  This can be done by providing
*another*  Lexer  module  with  a  compatible signature. Then one create a new
Camlp4.PreCast module by copy/pasting and using the new Lexer module.
However the default lexer of Camlp4 is not extensible.

Best regards,

-- 
Nicolas Pouillard aka Ertai

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

      parent reply	other threads:[~2008-05-10 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-09  9:40 Richard Jones
2008-05-09  9:44 ` [Caml-list] " Jon Harrop
2008-05-10 20:38 ` Nicolas Pouillard [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=1210451796-sup-4649@ausone.local \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=rich@annexia.org \
    /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