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

Implement .ACCEPT for Match class. #468

Closed
p6rt opened this issue Dec 7, 2008 · 4 comments
Closed

Implement .ACCEPT for Match class. #468

p6rt opened this issue Dec 7, 2008 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Dec 7, 2008

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

Searchable as RT61136$

@p6rt
Copy link
Author

p6rt commented Dec 7, 2008

From @bacek

Hello.

Simple example

bacek@​icering​:~/src/xquery$ cat m.pl
token a { 'a' };
token b { 'b' };
rule Foo { <a> | <b> };

'b' ~~ / <Foo> /;
given $/<Foo> {
  when .<a> { say "a"; };
  when .<b> { say "b"; };
};

bacek@​icering​:~/src/xquery$ perl6 m.pl
Method 'ACCEPTS' not found for invocant of class 'PGE;Match'

<bacek> is it legal syntax?
or I always should use if/elsif/else?
<moritz_> bacek​: yes, but until you match your regex you won't get any
meaningful result
<bacek> perl6​: token a { 'a' }; token b { 'b' }; rule Foo { <a> | <b> };
'b'~~ / <Foo> /; given $/<Foo> { when .<a> { say "a"; }; when .<b> { say
"b"; }; };
<p6eval> rakudo 33630​: OUTPUT[Method 'ACCEPTS' not found for invocant of
class 'PGE;Match'␤current instr.​: 'infix​:~~' pc 14429
(src/builtins/match.pir​:18)␤]
..pugs​: OUTPUT[Error eval perl5​: "if
(!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @​INC,
'/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib';␤ unshift @​INC,
'/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤ eval q[require
'Pugs/Runtime/Match/HsBridge.pm'] or die $@​;␤}␤'Pugs​::Runti...
..elf 24206​: OUTPUT[Can't locate object method "cb__RegexDef" via package
"EmitSimpleP5" at ./elf_f line 1612.␤]
<bacek> moritz_​: thanks
looks like another TODO ticket for rakudo.
<moritz_> let me check the S03 smart match table first...
yes, Any .foo - method truth

--
Best regards
Vasily Chekalkin

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

From @pmichaud

On Sun Dec 07 13​:31​:27 2008, bacek wrote​:

Hello.

Simple example

bacek@​icering​:~/src/xquery$ cat m.pl
token a { 'a' };
token b { 'b' };
rule Foo { <a> | <b> };

'b' ~~ / <Foo> /;
given $/<Foo> {
when .<a> { say "a"; };
when .<b> { say "b"; };
};

Now fixed in 7bd5a95 (and tests added to spectest).

Thanks!

Pm

bacek@​icering​:~/src/xquery$ perl6 m.pl
Method 'ACCEPTS' not found for invocant of class 'PGE;Match'

<bacek> is it legal syntax?
or I always should use if/elsif/else?
<moritz_> bacek​: yes, but until you match your regex you won't get any
meaningful result
<bacek> perl6​: token a { 'a' }; token b { 'b' }; rule Foo { <a> | <b> };
'b'~~ / <Foo> /; given $/<Foo> { when .<a> { say "a"; }; when .<b> { say
"b"; }; };
<p6eval> rakudo 33630​: OUTPUT[Method 'ACCEPTS' not found for invocant of
class 'PGE;Match'␤current instr.​: 'infix​:~~' pc 14429
(src/builtins/match.pir​:18)␤]
..pugs​: OUTPUT[Error eval perl5​: "if
(!$INC{'Pugs/Runtime/Match/HsBridge.pm'}) {␤ unshift @​INC,
'/home/evalenv/pugs/perl5/Pugs-Compiler-Rule/lib';␤ unshift @​INC,
'/home/evalenv/pugs/third-party/Parse-Yapp/lib';␤ eval q[require
'Pugs/Runtime/Match/HsBridge.pm'] or die $@​;␤}␤'Pugs​::Runti...
..elf 24206​: OUTPUT[Can't locate object method "cb__RegexDef" via package
"EmitSimpleP5" at ./elf_f line 1612.␤]
<bacek> moritz_​: thanks
looks like another TODO ticket for rakudo.
<moritz_> let me check the S03 smart match table first...
yes, Any .foo - method truth

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

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

@p6rt
Copy link
Author

p6rt commented Mar 1, 2009

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

@p6rt p6rt closed this as completed Mar 1, 2009
@p6rt p6rt added the Todo 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