grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pre-alpha scripting engine


From: Serbinenko Vladimir
Subject: Re: Pre-alpha scripting engine
Date: Thu, 20 Jan 2005 18:10:17 +0100
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Maurizio Boriani wrote:

The use of guile (as specified in gnu standards) as embedded language should be a good choice :) but this is only an idea

bye

The problem with guile is that it has no $ before variable which makes it difficult to integrate with shell. I discovered that bash and PHP can even coexist!! But I don't know bash very well so if I'm wrong please e-mail it. Now I'm rewriting the parser for easier integrating(thanks Marco). At the same time it'll be combined PHP/bash blocks detector
Ambiguos operator I found is do in constuction like
for (...) do
   ..;
   while(...);
Can wcript end here? Is do ...; while (...); PHP or bash I propose folowing checking: if after ambiguos do there is operator and then while with ; it's PHP because in bash you have to write
while (...)
   do ...
If you really want that while is PHP but do is bash you can write
for (...) do
   ..;;
   while(...);
done;
Other my idea is to introduce #!bash and #!php commands to switch languages ex:
#!bash
for (...) do
   ..;
#!php
   while(...);
#!bash
done;
Perhaps also #!auto. But in my realisation they won't restrict using of other language but simply set that ambiguos constructions are php or bash.
What do you think about it all?
Please mail any your idea.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]