[Top][All Lists]

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

Re: Scripting support (PATCH)

From: Marco Gerards
Subject: Re: Scripting support (PATCH)
Date: Sun, 30 Oct 2005 17:59:34 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Vladimir Serbinenko <address@hidden> writes:

>>I think you have to parse it immediately and both store parsed and the
>>unparsed code.  After editing you do the same again.
> I see 2 approaches:
> 1) Parse menu commands right before executing
> 2) Parse them directly and reparse after editing.
> I think 1st one is cleaner because the parser will be at the same
> place after editing or before

Same for #2.  And #2 matches the rest of the code.  Otherwise you are
parsing the code twice.  One when reading it and once when executing
it.  The code is already parsed by bison.  If you ignore the result of
this parsing you are causing a memory leak and wasting processor
time.  It is done already so why not use it? :)

So the problem with approach #1 is doing double work, less obvious
integration with the rest of the parser and memory leakage.

>>This solution is required if you want to be able to edit the complete
>>script instead of just the separate menu entries.  I think this is not
>>interesting, but if someone wants to know I can say more about this.
> I think also. Because theese modifications are lost after boot they
> are generally modified only to boot one time an OS with specifical
> parameters and you don't need scripts for this.

Right.  The only reason I see for editing the script in general is to
edit some menu generation routine.  But that is a very rare case I
think.  If it turns out not to be a rare case, we can provide this
feature later on.


reply via email to

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