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

« back to all changes in this revision

Viewing changes to parsing_cocci/parse_cocci.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:
114
114
  | PC.TIncludeL(s,clt) -> (pr "#include \"%s\"" s)^(line_type2c clt)
115
115
  | PC.TIncludeNL(s,clt) -> (pr "#include <%s>" s)^(line_type2c clt)
116
116
  | PC.TDefine(clt,_) -> "#define"^(line_type2c clt)
117
 
  | PC.TDefineParam(clt,_,_) -> "#define_param"^(line_type2c clt)
 
117
  | PC.TDefineParam(clt,_,_,_) -> "#define_param"^(line_type2c clt)
118
118
  | PC.TMinusFile(s,clt) -> (pr "--- %s" s)^(line_type2c clt)
119
119
  | PC.TPlusFile(s,clt) -> (pr "+++ %s" s)^(line_type2c clt)
120
120
 
286
286
  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
287
287
 
288
288
  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
289
 
  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
 
289
  | PC.TDefineParam(clt,_,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
290
290
 
291
291
  | PC.TInc(clt) | PC.TDec(clt)
292
292
 
351
351
  | PC.Textern(clt) | PC.Tconst(clt) | PC.Tvolatile(clt)
352
352
 
353
353
  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt) | PC.TDefine(clt,_)
354
 
  | PC.TDefineParam(clt,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
 
354
  | PC.TDefineParam(clt,_,_,_) | PC.TMinusFile(_,clt) | PC.TPlusFile(_,clt)
355
355
 
356
356
  | PC.TInc(clt) | PC.TDec(clt)
357
357
 
428
428
  | PC.TIncludeL(s,_) -> (PC.TIncludeL(s,clt),x)
429
429
  | PC.TIncludeNL(s,_) -> (PC.TIncludeNL(s,clt),x)
430
430
  | PC.TDefine(_,a) -> (PC.TDefine(clt,a),x)
431
 
  | PC.TDefineParam(_,a,b) -> (PC.TDefineParam(clt,a,b),x)
 
431
  | PC.TDefineParam(_,a,b,c) -> (PC.TDefineParam(clt,a,b,c),x)
432
432
  | PC.TMinusFile(s,_) -> (PC.TMinusFile(s,clt),x)
433
433
  | PC.TPlusFile(s,_) -> (PC.TPlusFile(s,clt),x)
434
434
 
614
614
  | PC.TPlusFile(s,clt) | PC.TMinusFile(s,clt)
615
615
  | PC.TIncludeL(s,clt) | PC.TIncludeNL(s,clt) ->
616
616
      split t clt
617
 
  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_) -> split t clt
 
617
  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_,_) -> split t clt
618
618
 
619
619
  | PC.TIf(clt) | PC.TElse(clt)  | PC.TWhile(clt) | PC.TFor(clt) | PC.TDo(clt)
620
620
  | PC.TSwitch(clt) | PC.TCase(clt) | PC.TDefault(clt)
887
887
 
888
888
  | PC.TPtrOp(clt)
889
889
 
890
 
  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_)
 
890
  | PC.TDefine(clt,_) | PC.TDefineParam(clt,_,_,_)
891
891
  | PC.TIncludeL(_,clt) | PC.TIncludeNL(_,clt)
892
892
 
893
893
  | PC.TEq(clt) | PC.TAssign(_,clt) | PC.TDot(clt) | PC.TComma(clt)
901
901
  | (((PC.TWhen(clt),q) as x)::xs) ->
902
902
      x::(find_line_end true (token2line x) clt q xs)
903
903
  | (((PC.TDefine(clt,_),q) as x)::xs)
904
 
  | (((PC.TDefineParam(clt,_,_),q) as x)::xs) ->
 
904
  | (((PC.TDefineParam(clt,_,_,_),q) as x)::xs) ->
905
905
      x::(find_line_end false (token2line x) clt q xs)
906
906
  | x::xs -> x::(insert_line_end xs)
907
907
 
1654
1654
                      some restrictions on the -+ code *)
1655
1655
                   ([],_) | (_,Ast.Generated) -> ([],minus)
1656
1656
                 | _ -> Iso_pattern.apply_isos chosen_isos minus rule_name in
 
1657
               (* after iso, because iso can intro ... *)
 
1658
               let minus = Adjacency.compute_adjacency minus in
1657
1659
               let minus = Comm_assoc.comm_assoc minus rule_name dropiso in
1658
1660
               let minus =
1659
1661
                 if !Flag.sgrep_mode2 then minus