parsing comments in scripts

Hugh Gallagher hugh at hulagal.net
Fri Dec 10 16:55:46 EST 2004


Dar, thanks for the tip.  Hugh


On Dec 10, 2004, at 2:39 PM, Dar Scott wrote:

>
> On Dec 10, 2004, at 1:28 PM, Mark Wieder wrote:
>
>> RB> In general, I think you need to use the offset function for each 
>> line
>> RB> and check for either -- or # and count whether there is an even
>> RB> number of double-quotes before it (setting for example itemdelim 
>> to
>> RB> quote and get the item count). If count is odd, you are within
>> RB> literal and should continue. If count is even, then you hit a
>> RB> beginning of comment. I think this approach will work with all 
>> cases.
> ...
>> Yes - I was doing something complicated like that and hit on the
>> tokens thing as a way to simplify and speed things up.
>
> Don't forget special parsing for this:
>
> format("..."
>
> Dar
>
> ****************************************
>     DSC
>     http://www.swcp.com/dsc/
>     Programming Services
> ****************************************
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>



More information about the use-livecode mailing list