Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regexp/syntax: code differs from tip after ./make_perl_groups.pl #22057

Closed
stemar94 opened this issue Sep 27, 2017 · 3 comments
Closed

regexp/syntax: code differs from tip after ./make_perl_groups.pl #22057

stemar94 opened this issue Sep 27, 2017 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@stemar94
Copy link

What did you do?

I ran

./make_perl_groups.pl|gofmt >perl_groups.go
git diff

What did you expect to see?

No output

What did you see instead?

diff --git a/src/regexp/syntax/perl_groups.go b/src/regexp/syntax/perl_groups.go
index effe4e6..05b4dd8 100644
--- a/src/regexp/syntax/perl_groups.go
+++ b/src/regexp/syntax/perl_groups.go
@@ -12,8 +12,7 @@ var code1 = []rune{ /* \d */
 }
 
 var code2 = []rune{ /* \s */
-       0x9, 0xa,
-       0xc, 0xd,
+       0x9, 0xd,
        0x20, 0x20,
 }

System details

uname -sr: Linux 4.4.0-96-generic
Description:	Linux Mint 18 Sarah
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.23-0ubuntu9) stable release version 2.23, by Roland McGrath et al.
lldb --version: lldb version 4.0.0 (git@github.com:apple/swift-lldb.git revision 70491313e5e2769ac79262a42062c85c05948905)
  Swift-4.0 (revision 3416108abd0df3997a533a14c5ad06de20ba8a60)
  clang revision b9d76a314c1e4c79217df9cd9d168d007e90a51c
  llvm revision 2dedb62a0bcb69354e15a54be89fb5dfa63275d2
gdb --version: GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
perl --version: perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linux-gnu-thread-multi
@stemar94
Copy link
Author

CC @rsc

@junyer
Copy link
Contributor

junyer commented Oct 1, 2017

Prior to Perl 5.18, \s did not match vertical tab. RE2 preserves that original behaviour – and I presume that Go will want to do the same.

@ianlancetaylor ianlancetaylor added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 29, 2018
@ianlancetaylor ianlancetaylor added this to the Go1.11 milestone Mar 29, 2018
@gopherbot
Copy link

Change https://golang.org/cl/103517 mentions this issue: regexp/syntax: update perl script to preserve \s behavior

@golang golang locked and limited conversation to collaborators Mar 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants