diff options
Diffstat (limited to 'prolog/problems/dcg/paren_3/en.py')
-rw-r--r-- | prolog/problems/dcg/paren_3/en.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/prolog/problems/dcg/paren_3/en.py b/prolog/problems/dcg/paren_3/en.py new file mode 100644 index 0000000..f4d4c3b --- /dev/null +++ b/prolog/problems/dcg/paren_3/en.py @@ -0,0 +1,13 @@ +id = 169 +name = 'paren/3' +slug = 'properly nested parens with meaning' + +description = '''\ +<p>Write a DCG with the starting symbol <code>paren</code> for the language of properly nested sequences of parentheses. The meaning of a word in this language is the maximum depth of the nested parentheses.</p> +<pre> + ?- paren(D, ['(','(',')',')','(',')'], []). % (())() + D = 2. +</pre> +''' + +hint = {} |