Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #1134

Re: Language translation

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!.POSTED!nerds-end
From Jens Kallup <jkallup@web.de>
Newsgroups comp.compilers
Subject Re: Language translation
Date Thu, 06 Mar 2014 20:31:43 +0100
Organization 1&1 Internet AG
Lines 46
Sender news@iecc.com
Approved comp.compilers@iecc.com
Message-ID <14-03-012@comp.compilers> (permalink)
References <14-03-009@comp.compilers>
NNTP-Posting-Host news.iecc.com
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace miucha.iecc.com 1394197704 43527 64.57.183.58 (7 Mar 2014 13:08:24 GMT)
X-Complaints-To abuse@iecc.com
NNTP-Posting-Date Fri, 7 Mar 2014 13:08:24 +0000 (UTC)
Keywords OOP, practice, code
Posted-Date 07 Mar 2014 08:08:23 EST
X-submission-address compilers@iecc.com
X-moderator-address compilers-request@iecc.com
X-FAQ-and-archives http://compilers.iecc.com
Xref csiph.com comp.compilers:1134

Show key headers only | View raw


Hello,

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
...
ENDCLASS


CLASS Aclass OF Aform
...
ENDCLASS


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 test.cc

cheers
Jens

Back to comp.compilers | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Language translation Anthony Williams <awgold70@gmail.com> - 2014-03-05 06:27 -0800
  Re: Language translation Hans-Peter Diettrich <DrDiettrich1@aol.com> - 2014-03-05 16:42 +0100
  Re: Language translation Kaz Kylheku <kaz@kylheku.com> - 2014-03-05 16:08 +0000
  Re: Language translation Jens Kallup <jkallup@web.de> - 2014-03-06 20:31 +0100
  Re: Language translation Nor Jaidi Tuah <norjaidi.tuah@ubd.edu.bn> - 2014-03-10 08:37 +0800
    Re: Language translation Anthony Williams <awgold70@gmail.com> - 2014-03-10 10:23 -0700

csiph-web