[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: RE: RE: RE: RE: RE: Parsing not-quite-standard syntax
Many thanks for your suggestions.
After much experimenting, I would add "bind" to the gettoken statement to avoid any problems parsing functions that contain commas (this seems to be a very useful option I had not come across before).
Otherwise, this is pretty much what I have ended up with (but a little more complicated to split off the name from the beginning, as this turns out to be important for the real program). Bundling if and in together has saved a lot of work though. I also like the idea of using -syntax- to parse the rest once the dodgy bits have been removed - very handy.
> No, that first route is unnecessary. How about
> program foo
> gettoken data 0 : 0, parse(",")
> syntax [, * ]
> use `data', clear
> That way, any -if- or -in- are just bundled within `data'.
* For searches and help try: