swp-uebersetzerbau-ss13 / common

Shared files between teams.
1 stars 0 forks source link

Incomplete Parser design? #20

Closed Tkrauss closed 11 years ago

Tkrauss commented 11 years ago

I've a question regarding the parser design. We don't have the ability to signal a cast with the current design. I propose to add a class ( acting like a implicit unary operator ) which can be used to cast a num to a real. Maybe we need also the other way around for the first milestone.

fub-frank commented 11 years ago

It was proposed during one of the group discussions that casting operations are inserted as late as possible. The reason for doing this is to avoid casts for machines that can cope with (e.g.) addition of double and long. Those machines don't need casts. If casts were already added during parsing or semantic analyze we would always have them in the target language even if they aren't needed.

Currently intermediate code generator handles the insertion of needed casts (fuc group).

Tkrauss commented 11 years ago

Okay... as long as our ICG agree with this requirement, i'm okay with this. A statement would be nice, @vivi88 .

vivi88 commented 11 years ago

If this requirement fits best in ICG and if the fuc group also handles it as a requirement, then we guess, that we're okay with also doing it.

Tkrauss commented 11 years ago

Just to summarize the discussion and facilitate the closing of this issue:

fub-frank commented 11 years ago

agreed