Proposals must be enclosed within a pair of proposal tags to be recognized by the parser:
As with html tags (after which they were clearly modeled) the proposal tags themselves are case insensitive.
<Proposal>blah blah blah</Proposal>
<proposal>should1 be recognized just a readily as
<PrOpOsAl>. There are several atributes which may be placed within the open proposal tag:
revise = "n"
activate = "n"
deactivate = "n"
withdraw = "n"
title = "text"
create: uses the text within the proposal tags to create a new proposal, which is assigned the least integer greater than any other proposal number.
createrequires no value; anything assigned to it will be ignored.
revise: uses the text within the proposal tags to create a proposal with number n (but only if there is already a live proposal n), with a revision number one greater than the previous version.
activate: changes the activity of proposal n to "active".
deactivate: the opposite of
activate, changes the activity of proposal n to "inactive".
withdraw: withdraws proposal n, i.e., sets its vitality to "dead"
title: sets the title of proposals specified by
titlestill need to be quoted, though, since they're strings. (Actually, the parser is intended to be fairly flexible with regard to the html-like elements.)
blah blahor so:
yak yakThe same goes for double quotation marks in proposal titles. Also, if you actually want a title or proposal text to end with a backslash, you can do so by protecting the backslash with another backslash, and so on, to get as many backslashed as you want.
This seems to work with the severely limited set of test cases I've put to it, which, as all programmers know, means it probably doesn't work at all. Additionally, I cannot even begin to anticipate the vast array of wierd, malformed, and all-around pathological input3 that this program will be expected to handle properly--which is why I'd appreciate it if everyone would give it a shot (preferably a few), with input both normal and odd.
If it accepts your input, this page will be updated to reflect the changes you made. Otherwise, it will mail you (and me) a message explaining (tersely, and thus poorly) why it failed. So, if it works as you expect, there's no need to tell me--I'll see the results; likewise if it generates an error. If it accepts your input, but then proceeds to mangle it, however, a copy of your input would be greatly appreciated so I can track down the problem.
Also, in case anyone wants to grok my confusing, ill-commented code, it can be found here and here. The latter code has been mostly obseleted by the switch to MySQL, and will probably be dispensed with entirely very soon.
1This (and all remarks above) describe an ideal version of my program. Consequently, you may find output produced by the actual program to differ somewhat from the ideal output . . . which is, or course, why we're testing it.
2Philosophy joke. About Descartes, natural intuition, and access to the forms. 'Nuff said.
<libel>Originating mostly with Josh, I expect.