1HTML: module 2{ 3 PATH: con "/dis/lib/html.dis"; 4 5 Lex: adt 6 { 7 tag: int; 8 text: string; # text in Data, attribute text in tag 9 attr: list of Attr; 10 }; 11 12 Attr: adt 13 { 14 name: string; 15 value: string; 16 }; 17 18 # sorted in lexical order; used as array indices 19 Notfound, 20 Ta, Taddress, Tapplet, Tarea, Tatt_footer, Tb, 21 Tbase, Tbasefont, Tbig, Tblink, Tblockquote, Tbody, 22 Tbq, Tbr, Tcaption, Tcenter, Tcite, Tcode, Tcol, Tcolgroup, 23 Tdd, Tdfn, Tdir, Tdiv, Tdl, Tdt, Tem, 24 Tfont, Tform, Tframe, Tframeset, 25 Th1, Th2, Th3, Th4, Th5, Th6, Thead, Thr, Thtml, Ti, Timg, 26 Tinput, Tisindex, Titem, Tkbd, Tli, Tlink, Tmap, Tmenu, 27 Tmeta, Tnobr, Tnoframes, Tol, Toption, Tp, Tparam, Tpre, 28 Tq, Tsamp, Tscript, Tselect, Tsmall, Tstrike, Tstrong, 29 Tstyle, Tsub, Tsup, Tt, Ttable, Ttbody, Ttd, Ttextarea, Ttextflow, Ttfoot, Tth, 30 Tthead, Ttitle, Ttr, Ttt, Tu, Tul, Tvar 31 : con iota; 32 RBRA: con 1000; 33 Data: con 2000; 34 Latin1, UTF8: con iota; # charsets 35 36 lex: fn(b: array of byte, charset: int, keepnls: int): array of ref Lex; 37 attrvalue: fn(attr: list of Attr, name: string): (int, string); 38 globalattr: fn(html: array of ref Lex, tag: int, attr: string): (int, string); 39 isbreak: fn(h: array of ref Lex, i: int): int; 40 lex2string: fn(l: ref Lex): string; 41}; 42