hpi-swa-teaching / AcceptIt

SWT 2018 Group 12
MIT License
3 stars 3 forks source link

Refactor Translator, Compilers, Parser #103

Open Askir opened 6 years ago

Askir commented 6 years ago

Problem: What is wrong?

Currently the Compiler and Parser have quite a bit of code duplication. We could either solve this by merging the corresponding classes. But I don't think that's very clean as it messes with responsibilities. Instead we should try to move all the duplication into the Translator, who should do most of the translating from "Gerkin" to Smalltalk code.

ToDo: What has to be done?

the methods: translateCode: and a few parsing methods in the ACParsers subclasses. have a lot of duplication. Move all of it to the ACTranslator and parametrize the translation with grammars and semantics.

Explanation: Why? What value does it have?

That way we get rid of the code duplication and hopefully clean up responsibilities.