]> matita.cs.unibo.it Git - helm.git/blob - helm/DEVEL/pxp/pxp/lexers/pxp_lex_within_tag.src
Initial revision
[helm.git] / helm / DEVEL / pxp / pxp / lexers / pxp_lex_within_tag.src
1 (* $Id$
2  * ----------------------------------------------------------------------
3  *
4  *)
5
6
7 {
8   open Pxp_types
9   open Pxp_lexer_types
10
11 #insert open_pxp_lex_aux_*.src
12 #insert pxp_lex_aux.src
13
14 }
15
16 #insert pxp_lex_defs_*.def
17
18
19 rule scan_within_tag = parse
20     ws+
21       { tok_Ignore__Within_tag }
22   | name
23       { Name (Lexing.lexeme lexbuf ), Within_tag }
24   | '='
25       { tok_Eq__Within_tag }
26   | '"' character_except_quot* '"'
27       { let s = Lexing.lexeme lexbuf in
28         let v = String.sub s 1 (String.length s - 2) in
29         Attval v, Within_tag }
30   | '"'
31       { raise (WF_error ("Cannot find the second quotation mark"))
32       }
33   | "'" character_except_apos* "'"
34       { let s = Lexing.lexeme lexbuf in
35         let v = String.sub s 1 (String.length s - 2) in
36         Attval v, Within_tag }
37   | "'"
38       { raise (WF_error ("Cannot find the second quotation mark"))
39       }
40   | '>'
41       { tok_Rangle__Content }
42   | "/>"
43       { tok_Rangle_empty__Content }
44   | eof
45       { tok_Eof__Within_tag }
46   | character
47       { raise (WF_error ("Illegal inside tags")) }
48   | _
49       { raise Netconversion.Malformed_code }
50
51
52 (* ======================================================================
53  * History:
54  * 
55  * $Log$
56  * Revision 1.1  2000/11/17 09:57:32  lpadovan
57  * Initial revision
58  *
59  * Revision 1.3  2000/08/14 22:18:34  gerd
60  *      Bad_character_stream -> Netconversion.Malformed_code
61  *
62  * Revision 1.2  2000/05/29 23:53:12  gerd
63  *      Updated because Markup_* modules have been renamed to Pxp_*.
64  *
65  * Revision 1.1  2000/05/20 20:33:25  gerd
66  *      Initial revision.
67  *
68  * 
69  *)