~ubuntu-branches/ubuntu/hardy/pxp/hardy

« back to all changes in this revision

Viewing changes to src/pxp-lex-generic/pxp_lex_name_string.src

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Zacchiroli
  • Date: 2005-03-29 11:06:39 UTC
  • mfrom: (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050329110639-5p39hz1d4aq3r2ec
Tags: 1.1.95-6
* Rebuilt against ocaml 3.08.3
* No longer built with wlex support (since wlex is no longer supported
  upstream and corresponding package has been removed from the debian
  archive)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(* $Id: pxp_lex_name_string.src,v 1.4 2001/06/14 14:25:56 gerd Exp $
2
 
 * ----------------------------------------------------------------------
3
 
 *
4
 
 *)
5
 
 
6
 
 
7
 
{
8
 
  open Pxp_types
9
 
  open Pxp_lexer_types
10
 
 
11
 
#insert open_pxp_lex_aux_*.src
12
 
}
13
 
 
14
 
#insert pxp_lex_defs_*.def
15
 
 
16
 
rule scan_name_string = parse
17
 
    name
18
 
      { Name (Lexing.lexeme lexbuf) }
19
 
  | ws+
20
 
      { Ignore }
21
 
  | nmtoken
22
 
      { Nametoken (Lexing.lexeme lexbuf) }
23
 
  | eof
24
 
      { Eof }
25
 
  | character
26
 
      { CharData (Lexing.lexeme lexbuf) }
27
 
  | _
28
 
      { raise Netconversion.Malformed_code }
29
 
 
30
 
 
31
 
and scan_ignored_section = parse
32
 
  | "<!["
33
 
      { tok_Conditional_begin__Ignored }
34
 
  | "]]>"
35
 
      { tok_Conditional_end__Ignored }
36
 
  | "<!--" comment_string "-->"
37
 
      { tok_Ignore__Ignored }
38
 
  | '"' character_except_quot* '"'
39
 
      { tok_Ignore__Ignored }
40
 
  | "'" character_except_apos* "'"
41
 
      { tok_Ignore__Ignored }
42
 
  | eof
43
 
      { tok_Eof__Ignored }
44
 
  | character_except_special+
45
 
      { tok_Ignore__Ignored }
46
 
  | "<"
47
 
      { tok_Ignore__Ignored }
48
 
  | "]"
49
 
      { tok_Ignore__Ignored }
50
 
  | "'"
51
 
      { tok_Ignore__Ignored }
52
 
  | "\""
53
 
      { tok_Ignore__Ignored }
54
 
  | _
55
 
      { raise Netconversion.Malformed_code }
56
 
 
57
 
 
58
 
(* ======================================================================
59
 
 * History:
60
 
 * 
61
 
 * $Log: pxp_lex_name_string.src,v $
62
 
 * Revision 1.4  2001/06/14 14:25:56  gerd
63
 
 *      Removed insertion of pxp_lex_aux.src
64
 
 *
65
 
 * Revision 1.3  2000/08/14 22:18:34  gerd
66
 
 *      Bad_character_stream -> Netconversion.Malformed_code
67
 
 *
68
 
 * Revision 1.2  2000/05/29 23:53:12  gerd
69
 
 *      Updated because Markup_* modules have been renamed to Pxp_*.
70
 
 *
71
 
 * Revision 1.1  2000/05/20 20:33:25  gerd
72
 
 *      Initial revision.
73
 
 *
74
 
 * 
75
 
 *)