2 * ----------------------------------------------------------------------
11 #insert open_pxp_lex_aux_*.src
12 #insert pxp_lex_aux.src
16 #insert pxp_lex_defs_*.def
17 (* The following scanner is used to determine the replacement text of
21 rule scan_dtd_string = parse
23 { let s = Lexing.lexeme lexbuf in
24 PERef (String.sub s 1 (String.length s - 2)) }
26 { raise(WF_error("The character '%' must be written as '%'")) }
28 { let s = Lexing.lexeme lexbuf in
29 ERef (String.sub s 1 (String.length s - 2)) }
30 | "&#" ascii_digit+ ";"
31 { let s = Lexing.lexeme lexbuf in
32 CRef (int_of_string (String.sub s 2 (String.length s - 3))) }
33 | "&#x" ascii_hexdigit+ ";"
34 { let s = Lexing.lexeme lexbuf in
35 CRef (int_of_string ("0x" ^ String.sub s 3 (String.length s - 4))) }
37 { raise(WF_error("The character '&' must be written as '&'")) }
46 | printable_character_except_amp_percent+
47 { CharData (Lexing.lexeme lexbuf) }
51 { raise Netconversion.Malformed_code }
53 (* ======================================================================
57 * Revision 1.1 2000/11/17 09:57:32 lpadovan
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