unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Christian Johansson <christian@cvj.se>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: phps-mode
Date: Wed, 17 Jul 2019 11:36:18 +0200	[thread overview]
Message-ID: <B932FC3D-29CD-4132-96DB-615314096992@cvj.se> (raw)
In-Reply-To: <D86BA77B-FFBE-48F0-9CA7-D049615EE2C4@acm.org>

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

Ah I missed that, the original re2c regex is
[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*

(from https://github.com/php/php-src/blob/master/Zend/zend_language_scanner.l#L1252)

But I’m not sure about the equivalent in emacs-lisp but I know PHP does not fully support UTF-8 yet.

Is the equivalent
"[a-zA-Z_\u0080-\u00FF][a-zA-Z0-9_\u0080-\u00FF]*"
?

> 17 juli 2019 kl. 10:44 skrev Mattias Engdegård <mattiase@acm.org>:
> 
>> 17 juli 2019 kl. 07.43 skrev Christian Johansson <christian@cvj.se>:
>> 
>> Thanks for your review, I should have fixed all those items now and pushed them to ELPA
> 
>> (defvar phps-mode-lexer-LABEL
>> "[a-zA-Z_\u0080-\u00FF][a-zA-Z0-9_\x80-\xff]*"
> 
> Unfinished?
> 
> It looks like PHP accepts any Unicode character above and including U+0080 in labels implicitly, by including 80-ff at the byte level and the implicit fact that most PHP code is in UTF-8. So your regexp would probably be something like
> 
> "[A-Za-z_[:nonascii:]][0-9A-Za-z_[:nonascii:]]*"
> 
> You could always try and see if your code correctly treats $γνῶσις, say.
> 

[-- Attachment #2: Type: text/html, Size: 2611 bytes --]

  reply	other threads:[~2019-07-17  9:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-16 10:00 [ELPA] New package: phps-mode Mattias Engdegård
2019-07-17  5:43 ` Christian Johansson
2019-07-17  8:44   ` Mattias Engdegård
2019-07-17  9:36     ` Christian Johansson [this message]
2019-07-17 12:24       ` Stefan Monnier
2019-07-17 20:27     ` Christian Johansson
  -- strict thread matches above, loose matches on Subject: below --
2019-07-12 17:15 Christian Johansson
2019-07-12 22:35 ` Stephen Leake
2019-07-12 23:36 ` Lars Ingebrigtsen
2019-07-13 13:14   ` Stefan Monnier
2019-07-13 13:28     ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=B932FC3D-29CD-4132-96DB-615314096992@cvj.se \
    --to=christian@cvj.se \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).