summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/expr_2/en.py
blob: 9b305514577dc425bea688e1aba59e6bd8930ff9 (plain)
1
2
3
4
5
6
7
8
9
10
id = 170
name = 'expr/2'
slug = 'arithmetic expressions'

description = '''\
<p>Write a DCG with the starting symbol <code>expr</code> for the language of arithmetic expressions consisting of numbers (without leading zeros), addition and multiplication. Subexpressions can be grouped using parentheses.</p>
<p>Example words: <code>(1+2)*3</code>, <code>42*8*3</code>, <code>(2+1)*(3+4)</code>.</p>
'''

hint = {}