~ubuntu-branches/ubuntu/karmic/coccinelle/karmic

« back to all changes in this revision

Viewing changes to parsing_c/control_flow_c.ml

  • Committer: Bazaar Package Importer
  • Author(s): Євгеній Мещеряков
  • Date: 2009-05-11 15:32:24 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090511153224-1odv41d4dkr3y80v
Tags: 0.1.8.deb-2
Use common install Makefile target for both native and bytecode
build. This hopefully fixes FTBFS on bytecode archs 

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
 
83
83
(*****************************************************************************)
84
84
 
 
85
type fullstatement = statement 
85
86
 
86
87
(* ---------------------------------------------------------------------- *)
87
88
(* The string is for debugging. Used by Ograph_extended.print_graph. 
140
141
    * if they are in different nodes. Solved by using shared ref
141
142
    * and allow the "already-tagged" token.
142
143
    *)
143
 
  | SeqStart of statement * int * info
 
144
  | SeqStart of fullstatement * int * info
144
145
  | SeqEnd   of int * info
145
146
 
146
147
 
147
 
  | ExprStatement of statement * (expression option) wrap
148
 
 
149
 
 
150
 
  | IfHeader  of statement * expression wrap
 
148
  | ExprStatement of fullstatement * (expression option) wrap
 
149
 
 
150
 
 
151
  | IfHeader  of fullstatement * expression wrap
151
152
  | Else of info
152
 
  | WhileHeader of statement * expression wrap
153
 
  | DoHeader of statement * info
 
153
  | WhileHeader of fullstatement * expression wrap
 
154
  | DoHeader of fullstatement * info
154
155
  | DoWhileTail of expression wrap
155
 
  | ForHeader of statement * 
 
156
  | ForHeader of fullstatement * 
156
157
                 (exprStatement wrap * exprStatement wrap * exprStatement wrap)
157
158
                 wrap
158
 
  | SwitchHeader of statement * expression wrap
159
 
  | MacroIterHeader of statement * (string * argument wrap2 list) wrap
 
159
  | SwitchHeader of fullstatement * expression wrap
 
160
  | MacroIterHeader of fullstatement * (string * argument wrap2 list) wrap
160
161
 
161
162
  (* Used to mark the end of if, while, dowhile, for, switch. Later we
162
163
   * will be able to "tag" some cocci code on this node.
197
198
   *)
198
199
  | EndStatement of info option (* fake_info *)
199
200
 
200
 
  | Return     of statement * unit wrap
201
 
  | ReturnExpr of statement * expression wrap
 
201
  | Return     of fullstatement * unit wrap
 
202
  | ReturnExpr of fullstatement * expression wrap
202
203
 
203
204
  (* ------------------------ *)
204
205
  | IfdefHeader of ifdef_directive
220
221
  | MacroTop of string * argument wrap2 list * il 
221
222
 
222
223
  (* ------------------------ *)
223
 
  | Case  of statement * expression wrap
224
 
  | Default of statement * unit wrap
 
224
  | Case  of fullstatement * expression wrap
 
225
  | Default of fullstatement * unit wrap
225
226
 
226
 
  | Continue of statement * unit wrap
227
 
  | Break    of statement * unit wrap
 
227
  | Continue of fullstatement * unit wrap
 
228
  | Break    of fullstatement * unit wrap
228
229
 
229
230
  (* no counter part in cocci *)
230
 
  | CaseRange of statement * (expression * expression) wrap
231
 
  | Label of statement * string wrap
232
 
  | Goto of statement * string wrap
233
 
 
234
 
 
235
 
  | Asm of statement * asmbody wrap
236
 
  | MacroStmt of statement * unit wrap
 
231
  | CaseRange of fullstatement * (expression * expression) wrap
 
232
  | Label of fullstatement * name * unit wrap (* : *)
 
233
  | Goto of fullstatement * name * unit wrap (* goto *)
 
234
 
 
235
 
 
236
  | Asm of fullstatement * asmbody wrap
 
237
  | MacroStmt of fullstatement * unit wrap
237
238
 
238
239
  (* ------------------------ *)
239
240
  (* some control nodes *)
356
357
  | Return     (st, _)
357
358
  | ReturnExpr (st, _)
358
359
  (* no counter part in cocci *)
359
 
  | Label (st, _)
 
360
  | Label (st, _, _)
360
361
  | Case  (st,_)
361
362
  | CaseRange (st, _)
362
363
  | Default   (st, _)
363
 
  | Goto (st, _)
 
364
  | Goto (st, _, _)
364
365
  | Continue (st, _)
365
366
  | Break    (st, _)
366
367
  | Asm (st,_)