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

TODO: Double quotes in regexes #921

Closed
p6rt opened this issue Apr 20, 2009 · 5 comments
Closed

TODO: Double quotes in regexes #921

p6rt opened this issue Apr 20, 2009 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Apr 20, 2009

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

Searchable as RT64880$

@p6rt
Copy link
Author

p6rt commented Apr 20, 2009

From arnsholt@gmail.com

According to S05, the section entitled "Simplified lexical parsing of
patterns", double quotes are allowed as quotes, "with the same
interpolative semantics as the current language in which the regex is
lexically embedded". Trying to run the code C<"foo" ~~ /"foo"/>
currently fails with the following stacktrace​:

$ ./perl6 -e '"foo" ~~ /"foo"/'
Statement not terminated properly at line 1, near "~~ /\"foo\"/"

current instr.​: 'parrot;PGE;Util;die' pc 129
(runtime/parrot/library/PGE/Util.pir​:85)
called from Sub 'parrot;Perl6;Grammar;eat_terminator' pc 75081
(src/gen_grammar.pir​:2547)
called from Sub 'parrot;Perl6;Grammar;statementlist' pc 73738
(src/gen_grammar.pir​:2028)
called from Sub 'parrot;Perl6;Grammar;statement_block' pc 71171
(src/gen_grammar.pir​:1001)
called from Sub 'parrot;Perl6;Grammar;TOP' pc 65910 (src/gen_setting.pir​:12905)
called from Sub 'parrot;PCT;HLLCompiler;parse' pc 665
(src/PCT/HLLCompiler.pir​:402)
called from Sub 'parrot;PCT;HLLCompiler;compile' pc 428
(src/PCT/HLLCompiler.pir​:303)
called from Sub 'parrot;PCT;HLLCompiler;eval' pc 920
(src/PCT/HLLCompiler.pir​:521)
called from Sub 'parrot;PCT;HLLCompiler;command_line' pc 1510
(src/PCT/HLLCompiler.pir​:800)
called from Sub 'parrot;Perl6;Compiler;main' pc 24053 (perl6.pir​:164)

@p6rt
Copy link
Author

p6rt commented Aug 4, 2009

From @kyleha

This is an automatically generated mail to inform you that tests are now available in t/spec/S05-mass/rx.t

commit 611d1a047e27d43a41f9e5c474340fa9d43617c7
Author​: kyle <kyle@​c213334d-75ef-0310-aa23-eaa082d1ae64>
Date​: Tue Aug 4 19​:20​:21 2009 +0000

  [t/spec] Label tests for RT #​64880
 
  git-svn-id​: http://svn.pugscode.org/pugs@&#8203;27870 c213334d-75ef-0310-aa23-eaa082d1ae64

Inline Patch
diff --git a/t/spec/S05-mass/rx.t b/t/spec/S05-mass/rx.t
index 3e85794..da1de99 100644
--- a/t/spec/S05-mass/rx.t
+++ b/t/spec/S05-mass/rx.t
@@ -420,32 +420,32 @@ ok '... --- ...' ~~ /"... --- ..."/, 'literal match (\")';
 
 #### "... --- ..."		...---...	n	literal match (\")
 #?pugs todo 'feature'
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok '...---...' !~~ /"... --- ..."/, 'literal match (\")';
 
 #### "ab<\">cd"		ab<">cd		y	literal match with quote
 #?pugs todo 'feature'
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok 'ab<">cd' ~~ /"ab<\">cd"/, 'literal match with quote';
 
 #### "ab<'>cd"		ab<\'>cd		y	literal match with quote
 #?pugs todo 'feature'
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok 'ab<\'>cd' ~~ /"ab<'>cd"/, 'literal match with quote';
 
 #?pugs todo 'feature'
 #### "ab\\cd"		ab\x5ccd	y	literal match with backslash
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok 'ab\x5ccd' ~~ /"ab\\cd"/, 'literal match with backslash';
 
 #### (ab)x"$0"		abxab		y	literal match with interpolation
 #?pugs todo 'feature'
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok 'abxab' ~~ /(ab)x"$0"/, 'literal match with interpolation';
 
 #### (ab)"x$0"		abxab		y	literal match with interpolation
 #?pugs todo 'feature'
-#?rakudo skip 'parse error'
+#?rakudo skip 'parse error (RT #64880)'
 ok 'abxab' ~~ /(ab)"x$0"/, 'literal match with interpolation';
 
 # L<S05/Extensible metasyntax (C<< <...> >>)/"A leading ? indicates">

@p6rt
Copy link
Author

p6rt commented Aug 4, 2009

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

@p6rt
Copy link
Author

p6rt commented Mar 7, 2010

From @moritz

On Mon Apr 20 00​:32​:29 2009, arnsholt wrote​:

According to S05, the section entitled "Simplified lexical parsing of
patterns", double quotes are allowed as quotes, "with the same
interpolative semantics as the current language in which the regex is
lexically embedded". Trying to run the code C<"foo" ~~ /"foo"/>
currently fails with the following stacktrace​:

$ ./perl6 -e '"foo" ~~ /"foo"/'
Statement not terminated properly at line 1, near "~~ /\"foo\"/"

Works now, tests passing, happiness and peace spreads over the world.

Cheers,
Moritz

@p6rt
Copy link
Author

p6rt commented Mar 7, 2010

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

@p6rt p6rt closed this as completed Mar 7, 2010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant