3 open Parser_cocci_menhir
6 exception Lexical
of string
7 let tok = Lexing.lexeme
10 let inc_line _
= Lexer_cocci.line
:= !Lexer_cocci.line
+ 1
12 #
13 "lexer_script.ml"
13 let __ocaml_lex_tables = {
15 "\000\000\247\255\248\255\249\255\001\000\001\000\254\255\004\000\
16 \253\255\008\000\001\000\254\255\255\255\002\000\254\255\255\255\
19 "\255\255\255\255\255\255\255\255\004\000\003\000\255\255\000\000\
20 \255\255\005\000\255\255\255\255\255\255\255\255\255\255\255\255\
23 "\007\000\000\000\000\000\000\000\255\255\255\255\000\000\007\000\
24 \000\000\009\000\011\000\000\000\000\000\014\000\000\000\000\000\
27 "\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
28 \000\000\000\000\006\000\006\000\006\000\006\000\255\255\255\255\
29 \255\255\255\255\255\255\000\000\000\000\000\000\000\000\000\000\
30 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
31 \000\000\000\000\003\000\012\000\000\000\000\000\255\255\002\000\
32 \000\000\015\000\000\000\255\255\000\000\000\000\000\000\004\000\
33 \009\000\000\000\000\000\255\255\000\000\000\000\000\000\000\000\
34 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
35 \005\000\008\000\000\000\000\000\255\255\000\000\000\000\000\000\
36 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
37 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
38 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
39 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
40 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
41 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
42 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
43 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
44 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
45 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
46 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
47 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
48 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
49 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
50 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
51 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
52 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
53 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
54 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
55 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
56 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
57 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
58 \000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\
59 \001\000\255\255\255\255\000\000\255\255\000\000\000\000\000\000\
62 "\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
63 \255\255\255\255\000\000\000\000\000\000\000\000\007\000\007\000\
64 \007\000\007\000\009\000\255\255\255\255\255\255\255\255\255\255\
65 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
66 \255\255\255\255\000\000\010\000\255\255\255\255\007\000\000\000\
67 \255\255\013\000\255\255\007\000\255\255\255\255\255\255\000\000\
68 \004\000\255\255\255\255\007\000\255\255\255\255\255\255\255\255\
69 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
70 \000\000\005\000\255\255\255\255\007\000\255\255\255\255\255\255\
71 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
72 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
73 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
74 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
75 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
76 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
77 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
78 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
79 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
80 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
81 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
82 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
83 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
84 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
85 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
86 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
87 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
88 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
89 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
90 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
91 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
92 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
93 \255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\255\
94 \000\000\010\000\013\000\255\255\007\000\255\255\255\255\255\255\
96 Lexing.lex_base_code
=
98 Lexing.lex_backtrk_code
=
100 Lexing.lex_default_code
=
102 Lexing.lex_trans_code
=
104 Lexing.lex_check_code
=
110 let rec token lexbuf
=
111 __ocaml_lex_token_rec lexbuf
0
112 and __ocaml_lex_token_rec lexbuf __ocaml_lex_state
=
113 match Lexing.engine
__ocaml_lex_tables __ocaml_lex_state lexbuf
with
115 #
19 "lexer_script.mll"
116 ( TScriptData
(tok lexbuf
) )
117 #
118 "lexer_script.ml"
120 #
21 "lexer_script.mll"
122 let text = tok lexbuf
in
124 if !language = "ocaml"
126 Printf.sprintf
"%s# %d \"%s\"%s"
127 text !Lexer_cocci.line
!file text
130 #
131 "lexer_script.ml"
133 #
30 "lexer_script.mll"
135 #
136 "lexer_script.ml"
138 #
31 "lexer_script.mll"
140 #
141 "lexer_script.ml"
143 #
32 "lexer_script.mll"
144 ( TScriptData
(tok lexbuf
) )
145 #
146 "lexer_script.ml"
148 #
33 "lexer_script.mll"
150 #
151 "lexer_script.ml"
153 #
34 "lexer_script.mll"
154 ( TScriptData
(Printf.sprintf
"\"%s\"" (string lexbuf
)) )
155 #
156 "lexer_script.ml"
158 #
35 "lexer_script.mll"
159 ( TScriptData
(Printf.sprintf
"'%s'" (cstring lexbuf
)) )
160 #
161 "lexer_script.ml"
163 #
36 "lexer_script.mll"
165 #
166 "lexer_script.ml"
168 #
37 "lexer_script.mll"
169 ( raise
(Lexical
("unrecognised symbol, in token rule:"^
tok lexbuf
)) )
170 #
171 "lexer_script.ml"
172 | __ocaml_lex_state
-> lexbuf
.Lexing.refill_buff lexbuf
; __ocaml_lex_token_rec lexbuf __ocaml_lex_state
175 __ocaml_lex_string_rec lexbuf
10
176 and __ocaml_lex_string_rec lexbuf __ocaml_lex_state
=
177 match Lexing.engine
__ocaml_lex_tables __ocaml_lex_state lexbuf
with
179 #
41 "lexer_script.mll"
181 #
182 "lexer_script.ml"
185 #
42 "lexer_script.mll"
187 #
188 "lexer_script.ml"
188 = Lexing.sub_lexeme_char lexbuf lexbuf
.Lexing.lex_start_pos
in
189 #
42 "lexer_script.mll"
190 ( (String.make
1 x
) ^
string lexbuf
)
191 #
192 "lexer_script.ml"
193 | __ocaml_lex_state
-> lexbuf
.Lexing.refill_buff lexbuf
; __ocaml_lex_string_rec lexbuf __ocaml_lex_state
196 __ocaml_lex_cstring_rec lexbuf
13
197 and __ocaml_lex_cstring_rec lexbuf __ocaml_lex_state
=
198 match Lexing.engine
__ocaml_lex_tables __ocaml_lex_state lexbuf
with
200 #
45 "lexer_script.mll"
202 #
203 "lexer_script.ml"
206 #
46 "lexer_script.mll"
208 #
209 "lexer_script.ml"
209 = Lexing.sub_lexeme_char lexbuf lexbuf
.Lexing.lex_start_pos
in
210 #
46 "lexer_script.mll"
211 ( (String.make
1 x
) ^ cstring lexbuf
)
212 #
213 "lexer_script.ml"
214 | __ocaml_lex_state
-> lexbuf
.Lexing.refill_buff lexbuf
; __ocaml_lex_cstring_rec lexbuf __ocaml_lex_state