Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2006-04-26 19:34:16


"Marcin Kalicinski" wrote:

>I have an interesting idea how to preserve comments & layout information.
>The relevant structures should be included in the tree under a special meta
>key:
>
> Config file:
>
> key1 data1
> ;comment before key2
> key2 data2 ;comment after key2, on the same line
>
> The resulting tree might look like that:
>
> key1 data1
> key2 data2
> _metadata_
> {
> key1
> {
> row 1
> column 1
> }
> comment "comment before key2"
> {
> row 2
> column 1
> }
> .. etc
> }
>

It may be needed to store also:
* location of data
* anything in between key and data (=, spaces)
* information about any transformations made by the parser
   (e.g. transparent handling of \ at the end of lines,
   escape sequences if they are used, presence
    or lack of parenthesis, their kind, numeric formatting, ...)

If one deletes a data item will the corresponding
metadata dissappear automatically?

The metadata my use different allocator than
the 'normal' data.

/Pavel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk