fool2fish / dragon-book-exercise-answers

Compilers Principles, Techniques, & Tools (purple dragon book) second edition exercise answers. 编译原理(紫龙书)第2版习题答案。

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using `plus' in 2.3.4

liesnikov opened this issue · comments

I would say that it's unfair to use + in attributes, as in
| D smallHundred {hundred.v = 5 + smallHundred.v}
or, otherwise, there is a chance to simplify whole translation by just adding translated values.
So, I would say, if one prefers to avoid arithmetic, then the only solution would be to explicitly define all the values.