summaryrefslogtreecommitdiff
path: root/prolog/problems/dcg/expr_2/en.py
blob: b114a5d2b44173860b0682e1fcb32232f5f14eca (plain)
1
2
3
4
5
6
7
8
9
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 = {}