Re: Ответ: Ответ: LIBBB: config_*()

Vladimir Dronnikov dronnikov at gmail.com
Fri Jul 18 09:00:48 UTC 2008


> consider:
> ::sysinit:echo "it:works"

In the last patch I tried to cope this.
"seen" variable is not exactly what is needed.

I introduced PARSE_DONT_TRIM flag to inhibit trimming config line prior to
parsing.
With this flag set one can correctly parse, say,
::::aa::
line of a virtual config file into 6 tokens.
Without this flag (default) we could correctly parse, say,
<SP><TAB><SP>/dev/root<SP><TAB>/<TAB> ............
line of a virtual "polluted" /etc/fstab file.

PARSE_DONT_REDUCE forces a token before EACH delimiter to be counted
regardless of whether it is empty or not.
The problem of screening delimiters ?itselves? is not solved yet and surely
is TODO. Though a vanilla approach of doubling them can be made, IMO. The
problem is not trivial and any help would be appreciated.

I introduced temporary parse applet to be used in testsuite while we're
settling things down.

I wonder if an awk internal capability of parsing $0 into $1, $2, ... can be
reused here? I'm not fluent in awk internal guts, so may be one can answer?

A regexp approach can surely be used as a resort.

Regards,
--
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20080718/4f56e4a7/attachment-0002.htm 


More information about the busybox mailing list