summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/paren_3/common.py
blob: 4cda182057fd43336441d284c8c67e0987a793f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
# coding=utf-8

id = 169
group = 'dcg'
number = 76
visible = True
facts = None

solution = '''\
paren(0) --> [].
paren(D) --> ['('], paren(D1), [')'], paren(D2), { D1 >= D2, D is D1 + 1 ; D1 < D2 , D is D2 }.
'''