[Cuis-dev] Regarding Ometa2
philip.bernhart at posteo.de
Fri Jul 5 14:10:30 PDT 2019
Philip Bernhart via Cuis-dev <cuis-dev at lists.cuis.st> writes:
> Hi Phil,
> Phil B <pbpublist at gmail.com> writes:
>>> Also why does OMeta2 sometimes cause an endless loop within the
>>> image with showing an hourglass as cursor without being able
>>> to quit that with ALT-. / CMD-. ?
>> That's almost always due to a 'bad' parser specification. In practice,
>> it's usually a * or ? in your source code that results in zero occurrences,
>> as a result the overall rule succeeds and then gets stuck in a recursive
>> loop matching that same rule until you OOM. An easy way to detect this
>> type of problem (and not hang your image) is to load the OMeta2Extensions
>> package and have your parser be a subclass of OMeta2Debug while you are
>> developing. Once everything is working, then change the parent class back
>> to OMeta2 which should be otherwise transparent as far as your parser code
>> is concerned.
> I subclassed from OMeta2Debug and it still gets into that problem.
> What besides that could be done on the side of Cuis to make such errors
> escapeable? I naively think that this could improve general stability of
> Thanks for your input.
Sorry for the fuss. I just noticed that I didn't try aut CMD-. now
it seems to work with OMeta2Debug subclassed.
I don't understand the magic behind it, but that makes it debugable.
Sorry for the "wrong alarm".
More information about the Cuis-dev