Navigation Menu

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

LTA error for number ending in a dot in Rakudo #2448

Closed
p6rt opened this issue Jul 3, 2011 · 7 comments
Closed

LTA error for number ending in a dot in Rakudo #2448

p6rt opened this issue Jul 3, 2011 · 7 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Jul 3, 2011

Migrated from rt.perl.org#93988 (status was 'resolved')

Searchable as RT93988$

@p6rt
Copy link
Author

p6rt commented Jul 3, 2011

From @masak

<TimToady> std​: 5.
<p6eval> std 37a0cdd​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Decimal
point must be followed by digit [...]
<moritz> rakudo​: 5.
<p6eval> rakudo 72d158​: OUTPUT«===SORRY!===␤Confused at line 22, near "5."␤»
<moritz> LTA error
<masak> lol, rakudo u so confusd
* masak submits rakudobug

@p6rt
Copy link
Author

p6rt commented Jun 9, 2013

From @coke

On Sun Jul 03 14​:35​:03 2011, masak wrote​:

<TimToady> std​: 5.
<p6eval> std 37a0cdd​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Decimal
point must be followed by digit [...]
<moritz> rakudo​: 5.
<p6eval> rakudo 72d158​: OUTPUT«===SORRY!===␤Confused at line 22, near "5."␤»
<moritz> LTA error
<masak> lol, rakudo u so confusd
* masak submits rakudobug

Rakudo's behavior has changed, but it depends on how you invoke it​:

13​:04 < [Coke]> r​: 5.
13​:04 <+camelia> rakudo b2072f​: OUTPUT«===SORRY!===␤Confused␤at
  /tmp/ogJuVhXpa8​:1␤------> 5.⏏<EOL>␤ expecting any of​:␤
  dotty method or postfix␤»

./perl6 --version
This is perl6 version 2013.05-224-g3f49bbd built on parrot 5.2.0 revision RELEASE_5_2_0

./perl6 -e '5.'
===SORRY!===
Confused
at -e​:1
------> 5.⏏<EOL>
  expecting any of​:
  dotty method or postfix

./perl6

5.
===SORRY!===
Decimal point must be followed by digit
at <unknown file>​:1
------> 5.⏏<EOL>
Decimal point must be followed by digit
at <unknown file>​:1
------> 5.⏏<EOL>
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at <unknown file>​:2
------> <BOL>⏏<EOL>

Looks like we get it right in the REPL, but no where else.

--
Will "Coke" Coleda

@p6rt
Copy link
Author

p6rt commented Jun 9, 2013

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Jan 2, 2015

From @usev6

Current behaviour​:

$ ./viv -c -e '5.'
===SORRY!===
Decimal point must be followed by digit at (eval) line 1​:
------> 5.⏏<EOL>
Unsupported use of . to concatenate strings; in Perl 6 please use ~ at (eval) line 1 (EOF)​:
------> 5.⏏<EOL>
Parse failed

$ perl6 -e '5. ' ## note the whitespace after the dot
===SORRY!===
Decimal point must be followed by digit
at -e​:1
------> 5.⏏
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at -e​:1
------> 5. ⏏<EOL>

So far so good. There is still a problem when there is no whitespace after the dot​:

$ perl6 -e '5.'
===SORRY!=== Error while compiling -e
Missing semicolon.
at -e​:1
------> 5.⏏<EOL>

Adding a semicolon looks gives one good and and strange error message​:

$ ./perl6-m -e '5.;'
===SORRY!===
Decimal point must be followed by digit
at -e​:1
------> 5.⏏;
Missing semicolon.
at -e​:1
------> 5.⏏;

1 similar comment
@p6rt
Copy link
Author

p6rt commented Jan 2, 2015

From @usev6

Current behaviour​:

$ ./viv -c -e '5.'
===SORRY!===
Decimal point must be followed by digit at (eval) line 1​:
------> 5.⏏<EOL>
Unsupported use of . to concatenate strings; in Perl 6 please use ~ at (eval) line 1 (EOF)​:
------> 5.⏏<EOL>
Parse failed

$ perl6 -e '5. ' ## note the whitespace after the dot
===SORRY!===
Decimal point must be followed by digit
at -e​:1
------> 5.⏏
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at -e​:1
------> 5. ⏏<EOL>

So far so good. There is still a problem when there is no whitespace after the dot​:

$ perl6 -e '5.'
===SORRY!=== Error while compiling -e
Missing semicolon.
at -e​:1
------> 5.⏏<EOL>

Adding a semicolon looks gives one good and and strange error message​:

$ ./perl6-m -e '5.;'
===SORRY!===
Decimal point must be followed by digit
at -e​:1
------> 5.⏏;
Missing semicolon.
at -e​:1
------> 5.⏏;

@p6rt
Copy link
Author

p6rt commented Apr 8, 2015

From @jnthn

On Sun Jul 03 14​:35​:03 2011, masak wrote​:

<TimToady> std​: 5.
<p6eval> std 37a0cdd​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Decimal
point must be followed by digit [...]
<moritz> rakudo​: 5.
<p6eval> rakudo 72d158​: OUTPUT«===SORRY!===␤Confused at line 22, near "5."␤»
<moritz> LTA error
<masak> lol, rakudo u so confusd
* masak submits rakudobug

Turns out it did get it if the error was not at EOF. Fixed that now, turned this into throwing a typed exception, and tested in in S32-exceptions/misc.t.

@p6rt p6rt closed this as completed Apr 8, 2015
@p6rt
Copy link
Author

p6rt commented Apr 8, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant