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

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