From: "Harrison, John R" <john.r.harrison@intel.com>
To: <caml-list@yquem.inria.fr>
Cc: "Harrison, John R" <john.r.harrison@intel.com>
Subject: Hacking the lexer in the new camlp4
Date: Wed, 28 Mar 2007 15:22:02 -0700 [thread overview]
Message-ID: <509223F0BF55E74FA1247D17207E7A0C01433C3E@orsmsx419.amr.corp.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 884 bytes --]
I haven't really been following the discussion about the new camlp4,
but it seems quite a lot has changed.
I only use some fairly simple extensions to parsing (a few new infix
names, and forcing anonymous expressions "..." to become "let it =
..."). However I also make two invasive changes to the lexer:
* Modify the lexical rules for deciding whether a name is a regular
or special identifier (not just based on case of the first letter)
* Change the quotation delimiters to be `...` rather than <<...>>
In the current camlp4, the only way I found to do this was basically
to copy the existing lexer and edit it. Although it works, it's ugly
and invariably means that I've had to change something with almost
every new version of camlp4. Does the new camlp4 offer a nicer way of
changing the lexer?
John.
[-- Attachment #2: Type: text/html, Size: 4398 bytes --]
next reply other threads:[~2007-03-28 22:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-28 22:22 Harrison, John R [this message]
2007-03-29 9:30 ` [Caml-list] " Nicolas Pouillard
2007-03-29 15:11 ` Harrison, John R
2007-03-29 15:29 ` Nicolas Pouillard
2007-03-29 17:07 ` skaller
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=509223F0BF55E74FA1247D17207E7A0C01433C3E@orsmsx419.amr.corp.intel.com \
--to=john.r.harrison@intel.com \
--cc=caml-list@yquem.inria.fr \
/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