Parse Errors with RNA and RNAElement in EternaScript

Found using my test script 4638056…

I’m using the builtin parsing tools in classes RNA and RNAElement to parse the structure of puzzles. I attempted to parse puzzle 15855. You can try the same by setting the puzzle_id field of the input to 15855.

You can view puzzle 15855 here

If you look through the output, you’ll see that it did not classify the bottom right internal loop. While it marked it as a loop, it marked it null instead of internal. It also failed to notice that index 102 (1 based) was part of said internal loop, and instead skips 101 to 103 when printing the indices.

Further, this parses the bulge on the left side correctly as a bulge, but also marks it as a stack instead of a loop, which is inconsistent with parsing bulges in other structures. To see what I believe is desired behavior for processing bulges, try puzzle_id 4634091, where bulges are marked as loops.…


Puzzle 15855 has a few problems. Notice that the structure contains two blanks. The puzzle GUI handles these silently by replacing them by dots, but the scripting interface classes do not safe-check their input.

@DuckBoy: I’m working on a patch. If you’re willing to help test it, please contact me by PM: