Your message dated Fri, 30 Dec 2022 20:45:53 +0100
with message-id <[email protected]>
and subject line Re: Bug#1010184: miller: Parse error on token "1e+"
has caused the Debian Bug report #1010184,
regarding miller: Parse error on token "1e+"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1010184: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010184
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: miller
Version: 6.2.0-1
Severity: normal

Hi Stephen,

Thanks again for maintaining a convenient Debian
package of John Kerl's cool "mlr".

I happened to notice mlr doesn't seem to recognize
numbers in scientific notation with explicitly
positive exponents.

Since awk seems to work with them, I 

    thought you and maybe John would want to know,
    and 

    filed this bug report.

Here are some simple examples that I hope will
also reveal the bug on your computer:

    $ echo | mlr put 'print 1e+0'

On my computer, mlr complains with:

    mlr: cannot parse DSL expression.
    Parse error on token "1e+" at line 1 column 7.
    Please check for missing semicolon.
    Expected one of:
      $ ; { > >> | ( field_name $[ braced_field_name $[[ $[[[ full_srec 
oosvar_name
      @[ braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .-
      ! ~ string_literal regex_case_insensitive int_literal float_literal 
boolean_literal
      null_literal inf_literal nan_literal const_M_PI const_M_E panic [ ctx_IPS
      ctx_IFS ctx_IRS ctx_OPS ctx_OFS ctx_ORS ctx_FLATSEP ctx_NF ctx_NR ctx_FNR
      ctx_FILENAME ctx_FILENUM env func

I'm happy to report a workaround is simply
omitting the positive "+" sign before the exponent
like this:

    $ echo | mlr put 'print 1e0'

At least on my computer, mlr returns

    1e0

For what it's worth, here's an analogous example
with the great grand daddy of csv tools, awk:

    $ echo | awk '{ print 1e+0 }

At least on my computer, awk returns

    1

If I understand the following link correctly, John
originally implemented scientific notation in DSL
literals back in version 3.0.1:

    Allow scientific notation in DSL literals; mlr bar --auto
    https://github.com/johnkerl/miller/releases/tag/v3.0.1

Thanks again,
Kingsley

-- System Information:
Debian Release: bullseye/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 4.4.0-1-686-pae (SMP w/2 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)

Versions of packages miller depends on:
ii  libc6  2.33-7

miller recommends no packages.

miller suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 6.3.0-1

On Mon, Apr 25, 2022 at 12:57:05PM -0700, Kingsley G. Morse Jr. wrote:
> Here are some simple examples that I hope will
> also reveal the bug on your computer:
> 
>     $ echo | mlr put 'print 1e+0'
> 
> On my computer, mlr complains with:
> 
>     mlr: cannot parse DSL expression.
>     Parse error on token "1e+" at line 1 column 7.
>     Please check for missing semicolon.
>     Expected one of:
>       $ ; { > >> | ( field_name $[ braced_field_name $[[ $[[[ full_srec 
> oosvar_name
>       @[ braced_oosvar_name full_oosvar all non_sigil_name float int + - .+ .-
>       ! ~ string_literal regex_case_insensitive int_literal float_literal 
> boolean_literal
>       null_literal inf_literal nan_literal const_M_PI const_M_E panic [ 
> ctx_IPS
>       ctx_IFS ctx_IRS ctx_OPS ctx_OFS ctx_ORS ctx_FLATSEP ctx_NF ctx_NR 
> ctx_FNR
>       ctx_FILENAME ctx_FILENUM env func

This was fixed in version 6.3.0.

Regards,

Stephen

Attachment: signature.asc
Description: PGP signature


--- End Message ---

Reply via email to