
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi all, I'm trying to write a parser which can write on the input string (mainly insert string at the current position). Does spirit contain any stuff that can help me in that way ? Thanks, Jean -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFH8fODQ0w7PvnJLt4RAnzxAJ4zbimcHG9G6IvCusqcZ6OXBS+cKQCcDsIL 6nhnvOMeJisGXPNjT/0c5Hs= =lH7Z -----END PGP SIGNATURE-----

[Please do not mail me a copy of your followup] boost-users@lists.boost.org spake the secret code <47F1F383.5060802@free.fr> thusly:
I'm trying to write a parser which can write on the input string (mainly insert string at the current position).
You're probably better off representing this as a transformation instead of an edit-in-place.
Does spirit contain any stuff that can help me in that way ?
AFAIK, Spirit doesn't contain any mechanisms for modifying the input -- that's considered beyond the scope of a parser. You could probably create your own out-of-band mechanism for doing it, but it would probably mess up spirit's idea of where it is within the input as you modified the input. -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download http://www.xmission.com/~legalize/book/download/index.html Legalize Adulthood! http://blogs.xmission.com/legalize/

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Richard a écrit :
[Please do not mail me a copy of your followup]
boost-users@lists.boost.org spake the secret code <47F1F383.5060802@free.fr> thusly:
I'm trying to write a parser which can write on the input string (mainly insert string at the current position).
You're probably better off representing this as a transformation instead of an edit-in-place. I'm afraid you're right but I wanted to avoid it.
Does spirit contain any stuff that can help me in that way ?
AFAIK, Spirit doesn't contain any mechanisms for modifying the input -- that's considered beyond the scope of a parser. You could probably create your own out-of-band mechanism for doing it, but it would probably mess up spirit's idea of where it is within the input as you modified the input. I haven't really thought but I guess I would need
* to maintain iterators during each input transformation, * perhaps to trigger some "cut" or backtrack. By the way, I was wondering if "multi_pass" could meet some of my requirements but I haven't found any example. Has someone seen an example illustrating multi_pass ? Thanks, Jean -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org iD8DBQFH8qKUQ0w7PvnJLt4RAptmAJ0Uo2hqrhzVzGgO77uA8mnHnN6MHQCfZqWL eT+OH4KC23Tnj99bAhybQdc= =XVDq -----END PGP SIGNATURE-----
participants (2)
-
Jean Vittor
-
legalize+jeeves@mail.xmission.com