bd on Tue, 23 Jan 2007 07:00:25 +0100 (CET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [s-d] proposal parser


Antonio Dolcetta wrote:
> On 22 Jan 2007, at 22:21, Daniel Lepage wrote:
> 
>> On Jan 22, 2007, at 1:02 PM, Antonio Dolcetta wrote:
>>> I've written a very basic (read: horrible) proposal parser.
>>> you start proposals by writing BEGINPROPOSAL and end them with
>>> ENDPROPOSAL, each proposal must have a title, enclosed between
>>> STARTTITLE ENDTITLE
>> What if I want to use the word "ENDPROPOSAL" in the course of my
>> proposal?
> 
> yes, that would break it,
> easy solution: don't do it
> hard solution: think up a way to dynamically figure some delimiters,  
> ideas ?

How about: Increment nesting-level on /^\s*{{/, decrement on /^\s*}}/. 
When nesting-level goes above 0, start a prop; when it goes back to 0, 
end one.

>>> I was also thinking, instead of having people send proposals to a
>>> special address we could simply subscribe the bot to the mailing list
>>> and have it work automatically, that would be nice.
>> It would be nice as long as there were some clear indication when
>> something goes wrong. For example, if I start a message with
>> STARTPROOSAL, everyone will get the message and see that I made a
>> proposal, but it wouldn't show up on the page because the script
>> wouldn't recognize it.
>>
> 
> i was thinking that the script would send an ack mail to the list, so  
> you would notice something is wrong if you don't see it

Perhaps spoon-notices could be used for this? If a sequence number was 
assigned by the bot that'd be useful too. We should have legislation to 
allow prop sequence numbers to be assigned out of order when necessary 
though.

_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss