1. RE: Compiler questions

>I am about to start writing a compiler which I hope will be as easy to 
>use as Euphoria but generate executables that run at asm speed.
>etc...........

Mike:
  One has already been written entirely in Euphoria by Mic which
  compiles windows programs using assembler code.
  It can be downloaded at Mic's Web Site. 
    http://www.cyd.liu.se/~micol972/site/nqar2.zip
  I don't know why Mic hasn't placed it in the Euphoria archive so everyone
  becomes familar with it and so we can vote him some Micro-Economy money
  for his hard work.
  The advantage of compiled assembly windows programs is small size and speed.
  The compiler is single pass and outputs an executable windows program.
  It uses Pete E. asm which Mic had updated to asm2 to generate the code.
  I'am working on adding Resource capabilities to it without using a linker.
  Maybe we can convince Mic to put the program in the archive so more
  users will see it and vote for it.
Bernie

new topic     » topic index » view message » categorize

2. RE: Compiler questions

----- Original Message -----
From: Mike <vulcan at win.co.nz>
To: <EUforum at topica.com>
Subject: Compiler questions


>
>
> I am about to start writing a compiler which I hope will be as easy to
> use as Euphoria but generate executables that run at asm speed. This
> project seems quite ambitious (though that never stopped me before) and
> I would like to get some views from the list on the following questions.
> I have some opinion about most of them but a variety of concisely
> expressed arguments will help me definitely
> decide each point.
>
> Regards,
> Mike
>
> 1. What sort of numerical data types should be there? Only integer
> (signed 32-bit) and real (double precision floats)?
>
Maybe big integers (undefined length). Maybe complex numbers.

> 2. Can restrictions be placed on bitwise operations with real types?
 Yes.
>
> 3. Would 1-d arrays and lists of character strings be enough?
You mean no Euphoria-like sequences? If so, I'll add them. Also
N-dimensional matrixes.
>
> 4. Should it support cdecl?
>
Why not?
> 5. Type conversion - implicit or explicit?
>
I'd prefer explicit conversion.
> 6. Pass by reference - when is this needed?
I'd consider automatic pass by reference: variables passed always by
reference, constants and expressions by value. Parenthesizing a variable
will make it an expression.
>
> 7. What sort of notation could be used to access arrays? structures?
A dot for structures. This is a difficult point for arrays: you should be
able to specify both:
A[{2, 3},{6, 2},{3, 3}] to get a sequence of elements 2:3 6:2 3:3 of a
2-dimensional array, and:
A[{3, 6, 1}, {2, 7}] to get a 2-dimensional array comprising the
intersection of rows 3,6,1 with columns 2,7.
Not clear what notation to use in order to decide among both cases, and more
complex ones.

> 8. Forward references?
>
Yes.
> 9. Control structures other than: if, for, while ?
Maybe switch - case. Not sure.
>
> 10. Error recovery?
Another conflicting point. Try - catch is a pain in the neck. Maybe a single
routine that:
a) if not present, default behavior is provided.
b) if present, the programmer could check the type of error, the routine
where it happened, etc., and take appropiate actions.
Not sure...
>
> 11. Anything else?
Yes. Ability to determine if a variable or routine is or not defined.
Also, capability to dinamically execute strings, or define
functions/procedures.

Too ambitious?
>
>
>
> TOPICA - Start your own email discussion group. FREE!
>
>

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu