2 * ----------------------------------------------------------------------
11 #insert open_pxp_lex_aux_*.src
12 #insert pxp_lex_aux.src
16 #insert pxp_lex_defs_*.def
18 (* This lexer is used to expand and normalize attribute values: *)
20 rule scan_content_string = parse
22 { let s = Lexing.lexeme lexbuf in
23 ERef (String.sub s 1 (String.length s - 2)) }
24 | "&#" ascii_digit+ ";"
25 { let s = Lexing.lexeme lexbuf in
26 CRef (int_of_string (String.sub s 2 (String.length s - 3))) }
27 | "&#x" ascii_hexdigit+ ";"
28 { let s = Lexing.lexeme lexbuf in
29 CRef (int_of_string ("0x" ^ String.sub s 3 (String.length s - 4))) }
31 { raise(WF_error("The character '&' must be written as '&'")) }
32 | printable_character_except_amp_lt+
33 { CharData (Lexing.lexeme lexbuf) }
37 { CRef(-1) (* A special case *)
45 (* Depending on the situation, '<' may be legal or not: *)
51 { raise Netconversion.Malformed_code }
54 (* ======================================================================
58 * Revision 1.1 2000/11/17 09:57:32 lpadovan
61 * Revision 1.3 2000/08/14 22:18:34 gerd
62 * Bad_character_stream -> Netconversion.Malformed_code
64 * Revision 1.2 2000/05/29 23:53:12 gerd
65 * Updated because Markup_* modules have been renamed to Pxp_*.
67 * Revision 1.1 2000/05/20 20:33:25 gerd