summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/paren_2/en.py
blob: a4ab66607c0d0325b46bca57e7883972b9b297bb (plain)
1
2
3
4
5
6
7
8
9
10
id = 168
name = 'paren/2'
slug = 'properly nested parens'

description = '''\
<p>Write a DCG with the starting symbol <code>paren</code> for the language of properly nested sequences of parentheses. The terminal symbols in the grammar should be written like this: <code>['(']</code> and <code>[')']</code>.</p>
<p>Example words: <code>()</code>, <code>(())</code>, <code>()(())</code>, <code>(()())()</code>.</p>
<p>Example non-words: <code>)(</code>, <code>((()</code>, <code>))</code>.</p>'''

hint = {}