~ubuntu-branches/ubuntu/maverick/coccinelle/maverick

« back to all changes in this revision

Viewing changes to parsing_cocci/disjdistr.ml

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2009-09-08 13:06:20 UTC
  • mfrom: (7.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20090908130620-s33aehu14xddef4u
Tags: 0.1.10.deb-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/control: build-depend on python2.6-dev,
    set XB-Python-Version to 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
278
278
let orify_rule_elem_decl = generic_orify_rule_elem disjdecl
279
279
let orify_rule_elem_ini = generic_orify_rule_elem disjini
280
280
 
281
 
let disj_rule_elem r k re =
 
281
let rec disj_rule_elem r k re =
282
282
  match Ast.unwrap re with
283
283
    Ast.FunHeader(bef,allminus,fninfo,name,lp,params,rp) ->
284
284
      generic_orify_rule_elem (disjdots disjparam) re params
338
338
  | Ast.Case(case,exp,colon) ->
339
339
      orify_rule_elem re exp
340
340
        (function exp -> Ast.rewrap re (Ast.Case(case,exp,colon)))
341
 
  | Ast.DisjRuleElem(_) -> failwith "not possible"
 
341
  | Ast.DisjRuleElem(l) ->
 
342
      (* only case lines *)
 
343
      Ast.rewrap re(Ast.DisjRuleElem(List.map (disj_rule_elem r k) l))
342
344
 
343
345
let disj_all =
344
346
  let mcode x = x in