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
wrongly parsed double-quoted .lex names, .lex "foo\\o" #1095
Comments
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
|
imcc: and this is also wrongly parsed: |
|
There's more nonsense going on:
The encoding and quoting is later resolved in e.g. annotated and the same for the .lex testcase |
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
|
Clarification, as the fix will need some time: The workaround for perl6 and other HLLs is to use single-quotes for |
in perl6 the correctly double-quoted .lex "foo\\o", $P3 name fails to work. see https://rt.perl.org/Public/Bug/Display.html?id=116643 this might be caused by the switch from globals to lexicals, as this statement is now enclosed in a block. in parrot the binary character \0 causes problems in lexnames with roundtrips.
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
Handle GH #1095 .lex corner cases with double-quotes. Do not use it until refactored. Add a new -d2 flag to print mk_const strings, useful to find about quoting and escaping, or not. Was used for LEXER some years ago.
Handle GH #1095 .lex corner cases with double-quotes. Do not use it until refactored. Add a new -d2 flag to print mk_const strings, useful to find about quoting and escaping, or not. Was used for LEXER some years ago.
|
Merged a documentation warning into 6.10.0: Limitation: For now use only single-quotes for lexical variable |
|
Took the easy road, and just unescaped double-quoted .lex string constants for now in |
|
smoked fine on nqp and perl6 also. |
For GH #1095 global names do work fine, only lexicals not. Note I do not know how to reliable get the correct target register index for declare_lex_preg in pure pir, and how to initialize it. Setting it crashes the ctx.
Needed by perl6: https://rt.perl.org/Public/Bug/Display.html?id=116643
Reportedly this worked in perl6-p before, but it could be a nqp change also, which put the statements into blocks, and thus the variables into lexicals.
The perl6 problem is with:
.lex "&prefix:<\\o/>", $P103and it works with
.lex "&prefix:<\o/>", $P103and.lex '&prefix:<\o/>', $P103.Most pir strings are not properly unescaped, ' and " are treated just as ',
only when they are put into a register or with some other special cases (mk_sub_address_fromc)
the " is unescaped.
So the perl6 workaround is to put such lexicals in single-quotes until
rurban/lexqnames-gh1095has landed.parrot:
In these roundtrips only the first 2 names survive:
=>
For globals it is simplier, but the problem of ignoring Illegal escape sequences remains:
The text was updated successfully, but these errors were encountered: