Module sgmllib
[hide private]
[frames] | no frames]

Module sgmllib

A parser for SGML, using the derived class as a static DTD.

Classes [hide private]
SGMLParseError
Exception raised for all parse errors.
SGMLParser
TestSGMLParser
Functions [hide private]
 
test(args=None)
Variables [hide private]
  interesting = re.compile(r'[&<]')
  incomplete = re.compile(r'&([a-zA-Z][a-zA-Z0-9]*|#[0-9]*)?|<([...
  entityref = re.compile(r'&([a-zA-Z][-\.a-zA-Z0-9]*)[^a-zA-Z0-9]')
  charref = re.compile(r'&#([0-9]+)[^0-9]')
  starttagopen = re.compile(r'<[>a-zA-Z]')
  shorttagopen = re.compile(r'<[a-zA-Z][-\.a-zA-Z0-9]*/')
  shorttag = re.compile(r'<([a-zA-Z][-\.a-zA-Z0-9]*)/([^/]*)/')
  piclose = re.compile(r'>')
  endbracket = re.compile(r'[<>]')
  tagfind = re.compile(r'[a-zA-Z][-_\.a-zA-Z0-9]*')
  attrfind = re.compile(r'\s*([a-zA-Z_][-:\.a-zA-Z_0-9]*)(\s*=\s...

Imports: markupbase, re


Variables Details [hide private]

incomplete

Value:
re.compile(r'&([a-zA-Z][a-zA-Z0-9]*|#[0-9]*)?|<([a-zA-Z][^<>]*|/([a-zA\
-Z][^<>]*)?|![^<>]*)?')

attrfind

Value:
re.compile(r'\s*([a-zA-Z_][-:\.a-zA-Z_0-9]*)(\s*=\s*(\'[^\']*\'|"[^"]*\
"|[\]\[-a-zA-Z0-9\./,:;\+\*%\?!&\$\(\)_#=~\'"@]*))?')