forth 2 algol-like, bablefish quality translator ?

This is a discussion on forth 2 algol-like, bablefish quality translator ? within the Forth forums in Programming Languages category; No human should suffer the punishment that I'm experiencing at trying to re-use picforth [based on the fine/robust gforth] after 3 years. He writes "if you know forth...". How can you 'know forth' ? forth is not to know. forth is a perverted bottom-up presentation format; when you should be conditioning your problem-solving to be top-down. Particularly since gforth is so open and nicely presented [within the constraints of the forth format], I'd like to analyse how, File: test.mini > func sign(n) > var r; > if (n<0) then > r:=-1; > else > if (0<n) then > r:=1; > ...

Go Back   Application Development Forum > Programming Languages > Forth

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-29-2008, 10:35 PM
problems@gmail
Guest
 
Default forth 2 algol-like, bablefish quality translator ?

No human should suffer the punishment that I'm experiencing at
trying to re-use picforth [based on the fine/robust gforth]
after 3 years.

He writes "if you know forth...".
How can you 'know forth' ? forth is not to know.
forth is a perverted bottom-up presentation format; when you
should be conditioning your problem-solving to be top-down.

Particularly since gforth is so open and nicely presented
[within the constraints of the forth format], I'd like to
analyse how, File: test.mini
> func sign(n)
> var r;
> if (n<0) then
> r:=-1;
> else
> if (0<n) then
> r:=1;
> else
> r:=0;
> end if;
> end if;
> return r;
> end func;

eventually gets to eg. 6502 machine-code.

{I'm more interested in the 'direct-route' version, than the
VM/p-code-interpreter version, since I already 'invented' the
AFSM machine compiler for a pascal-subset, in the '70s; where the
parser just follows the syntax-diagrams, like a train, and does
the appropriate action/s at each 'active-point'. I need to learn
some 'register alloction' principles ? }

To help understand the detailed route from the sample mini-modula
source to eg. 6502 code I'd need some tools.

Since it's a human [not machine] process, think OCR and Bablefish.

A partial dissasembler/translator, which possibly evolves/learns
with use, which would translate eg. :---

> : handle-thermal-alert ( -- )
> disable-output
> begin clrwdt thermal low? until
> 1s enable-output
> ;


to something like:--
> PROC handle-thermal-alert
> disable-output;
> REPEAT <copy existing>
> UNTIL (low > 0)
> <copy existing>
> END handle-thermal-alert;


Apparently gforth is well integrated into emacs ?
I'm guessing that some type of IDE tools exist by that route ?
Please help me to avoid the punishment of building own tools.

TIA,

== Chris Glur.

PS. you don't "know" telephone numbers; you have a tool
which 'handles' them ?


Reply With Quote
  #2  
Old 08-30-2008, 05:37 AM
jacko
Guest
 
Default Re: forth 2 algol-like, bablefish quality translator ?

On 30 Aug, 03:35, problems@gmail wrote:
> No human should suffer the punishment that I'm experiencing at
> trying to re-use picforth [based on the fine/robust gforth]
> after 3 years.
>
> He writes "if you know forth...".
> How can you 'know forth' ? forth is not to know.
> forth is a perverted bottom-up presentation format; when you
> should be conditioning your problem-solving to be top-down.
>
> Particularly since gforth is so open and nicely presented
> [within the constraints of the forth format], I'd like to
> analyse how, File: test.mini> func sign(n)
> > * var r;
> > * if (n<0) then
> > * * r:=-1;
> > * else
> > * * if (0<n) then
> > * * * r:=1;
> > * * else
> > * * * r:=0;
> > * * end if;
> > * end if;
> > * return r;
> > end func;

>
> eventually gets to eg. 6502 machine-code.
>
> {I'm more interested in the 'direct-route' version, than the
> VM/p-code-interpreter version, since I already 'invented' the
> AFSM machine compiler for a pascal-subset, in the '70s; where the
> parser just follows the syntax-diagrams, like a train, and does
> the appropriate action/s at each 'active-point'. I need to learn
> some 'register alloction' principles ? }
>
> To help understand the detailed route from the sample mini-modula
> source to eg. 6502 code I'd need some tools.
>
> Since it's a human [not machine] process, think OCR and Bablefish.
>
> A partial dissasembler/translator, which possibly evolves/learns
> with use, which would translate eg. :---
>
> > : handle-thermal-alert ( -- )
> > * * disable-output
> > * * begin clrwdt thermal low? until
> > * * 1s enable-output
> > ;

>
> to something like:--
>
> > PROC handle-thermal-alert
> > * *disable-output;
> > * *REPEAT <copy existing>
> > * *UNTIL (low > 0)
> > <copy existing>
> > END handle-thermal-alert;

>
> Apparently gforth is well integrated into emacs ?
> I'm guessing that some type of IDE tools exist by that route ?
> Please help me to avoid the punishment of building own tools.
>
> TIA,
>
> == Chris Glur.
>
> PS. you don't "know" telephone numbers; you have a tool
> which 'handles' them ?


I suggest you start from the top down and wite one ;-). But seriously
algol on a pic? I'm sure top down is the perversion of bottom up, as
all code is built up. Take sky scrapper example. I'm sure thedrawings
were done very top down fashion due to the penthouse prices, but even
though the cranes are top from bottom up today, the scrapper is most
definately bottom up implemented.

cheers
jacko
Reply With Quote
  #3  
Old 08-30-2008, 10:19 AM
Coos Haak
Guest
 
Default Re: forth 2 algol-like, bablefish quality translator ?

Op Sat, 30 Aug 2008 02:37:28 -0700 (PDT) schreef jacko:

<snip>
> I suggest you start from the top down and wite one ;-). But seriously
> algol on a pic? I'm sure top down is the perversion of bottom up, as
> all code is built up. Take sky scrapper example. I'm sure thedrawings
> were done very top down fashion due to the penthouse prices, but even
> though the cranes are top from bottom up today, the scrapper is most
> definately bottom up implemented.
>


I do remember building the Medical Faculty of the now known as Erasmus
University Rotterdam just 40 years ago was top down. The roof was the first
part. This was lifted with big jacks and the successive lower floors were
put under it.

http://en.wikipedia.org/wiki/Erasmus_University

--
Coos
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:52 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.