1. preprocessor for structures

------=_NextPart_000_0007_01BFAE23.82033580
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

Euphoria misses structures like C has them
i am planning on writing preprocessor which will translate this:

structure TRE
 atom rain
 sequence names
end structure

TRE tre1
tre1.rain=3D3
mn=3Dtre1.names[1]
? tre1.rain


to this:

sequence tre1

tre1=3Drepeat(0,tre1size) -- tre1size will be figured out by
preprocessor

tre1[1]=3D3
mn=3Dtre1[2][1]
? tre1[1]

anybody has any ideas how this could be done without writing =
preprocessor?

------=_NextPart_000_0007_01BFAE23.82033580
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Euphoria misses structures like C has=20
them</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>i am planning on writing preprocessor =
which will=20
translate this:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>structure =
TRE<BR>&nbsp;atom=20
rain<BR>&nbsp;sequence names<BR>end structure</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#808000 face=3DArial size=3D2><EM>TRE=20
tre1<BR>tre1.rain=3D3<BR>mn=3Dtre1.names[1]<BR>? =
tre1.rain</EM></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>to this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>sequence =
tre1</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial =
size=3D2>tre1=3Drepeat(0,tre1size) --=20
tre1size will be figured out by</FONT></EM></DIV>
<DIV><EM><FONT color=3D#808000 face=3DArial =
size=3D2>preprocessor</FONT></EM></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=3D#808000 face=3DArial =
tre1[1]</EM></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>anybody has any ideas how this could be =
done=20

------=_NextPart_000_0007_01BFAE23.82033580--

new topic     » topic index » view message » categorize

2. Re: preprocessor for structures

------=_NextPart_000_0439_01BFADF7.5A3037A0
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

I pretty much already did, check out my record.e lib in the Recent User =
Contribs page.

Adam Weeden
  ----- Original Message -----=20
  From: =A9koda=20
  To: EUPHORIA at LISTSERV.MUOHIO.EDU=20
  Sent: Monday, April 24, 2000 10:30 AM
  Subject: preprocessor for structures


  Euphoria misses structures like C has them
  i am planning on writing preprocessor which will translate this:
  =20
  structure TRE
   atom rain
   sequence names
  end structure

  TRE tre1
  tre1.rain=3D3
  mn=3Dtre1.names[1]
  ? tre1.rain


  to this:

  sequence tre1

  tre1=3Drepeat(0,tre1size) -- tre1size will be figured out by
  preprocessor

  tre1[1]=3D3
  mn=3Dtre1[2][1]
  ? tre1[1]

  anybody has any ideas how this could be done without writing =
preprocessor?

------=_NextPart_000_0439_01BFADF7.5A3037A0
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2919.6307" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I pretty much already did, check out my =
record.e=20
lib in the Recent User Contribs page.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Adam Weeden</FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:tone.skoda at SIOL.NET" =
title=3Dtone.skoda at SIOL.NET>=A9koda</A>=20
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:EUPHORIA at LISTSERV.MUOHIO.EDU"=20
  title=3DEUPHORIA at LISTSERV.MUOHIO.EDU>EUPHORIA at LISTSERV.MUOHIO.EDU</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Monday, April 24, 2000 =
10:30=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> preprocessor for=20
structures</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>Euphoria misses structures like C has =

  them</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>i am planning on writing preprocessor =
which will=20
  translate this:</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>structure =
TRE<BR>&nbsp;atom=20
  rain<BR>&nbsp;sequence names<BR>end structure</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT color=3D#808000 face=3DArial size=3D2><EM>TRE=20
  tre1<BR>tre1.rain=3D3<BR>mn=3Dtre1.names[1]<BR>? =
tre1.rain</EM></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>to this:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 face=3DArial size=3D2>sequence =
tre1</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><EM><FONT color=3D#808000 face=3DArial =
size=3D2>tre1=3Drepeat(0,tre1size) --=20
  tre1size will be figured out by</FONT></EM></DIV>
  <DIV><EM><FONT color=3D#808000 face=3DArial =
size=3D2>preprocessor</FONT></EM></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT color=3D#808000 face=3DArial =
  tre1[1]</EM></FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>anybody has any ideas how this could =
be done=20

------=_NextPart_000_0439_01BFADF7.5A3037A0--

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

3. Re: preprocessor for structures

Hello SKoda


>   Euphoria misses structures like C has them
>   i am planning on writing preprocessor which will translate this:
>
>   structure TRE
>    atom rain
>    sequence names
>   end structure
>
>   TRE tre1
>   tre1.rain=3
>   mn=tre1.names[1]
>   ? tre1.rain
>
>
>   to this:
>
>   sequence tre1
>
>   tre1=repeat(0,tre1size) -- tre1size will be figured out by
>   preprocessor
>
>   tre1[1]=3
>   mn=tre1[2][1]
>   ? tre1[1]
>
>   anybody has any ideas how this could be done without writing
>preprocessor?

Well, you can do it with an OOP library to do the complex
namespace stuff for you. However, this will make the syntax to
use it more complicated. I plan to add a specialized version of
this sort of thing in NeilGUI in the near future.

later,
.     __       _____  __    __    __    __    _____
.    /\ \     /\    \|\ \  /\ \  /\ \  /\ \  /\    \
.   /  \_\   /  \____\ \_\/  \_\/  \_\/  \_\/  \____\
.  /   / /  /   / ___/ |  |  / |   / /   / /\  /  __ \
. /   / /  /   / /_\ | |  | /  |  / /   / /\_\/  /_ \/
./   / /\ /   / ___/ | |  |/   | / /   / /\ \ \__  \
.\  / /__\\  / /__\  \ |    /| |/ /\  / /  \/\_\/  /
. \/_____/ \/_____/   \|___/\|___/  \/_/    \_____/
keroltarr at hotmail.com  http://geocities.com/keroltarr/
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

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

Search



Quick Links

User menu

Not signed in.

Misc Menu