
On Fri, Dec 25, 2009 at 10:31 AM,
As Wave is a preprocessor conforming to the C++ Standard this is not
possible. But you can define your macro like
#define x(y) llList2String(x,y)
if that's an option.
OTOH, Wave is open source, so you should be able to find the corresponding code to add your syntax. Do you want _all_ macros to be defined using the [] syntax or is this something you want to have additionally to the 'normal' function style syntax?
As far as I can tell, x(y) treats it as a function named x with a argument, not the x as a argument itself to do (y) on; in any case I wanted it in addition to the normal behavior.
Also, LSL does not use [] except for defining lists, e.g. list ex = [entry1,entry2,entr3];, or as a argument to a function, func([1,2,3],.. , but never in this particular manner, which would involve alphanumeric characters from the var name directly preceding the [. I was just wondering if there was something I could easily change to allow for this through wave.
In that case you could easily make a stand-alone parser out of Spirit.QI that can do what you wish. Use of the symbol table and skipping things you are not matching will work perfectly. I doubt you would want to use Boost.Wave though as it would be difficult to edit and would do a *lot* more then necessary (and be slower because of that).