
Hi Otavio,
On Tue, Apr 23, 2013 at 8:20 PM, Otavio Salvador otavio@ossystems.com.br wrote:
On Wed, Apr 24, 2013 at 12:05 AM, Simon Glass sjg@chromium.org wrote:
On Tue, Apr 23, 2013 at 7:44 PM, Otavio Salvador otavio@ossystems.com.br wrote:
On Tue, Apr 23, 2013 at 11:36 PM, Simon Glass sjg@chromium.org wrote:
Thanks for the suggestion. But that, along with the need for quotes, is one of the reasons I would like to provide a way to enter scripts naturally.
Adding \ at the end of each line is error-prone and gets in the way. Python and C don't have this requirement - so why should U-Boot scripts?
I wonder if we could define that 'xxx=' at the start of a line delineates a new variable?
The problem with this kind of thing is we might end doing a full parser and doing a semantic interpret of the text. It seems to be way too complex ...
I can do the above with a simple sed script.
Do you mean we might create a new type of parser? If so, then we could perhaps use a .scr extension or similar. My idea here is specifically for environment.
I fully agree that the environment file should be as easy as possible to be written. However I also think it should be parsed by CPP or something which would allow us to 'include' other environment files and enable/disable parts of it depending on board config. My ultimate goal with it would be to allow sharing of environment setup across different boards (for example the Freescale boards).
Your wish may be granted, I think this is easy enough, and we can support #defines, etc. as well.
Regards, Simon