Re: Euphoria Interpter ?

new topic     » goto parent     » topic index » view thread      » older message » newer message

Bernie Ryan wrote:
> 
> Matt Lewis wrote:
> > It's definitely possible to do this.  But not necessarily simple or easy.
> > You're basically embedding another language into euphoria--and one that 
> > executes immediately, changing the state of the interpreter.  I don't see
> > an easy way you could use too much of the builtin routines without some
> > big hacks.
> 
> 
> Matt:
> 
>     I don't think it is as complicated as you think. This is
>   what I mean. 
> 
> #define LINUX -- at the top of the program I place this or #define WIN32
>         -- depending on what I define at top of program the parser only
>         -- parses the code that meets the defined condition.
>  
> #IF Linux 
>   include linux.eu
>   for i = 1 to 200 do
>     do somthing
>   end for
> #ELSIF WIN32
>   include win32.ew
>   for i = 1 to 200 do
>     do somthing
>   end for
> #ELSE
>   include dos.e
>   for i = 1 to 200 do
>     do somthing
>   end for
> #ENDIF

That's an example of embedding a macro language.  And it would be very
useful.  I would use this with wxEuphoria (I currently have a perl script
that comments and uncomments based on similar directives).  However, it
would take about 5 seconds before someone else asked why they couldn't do
something much more complicated.  I guess I was just thinking about that
inevitability...

Matt Lewis

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu