2 * ----------------------------------------------------------------------
11 #insert open_pxp_lex_aux_*.src
12 #insert pxp_lex_aux.src
16 #insert pxp_lex_defs_*.def
19 (* scan_document_type: after "<!DOCTYPE" until matching ">" *)
21 rule scan_document_type = parse
23 { let s = Lexing.lexeme lexbuf in
24 Name s, Document_type }
26 { tok_Ignore__Document_type }
27 | '"' character_except_quot* '"'
28 { let s = Lexing.lexeme lexbuf in
29 (Unparsed_string (String.sub s 1 (String.length s - 2))), Document_type }
31 { raise (WF_error ("Cannot find the second quotation mark"))
33 | "'" character_except_apos* "'"
34 { let s = Lexing.lexeme lexbuf in
35 (Unparsed_string (String.sub s 1 (String.length s - 2))), Document_type }
37 { raise (WF_error ("Cannot find the second quotation mark"))
40 { tok_Dtd_begin__Declaration }
42 { tok_Doctype_rangle__Document }
44 { tok_Eof__Document_type }
46 { raise (WF_error("References to general entities not allowed here")) }
48 { raise (WF_error("References to parameter entities not allowed here")) }
50 { raise (WF_error("Content not allowed here")) }
52 { raise Netconversion.Malformed_code }
55 (* ======================================================================
59 * Revision 1.1 2000/11/17 09:57:32 lpadovan
62 * Revision 1.3 2000/08/14 22:18:34 gerd
63 * Bad_character_stream -> Netconversion.Malformed_code
65 * Revision 1.2 2000/05/29 23:53:12 gerd
66 * Updated because Markup_* modules have been renamed to Pxp_*.
68 * Revision 1.1 2000/05/20 20:33:25 gerd