MontysCoconut / moco

The Monty to LLVM compiler
http://www.informatik.uni-bremen.de/monty/
GNU General Public License v3.0
10 stars 5 forks source link

Operator names #35

Closed cpfr closed 9 years ago

cpfr commented 9 years ago

In an old version of the specification, operators were defined by using a special syntax with operator+, operator- etc. In the current version of the specification, this has been changed to normal method names, using underscores to indicate that those methods are special (etc. add). This decision was made by Christopher, Berthold and me, due to the lack of other remaining project members who wanted to work on the specification. The good thing about this is that a special case in the AST generation can be omitted (checking whether the method has an identifier or is an operator).

lummax commented 9 years ago

If you rebase against moco/master you should be able to loose the merge commit. But it's not important.

cpfr commented 9 years ago

Tnanks for your reply. I changed the output of the test-case and removed the OperatorMapper class. Instead the ASTBuilder now contains a Map<String, String> for unary and binary operator mappings.

I will rebase this branch if the pull request is accepted (I will then merge it) in order to not destroy the history of this pull request, but keep the history of the repository clean.