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

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 = {}