Статья "Некоторое расширение языка Рефал"
http://ulm.uni.udm.ru/~soft/wiki/lib/exe/fetch.php?
media=ubs2009_direfal.pdf
Программа для определения правильного
списка скобок.
Template GoodBrackets ::= { $empty | '(' GoodBrackets. ')' GoodBrackets. };
Go {
$empty,
<Card> : GoodBrackets.input = <Prout 'Ok'>;
$empty = <Prout 'Not right'>;
}
Запуск программы и введение строки, содержащей "(()" или "())" с
незакрытыми скобками либо другой строки,
не удовлетворяющей условию,
например:
1. (
2. )(
3. (((((
Вызывает подвисание системы на 3-6 минут
из-за сильной загрузки процессора,
а после в консоли появляется сообщение:
"This application has reguested the Runtime to terminate it in anunusual
way.
Please contact the application's support team for more information."
При введении строки "()()()" или ещё большего количества закрытых скобок,
выводится стандартное сообщение об ошибке
и закрытии приложения refal.exe
от Microsoft.
Original issue reported on code.google.com by fox.ko...@gmail.com on 25 Nov 2009 at 4:07
Original issue reported on code.google.com by
fox.ko...@gmail.com
on 25 Nov 2009 at 4:07