How do I get Raku Grammar Preview unstuck from "Collecting results" without restart?

125 Views Asked by At

I'm playing with the Raku Grammar feature in the Comma IDE. It's pretty cool. I can code by limitless trial and error which is what I do best.

However, it's frequently getting stuck (maybe once every 5 to 10 minutes). It's probably a result of my bad code.

Regardless, is there a way to reset it without having to restart the IDE? I've tried changing my grammar. Sometimes that works but often it does not.

Thanks.

1

There are 1 best solutions below

2
On

I found a slightly better way to try to keep the previewer from getting stuck:

  1. create another grammar in the same file with just token TOP { .+ } in it.

  2. If it gets stuck, switch to the othe grammar. This will divert Comma's attention away from the real grammar.

  3. Mkae any changes to the code to try to fix the problem in the real grammar.

  4. Switch back to real grammar. Often, it will start working again.

Also, the grammar checker can spawn several rakudo zombie processes. Be sure to kill those or they will eat up your CPU and memory very quickly.