Re: Language translation

Jens Kallup <>
Thu, 06 Mar 2014 20:31:43 +0100

          From comp.compilers

Related articles
Language translation (Anthony Williams) (2014-03-05)
Re: Language translation (Hans-Peter Diettrich) (2014-03-05)
Re: Language translation (Kaz Kylheku) (2014-03-05)
Re: Language translation (Jens Kallup) (2014-03-06)
Re: Language translation (Nor Jaidi Tuah) (2014-03-10)
Re: Language translation (Anthony Williams) (2014-03-10)
| List of all articles for this month |

From: Jens Kallup <>
Newsgroups: comp.compilers
Date: Thu, 06 Mar 2014 20:31:43 +0100
Organization: 1&1 Internet AG
References: 14-03-009
Keywords: OOP, practice, code
Posted-Date: 07 Mar 2014 08:08:23 EST


for my compiler, i do some test's.
when i had a class "Aclass", then i check it's parent.
It can be "Acustom", or an other class "Aform".

So, i have 2 types:

Acustom // parent (super)
Aclass // my plain class

Acustom // parent (super)
Aform // form class (window)
Aclass // class -> Aform = parent

You can build a tree:

CLASS Aform // you can leave the parent, if you know it is Acustom

CLASS Aclass OF Aform

Then you can build code:
(All classes becomes numbers - you reserve a part
for your static parents...)

push 10 ; push 10 (Aform - if you wish it is a window)
push 0 ; parent (window) class
push CNAME ; rtti - name the class

call create_class ; call function to create the class
                                        ; e.g. init window size

The best way is, you should consult the assembler code,
which is created by follpwing command:

gcc -S


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.