Qf=9dZddlZejdjZejdjZejdZejdZejdZ[Gdd Z y) zShared support for scanning document type declarations in HTML and XHTML. This module is used as a foundation for the html.parser module. It has no documented public API and should not be used directly. Nz[a-zA-Z][-_.a-zA-Z0-9]*\s*z(\'[^\']*\'|"[^"]*")\s*z--\s*>z ]\s*]\s*>z]\s*>cleZdZdZdZdZdZdZdZdZ ddZ dd Z d Z d Z d Zd ZdZdZdZy) ParserBaseziParser base class which provides some common support methods used by the SGML/HTML and XHTML parsers.c>|jtur tdy)Nz)_markupbase.ParserBase must be subclassed) __class__r RuntimeErrorselfs 2/opt/alt/python312/lib64/python3.12/_markupbase.py__init__zParserBase.__init__s# >>Z ';= = (c d|_d|_y)Nrlinenooffsetrs r resetzParserBase.reset s  r c2|j|jfS)z&Return current line number and offset.rrs r getposzParserBase.getpos$s{{DKK''r c||k\r|S|j}|jd||}|r6|j|z|_|jd||}||dzz |_|S|j|z|z |_|S)N r)rawdatacountrrindexr)r ijrnlinesposs r updateposzParserBase.updatepos,s 6H,,tQ* ++.DK..q!,CSU)DK++/!+DKr c|j}|dz}|||dzdk(r|dzS|||dzdvryt|}|||dzdk(r|j|S||dk(r|j|S|j ||\}}|dkr|S|d k(rd |_||kr||}|dk(r9||dz|}|d k(r|j ||dzS|j||dzS|d vr t||}|sy|j}n||d vr|j ||\} }nb||j vr|dz}nN|dk(r8|d k(r|j|dz|}n.|d vrtd|ztdtd||z|dkr|S||kry)Nr>)-rz--[rdoctyperz"'4abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ>linkattlistelementlinktypez&unsupported '[' char in %s declarationz"unexpected '[' char in declarationz!unexpected %r char in declaration) rlen parse_commentparse_marked_section _scan_name_decl_otherchars handle_decl unknown_decl_declstringlit_matchend_parse_doctype_subsetAssertionError) r rrrndecltypecdatamnames r parse_declarationzParserBase.parse_declaration<s,, E 1QqS>S q5L 1QqS>Y & L 1QqS>T !%%a( ( QZ3  ,,Q/ ///!Q/KHa q5H y $&D !!e ACxqs1~y($$T*1u %%d+1u Ez(!4EEGLL//!Q/ad+++Ecy(221q5!tempcdataignorercdatainclude>ifelseendifz+unknown status keyword %r in marked sectionr$) rr/_markedsectionclosesearch_msmarkedsectioncloser6startr2r4)r rreportrsectNamermatchs r r.zParserBase.parse_marked_sectionsooqsA/ ! q5H G G&--gqs;E 0 0(//1=E =!AN   AA   gac1o .yy|r c|j}|||dzdk7r tdtj||dz}|sy|r(|j d}|j ||dz||j dS)N