def do_p(self, node):
keys = list(node.attributes.keys())<EOL>if "<STR_LIT:class>" in keys:<EOL><INDENT>if node.attributes["<STR_LIT:class>"].value == "<STR_LIT>":<EOL><INDENT>self.capitalizeNextWord = <NUM_LIT:1><EOL><DEDENT><DEDENT>if "<STR_LIT>" in keys:<EOL><INDENT>chance = int(node.attributes["<STR_LIT>"].value)<EOL>doit = (chance > random.randrange(<NUM_LIT:100>))<EOL><DEDENT>else:<EOL><INDENT>doit = <NUM_LIT:1><EOL><DEDENT>if doit:<EOL><INDENT>for child in node.childNodes: self.parse(child)<EOL><DEDENT>
handle <p> tag

        The <p> tag is the core of the grammar.  It can contain almost
        anything: freeform text, <choice> tags, <xref> tags, even other
        <p> tags.  If a "class='sentence'" attribute is found, a flag
        is set and the next word will be capitalized.  If a "chance='X'"
        attribute is found, there is an X% chance that the tag will be
        evaluated (and therefore a (100-X)% chance that it will be
        completely ignored)