regularsec : HEADERSEC opttexts optsubsections

def p_regularsec(self, regularsec):
        '''regularsec : HEADERSEC opttexts optsubsections'''
        texts = []
        sections = regularsec[2]
        if len(regularsec) > 3:
            texts = regularsec[2]
            sections = regularsec[3]
        regularsec[0] = Section(regularsec[1], texts, sections)