2 * ----------------------------------------------------------------------
11 #insert pxp_lex_aux.src
13 #insert open_pxp_lex_aux_*.src
14 #insert open_pxp_lex_misc_*.src
18 #insert pxp_lex_defs_*.def
21 (* scan_document: Lexer for the outermost structures *)
23 rule scan_document = parse
25 { scan_pi (Lexing.lexeme lexbuf) scan_xml_pi, Document }
27 { raise (WF_error ("Illegal processing instruction")) }
29 { tok_Doctype__Document_type }
31 { Comment_begin, Document_comment }
33 { raise (WF_error "Declaration either malformed or not allowed in this context")
36 { let s = Lexing.lexeme lexbuf in
37 Tag_beg (String.sub s 1 (String.length s - 1), dummy_entity), Within_tag
40 { raise (WF_error ("Illegal token")) }
42 { tok_Ignore__Document }
46 { raise (WF_error ("Content not allowed here")) }
48 { raise Netconversion.Malformed_code }
50 (* ======================================================================
54 * Revision 1.1 2000/11/17 09:57:32 lpadovan
57 * Revision 1.4 2000/08/18 20:19:59 gerd
58 * Comments return different comment tokens.
60 * Revision 1.3 2000/08/14 22:18:34 gerd
61 * Bad_character_stream -> Netconversion.Malformed_code
63 * Revision 1.2 2000/05/29 23:53:12 gerd
64 * Updated because Markup_* modules have been renamed to Pxp_*.
66 * Revision 1.1 2000/05/20 20:33:25 gerd