develooper Front page | perl.perl6.users | Postings from August 2017

ctxlexpad needs an MVMContect

Thread Next
From:
WFB
Date:
August 4, 2017 04:10
Subject:
ctxlexpad needs an MVMContect
Message ID:
CAGXvwmckdQCTubkSqzPDrfCSR_dfM4jDOrey2ZJ5FZj8VRpJjQ@mail.gmail.com
Hi all,

I am writing a script to compare to text file. More precisely, certain data
is compared not line by line.
To find this information I use grammars.
At the beginning it worked great. But then, my script hangs. Started with
the debugger perl6-debug-m  I got this exception:
Unhandled exception: ctxlexpad needs an MVMContext
   at SETTING::src/core/PseudoStash.pm:48
(C:\rakudo/share/perl6/runtime/CORE.setting.moarvm:)
 from SETTING::src/core/PseudoStash.pm:156
(C:\rakudo/share/perl6/runtime/CORE.setting.moarvm:AT-KEY)
 from SETTING::src/core/hash_slice.pm:6
(C:\rakudo/share/perl6/runtime/CORE.setting.moarvm:postcircumfix:<{ }>)
 from site#sources\3E687CA5BFB386524F923BAC2F986CC3C66BD24F
(Debugger::UI::CommandLine):736  (C:\rakudo\share\perl6\site
\precomp\531476C94944C40F030060AEB60539343668769B.1500922671.09494\3E\3E687CA5BFB386524F923BAC2F986CC3C66BD24F:)
 from site#sources\3E687CA5BFB386524F923BAC2F986CC3C66BD24F
(Debugger::UI::CommandLine):730  (C:\rakudo\share\perl6\site
\precomp\531476C94944C40F030060AEB60539343668769B.1500922671.09494\3E\3E687CA5BFB386524F923BAC2F986CC3C66BD24F:unhandled
)
 from site#sources\3E687CA5BFB386524F923BAC2F986CC3C66BD24F
(Debugger::UI::CommandLine):721  (C:\rakudo\share\perl6\site
\precomp\531476C94944C40F030060AEB60539343668769B.1500922671.09494\3E\3E687CA5BFB386524F923BAC2F986CC3C66BD24F:)
 from gen/moar/Metamodel.nqp:4031
(C:\rakudo\share\nqp\lib/Perl6/Metamodel.moarvm:enter)
 from SETTING::src/core/Routine.pm:85
(C:\rakudo/share/perl6/runtime/CORE.setting.moarvm:CALL-ME)
 from gen/moar/BOOTSTRAP.nqp:3001
(C:\rakudo/share/nqp/lib/Perl6/BOOTSTRAP.moarvm:)
 from gen\moar\stage2\NQPHLL.nqp:1740
(C:\rakudo\share\nqp\lib/NQPHLL.moarvm:command_eval)
 from src/Perl6/Compiler.nqp:42
(C:\rakudo\share\nqp\lib/Perl6/Compiler.moarvm:command_eval)
 from gen\moar\stage2\NQPHLL.nqp:1677
(C:\rakudo\share\nqp\lib/NQPHLL.moarvm:command_line)
 from gen/moar/perl6-debug.nqp:509
(C:\rakudo\share\perl6\runtime\perl6-debug.moarvm:MAIN)
 from gen/moar/perl6-debug.nqp:439
(C:\rakudo\share\perl6\runtime\perl6-debug.moarvm:<mainline>)
 from <unknown>:1  (C:\rakudo\share\perl6\runtime\perl6-debug.moarvm:<main>)
 from <unknown>:1
(C:\rakudo\share\perl6\runtime\perl6-debug.moarvm:<entry>)

I tried to find the reason for that. I think it has something to do with
the grammar, but I do not know what could be the problem:

use v6;

grammar Base {
    token nodash { <-[-]>* }    # everything from begining to the first -.
    token dash { '-' }          # the - itself.
    token id { '{' <[A..Z 0..9 -]>+ '}' }   # a string starting with {
containing A-Z, 0-9 and - and ending with }.
}

grammar TestCases  {
    # test case looks like this:
    # 09:13:52: DEBUG (FetchTestRunDataSQL:895) -
{CC3CF1E4-ED49-4885-A327-1B506FFC18A6}
{01D2E4A7-5B6D-4968-82FA-0089838940AD} VMware: Stop All Running VM Images
    token TOP { <nodash> <dash> \s+ <tcid> \s+ <tsid> <noparam> }
    token nodash { <-[-]>* }    # everything from begining to the first -.
    token dash { '-' }          # the - itself.
    token id { '{' <[A..Z 0..9 -]>+ '}' }   # a string starting with {
containing A-Z, 0-9 and - and ending with }.
    token tcid { <id> }         # the first id. In this case the test case
id.
    token tsid { <id> }         # the second id. In this case the test
suite id.
    token noparam { <-[$ @]>+ } # everything except $ or @.
}

grammar TestSuiteParameters   {
    # Testmemberid TestRunID SearchPattern Replacement
    #09:13:53: DEBUG (FetchTestRunDataSQL:173) -
{21E6F3A8-B8FD-42E0-9464-D91BDBD8A3EA}
{C9416326-27F6-41C7-847A-5669694389F0}    $SNAPSHOTNAME$    $VMSNAPSHOTNAME$
    token TOP { <nodash> <dash> \s+ <tmid> \s+ <trid> \s+ <searchpattern>
\s+ <replacement> }
    token nodash { <-[-]>* }    # everything from begining to the first -.
    token dash { '-' }          # the - itself.
    token id { '{' <[A..Z 0..9 -]>+ '}' }   # a string starting with {
containing A-Z, 0-9 and - and ending with }.
    token tmid { <id> }
    token trid { <trid> }
    token searchpattern { <[$]> \w <[$]> }
    token replacement { .* }
}

my $line = '09:13:52: DEBUG (FetchTestRunDataSQL:895) -
{CC3CF1E4-ED49-4885-A327-1B506FFC18A6}
{01D2E4A7-5B6D-4968-82FA-0089838940AD} VMware: Stop All Running VM Images';

TestCases.parse($line);
TestSuiteParameters($line);

I am working on Windows 10 with perl6:
This is Rakudo version 2017.07 built on MoarVM version 2017.07
implementing Perl 6.c.

Could someone tell me, whether I am the problem here or did I find a bug?

Thanks in advanced,
Wolf

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About