~ubuntu-branches/ubuntu/trusty/coccinelle/trusty

« back to all changes in this revision

Viewing changes to parsing_cocci/ast0_cocci.ml

  • Committer: Package Import Robot
  • Author(s): Євгеній Мещеряков
  • Date: 2012-08-19 20:40:52 UTC
  • mfrom: (7.2.8 experimental)
  • Revision ID: package-import@ubuntu.com-20120819204052-8cujknwy6cn8a6h6
Tags: 1.0.0~rc15.deb-1
* New upstream RC 
  - Do not build-depend on libsexplib-camlp4-dev and libextlib-ocaml-dev
    anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
  | MetaId        of Ast.meta_name mcode * Ast.idconstraint * Ast.seed * pure
111
111
  | MetaFunc      of Ast.meta_name mcode * Ast.idconstraint * pure
112
112
  | MetaLocalFunc of Ast.meta_name mcode * Ast.idconstraint * pure
 
113
  | AsIdent       of ident * ident (* as ident, always metavar *)
113
114
  | DisjId        of string mcode * ident list *
114
115
                     string mcode list (* the |s *) * string mcode
115
116
  | OptIdent      of ident
334
335
                     string mcode (* while *) * string mcode (* ( *) *
335
336
                     expression * string mcode (* ) *) *
336
337
                     string mcode (* ; *)
337
 
  | For           of string mcode (* for *) * string mcode (* ( *) *
338
 
                     expression option * string mcode (*;*) *
 
338
  | For           of string mcode (* for *) * string mcode (* ( *) * forinfo *
339
339
                     expression option * string mcode (*;*) *
340
340
                     expression option * string mcode (* ) *) * statement *
341
341
                     (info * mcodekind) (* after info *)
382
382
  | OptStm   of statement
383
383
  | UniqueStm of statement
384
384
 
 
385
and base_forinfo =
 
386
    ForExp of expression option * string mcode (*;*)
 
387
  | ForDecl of (info * mcodekind) (* before the decl *) * declaration
 
388
 
 
389
and forinfo = base_forinfo wrap
 
390
 
385
391
and fninfo =
386
392
    FStorage of Ast.storage mcode
387
393
  | FType of typeC
469
475
  | InitTag of initialiser
470
476
  | DeclTag of declaration
471
477
  | StmtTag of statement
 
478
  | ForInfoTag of forinfo
472
479
  | CaseLineTag of case_line
473
480
  | TopTag of top_level
474
481
  | IsoWhenTag of Ast.when_modifier
490
497
let ini x = InitTag x
491
498
let decl x = DeclTag x
492
499
let stmt x = StmtTag x
 
500
let forinfo x = ForInfoTag x
493
501
let case_line x = CaseLineTag x
494
502
let top x = TopTag x
495
503
 
578
586
        (* totally fake, just drop the rest, only for isos *)
579
587
      meta_pos_name (List.hd vars)
580
588
  | MetaPosTag(MetaPos(name,constraints,_)) -> name
 
589
  | IdentTag(i) ->
 
590
      (match unwrap i with
 
591
        MetaId(name,constraints,seed,pure) -> name
 
592
      | _ -> failwith "bad metavariable")
581
593
  | ExprTag(e) ->
582
594
      (match unwrap e with
583
595
        MetaExpr(name,constraints,ty,form,pure) -> name