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

lex_allbrackets handling and S_tokereport #15835

Open
p5pRT opened this issue Jan 25, 2017 · 6 comments
Open

lex_allbrackets handling and S_tokereport #15835

p5pRT opened this issue Jan 25, 2017 · 6 comments

Comments

@p5pRT
Copy link

p5pRT commented Jan 25, 2017

Migrated from rt.perl.org#130642 (status was 'new')

Searchable as RT130642$

@p5pRT
Copy link
Author

p5pRT commented Jan 25, 2017

From @hvds

Created by @hvds

I noticed that -DT fails to cope with certain tokens, tangled up with
the use of a bunch of magic numbers {1,2,4}<<24. I don't have much
understanding of this area, but I've pushed a branch hv/brackets as
a starting point.

If Zefram or anyone else can suggest improvements, I'm happy to make
them or hand it over. I think it particularly needs​:
- better names for the macros and corresponding text for -DT;
- comments for each explaining their meaning and purpose;
- references to them (even if just in comments) if they are taken advantage
  of anywhere else.

I note in particular that nothing currently appears to set
TYPEFLAG_BRACKMINUS (at least, not using '<< 24'); I can't tell if that's
a bug or simply a placeholder.

Hugo

Perl Info

Flags:
    category=core
    severity=low

Site configuration information for perl 5.25.10:

Configured by hv at Mon Jan 23 20:29:32 GMT 2017.

Summary of my perl5 (revision 5 version 25 subversion 10) configuration:
  Commit id: e18c4116c82b2027a1e5d4e6b9a7214d60779053
  Platform:
    osname=linux
    osvers=3.13.0-101-generic
    archname=x86_64-linux
    uname='linux shad2 3.13.0-101-generic #148-ubuntu smp thu oct 20 22:08:32 utc 2016 x86_64 x86_64 x86_64 gnulinux '
    config_args='-des -Dcc=gcc -Dprefix=/opt/blead-d0 -Doptimize=-g -O0 -DDEBUGGING -Dusedevel -Uversiononly'
    hint=recommended
    useposix=true
    d_sigaction=define
    useithreads=undef
    usemultiplicity=undef
    use64bitint=define
    use64bitall=define
    uselongdouble=undef
    usemymalloc=n
    bincompat5005=undef
  Compiler:
    cc='gcc'
    ccflags ='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2'
    optimize='-g -O0'
    cppflags='-fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include'
    ccversion=''
    gccversion='4.8.4'
    gccosandvers=''
    intsize=4
    longsize=8
    ptrsize=8
    doublesize=8
    byteorder=12345678
    doublekind=3
    d_longlong=define
    longlongsize=8
    d_longdbl=define
    longdblsize=16
    longdblkind=3
    ivtype='long'
    ivsize=8
    nvtype='double'
    nvsize=8
    Off_t='off_t'
    lseeksize=8
    alignbytes=8
    prototype=define
  Linker and Libraries:
    ld='gcc'
    ldflags =' -fstack-protector -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib /lib64 /usr/lib64
    libs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.19.so
    so=so
    useshrplib=false
    libperl=libperl.a
    gnulibc_version='2.19'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs
    dlext=so
    d_dlsymun=undef
    ccdlflags='-Wl,-E'
    cccdlflags='-fPIC'
    lddlflags='-shared -g -O0 -L/usr/local/lib -fstack-protector'



@INC for perl 5.25.10:
    /opt/blead-d0/lib/perl5/site_perl/5.25.10/x86_64-linux
    /opt/blead-d0/lib/perl5/site_perl/5.25.10
    /opt/blead-d0/lib/perl5/5.25.10/x86_64-linux
    /opt/blead-d0/lib/perl5/5.25.10
    /opt/blead-d0/lib/perl5/site_perl/5.25.8
    /opt/blead-d0/lib/perl5/site_perl


Environment for perl 5.25.10:
    HOME=/home/hv
    LANG=C
    LANGUAGE=en_GB:en
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=<elided>
    PERL_BADLANG (unset)
    SHELL=/bin/bash

@hvds
Copy link
Contributor

hvds commented May 4, 2021

I've rebased this branch against latest blead, in the hope that one day someone may still look at it. (I note that Branislav Zahradník recently did a bunch of cleanup in this area, but does not obviously have a github account; I'll try reaching out to him.)

@hvds
Copy link
Contributor

hvds commented May 4, 2021

Sadly I no longer recall exactly what problem I saw under -DT, but I was trying to investigate #15608 at the time; trying that again now, I see output like:

% ./miniperl -DT orig107 2>&1 | grep -B1 '??'
### 1:LEX_INTERPNORMAL/XTERM "@k[(A..Z)=*_=sub{prin11V0003]*{;qq{@k[(A..Z)=*_=sub{prin11V0"...
### <== ?? 271
--
### 1:LEX_INTERPNORMAL/XOPERATOR ")=*_=sub{prin11V0003]*{;qq{@k[(A..Z)=*_=sub{prin11V0003]=~m["...
### <== ?? 366
...

.. but I'm not confident that's what I was referring to in this ticket.

@hvds
Copy link
Contributor

hvds commented May 14, 2021

I note that Branislav Zahradník recently did a bunch of cleanup in this area, but does not obviously have a github account; I'll try reaching out to him.

Branislav thinks he's unlikely to be able to help on this.

@happy-barney
Copy link

Branislav thinks he's unlikely to be able to help on this.

at the moment :-(
these tokens appears only when parsing interpolated strings (eg: it tracks sequences like \U...\E like parentheses) but unfortunately that topic is still on my list of to-learn list

@khwilliamson
Copy link
Contributor

khwilliamson commented May 20, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants