$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: [boost] [spirit][karma] In-place modification of previously parsed content?
From: Carlos Rafael Giani (e0325834_at_[hidden])
Date: 2009-08-19 13:26:50
Hello,
I wonder if it is possible to modify previously parsed content using
Karma. An example is some text like:
coordinate (1, 4.15, 1.49, 0.81) // some comment 1
coordinate (1, -19, 4, -1) // some comment 2
Now suppose the numbers are all parsed, and I change the 0.81 to 71.44.
I want to update the text accordingly:
coordinate (1, 4.15, 1.49, 71.44) // some comment 2
coordinate (1, -19, 4, -1) // some comment 2
Note how the overall formatting and comments are preserved. The text
could contain lots of other strings etc. and they would be all left
untouched. This part - the preservation - is the hard one, and I ask, is
this possible using Karma?